From de29341b234f7c547a5438454c54ab4cdfb70e52 Mon Sep 17 00:00:00 2001 From: dzu Date: Sun, 8 Feb 2026 02:12:16 +0000 Subject: [PATCH 1/7] initial renerated client --- Cargo.toml | 3 + forgejo-openapi/.gitignore | 3 + forgejo-openapi/.openapi-generator-ignore | 23 + forgejo-openapi/.openapi-generator/FILES | 486 + forgejo-openapi/.openapi-generator/VERSION | 1 + forgejo-openapi/.travis.yml | 1 + forgejo-openapi/Cargo.toml | 21 + forgejo-openapi/README.md | 746 + forgejo-openapi/docs/AccessToken.md | 15 + forgejo-openapi/docs/ActionRun.md | 33 + forgejo-openapi/docs/ActionRunJob.md | 18 + forgejo-openapi/docs/ActionTask.md | 23 + forgejo-openapi/docs/ActionTaskResponse.md | 12 + forgejo-openapi/docs/ActionVariable.md | 14 + forgejo-openapi/docs/Activity.md | 23 + forgejo-openapi/docs/ActivityPub.md | 11 + forgejo-openapi/docs/ActivitypubApi.md | 321 + forgejo-openapi/docs/AddCollaboratorOption.md | 11 + forgejo-openapi/docs/AddTimeOption.md | 13 + forgejo-openapi/docs/AdminApi.md | 1246 + forgejo-openapi/docs/AnnotatedTag.md | 18 + forgejo-openapi/docs/AnnotatedTagObject.md | 13 + forgejo-openapi/docs/ApiError.md | 12 + forgejo-openapi/docs/ApiForbiddenError.md | 12 + .../docs/ApiInternalServerError.md | 12 + forgejo-openapi/docs/ApiInvalidTopicsError.md | 12 + forgejo-openapi/docs/ApiNotFound.md | 13 + forgejo-openapi/docs/ApiRepoArchivedError.md | 12 + forgejo-openapi/docs/ApiUnauthorizedError.md | 12 + forgejo-openapi/docs/ApiValidationError.md | 12 + forgejo-openapi/docs/Attachment.md | 18 + forgejo-openapi/docs/BlockedUser.md | 12 + forgejo-openapi/docs/Branch.md | 19 + forgejo-openapi/docs/BranchProtection.md | 37 + forgejo-openapi/docs/ChangeFileOperation.md | 15 + forgejo-openapi/docs/ChangeFilesOptions.md | 18 + forgejo-openapi/docs/ChangedFile.md | 19 + forgejo-openapi/docs/CombinedStatus.md | 17 + forgejo-openapi/docs/Comment.md | 21 + forgejo-openapi/docs/Commit.md | 20 + forgejo-openapi/docs/CommitAffectedFiles.md | 12 + forgejo-openapi/docs/CommitDateOptions.md | 12 + forgejo-openapi/docs/CommitMeta.md | 13 + forgejo-openapi/docs/CommitStats.md | 13 + forgejo-openapi/docs/CommitStatus.md | 19 + forgejo-openapi/docs/CommitUser.md | 13 + forgejo-openapi/docs/Compare.md | 13 + forgejo-openapi/docs/ContentsResponse.md | 26 + .../docs/CreateAccessTokenOption.md | 12 + .../docs/CreateBranchProtectionOption.md | 35 + .../docs/CreateBranchRepoOption.md | 13 + forgejo-openapi/docs/CreateEmailOption.md | 11 + forgejo-openapi/docs/CreateFileOptions.md | 18 + forgejo-openapi/docs/CreateForkOption.md | 12 + forgejo-openapi/docs/CreateGpgKeyOption.md | 12 + forgejo-openapi/docs/CreateHookOption.md | 16 + .../docs/CreateIssueCommentOption.md | 12 + forgejo-openapi/docs/CreateIssueOption.md | 19 + forgejo-openapi/docs/CreateKeyOption.md | 13 + forgejo-openapi/docs/CreateLabelOption.md | 15 + forgejo-openapi/docs/CreateMilestoneOption.md | 14 + .../docs/CreateOAuth2ApplicationOptions.md | 13 + .../docs/CreateOrUpdateSecretOption.md | 11 + forgejo-openapi/docs/CreateOrgOption.md | 18 + .../docs/CreatePullRequestOption.md | 19 + .../docs/CreatePullReviewComment.md | 14 + .../docs/CreatePullReviewOptions.md | 14 + .../docs/CreatePushMirrorOption.md | 17 + .../docs/CreateQuotaGroupOptions.md | 12 + .../docs/CreateQuotaRuleOptions.md | 13 + forgejo-openapi/docs/CreateReleaseOption.md | 17 + forgejo-openapi/docs/CreateRepoOption.md | 22 + forgejo-openapi/docs/CreateStatusOption.md | 14 + forgejo-openapi/docs/CreateTagOption.md | 13 + .../docs/CreateTagProtectionOption.md | 13 + forgejo-openapi/docs/CreateTeamOption.md | 17 + forgejo-openapi/docs/CreateUserOption.md | 21 + forgejo-openapi/docs/CreateVariableOption.md | 11 + forgejo-openapi/docs/CreateWikiPageOptions.md | 13 + forgejo-openapi/docs/Cron.md | 15 + forgejo-openapi/docs/DeleteEmailOption.md | 11 + forgejo-openapi/docs/DeleteFileOptions.md | 18 + forgejo-openapi/docs/DeleteLabelsOption.md | 11 + forgejo-openapi/docs/DeployKey.md | 19 + .../docs/DismissPullReviewOptions.md | 12 + .../docs/DispatchWorkflowOption.md | 13 + forgejo-openapi/docs/DispatchWorkflowRun.md | 13 + forgejo-openapi/docs/EditAttachmentOptions.md | 12 + .../docs/EditBranchProtectionOption.md | 33 + forgejo-openapi/docs/EditDeadlineOption.md | 11 + forgejo-openapi/docs/EditGitHookOption.md | 11 + forgejo-openapi/docs/EditHookOption.md | 15 + .../docs/EditIssueCommentOption.md | 12 + forgejo-openapi/docs/EditIssueOption.md | 20 + forgejo-openapi/docs/EditLabelOption.md | 15 + forgejo-openapi/docs/EditMilestoneOption.md | 14 + forgejo-openapi/docs/EditOrgOption.md | 17 + forgejo-openapi/docs/EditPullRequestOption.md | 21 + forgejo-openapi/docs/EditQuotaRuleOptions.md | 12 + forgejo-openapi/docs/EditReactionOption.md | 11 + forgejo-openapi/docs/EditReleaseOption.md | 17 + forgejo-openapi/docs/EditRepoOption.md | 44 + .../docs/EditTagProtectionOption.md | 13 + forgejo-openapi/docs/EditTeamOption.md | 17 + forgejo-openapi/docs/EditUserOption.md | 30 + forgejo-openapi/docs/Email.md | 15 + forgejo-openapi/docs/ExternalTracker.md | 14 + forgejo-openapi/docs/ExternalWiki.md | 11 + forgejo-openapi/docs/FileCommitResponse.md | 19 + forgejo-openapi/docs/FileDeleteResponse.md | 13 + forgejo-openapi/docs/FileLinksResponse.md | 13 + forgejo-openapi/docs/FileResponse.md | 13 + forgejo-openapi/docs/FilesResponse.md | 13 + forgejo-openapi/docs/GeneralApiSettings.md | 14 + .../docs/GeneralAttachmentSettings.md | 14 + forgejo-openapi/docs/GeneralRepoSettings.md | 17 + forgejo-openapi/docs/GeneralUiSettings.md | 13 + forgejo-openapi/docs/GenerateRepoOption.md | 22 + forgejo-openapi/docs/GitBlob.md | 15 + forgejo-openapi/docs/GitEntry.md | 16 + forgejo-openapi/docs/GitHook.md | 13 + forgejo-openapi/docs/GitObject.md | 13 + forgejo-openapi/docs/GitTreeResponse.md | 16 + forgejo-openapi/docs/GitignoreTemplateInfo.md | 12 + forgejo-openapi/docs/GpgKey.md | 23 + forgejo-openapi/docs/GpgKeyEmail.md | 12 + forgejo-openapi/docs/Hook.md | 22 + forgejo-openapi/docs/Identity.md | 12 + forgejo-openapi/docs/InternalTracker.md | 13 + forgejo-openapi/docs/Issue.md | 35 + forgejo-openapi/docs/IssueApi.md | 2180 ++ forgejo-openapi/docs/IssueConfig.md | 12 + .../docs/IssueConfigContactLink.md | 13 + forgejo-openapi/docs/IssueConfigValidation.md | 12 + forgejo-openapi/docs/IssueDeadline.md | 11 + forgejo-openapi/docs/IssueFormField.md | 15 + forgejo-openapi/docs/IssueLabelsOption.md | 12 + forgejo-openapi/docs/IssueMeta.md | 13 + forgejo-openapi/docs/IssueTemplate.md | 18 + forgejo-openapi/docs/Label.md | 17 + forgejo-openapi/docs/LabelTemplate.md | 14 + forgejo-openapi/docs/LicenseTemplateInfo.md | 15 + .../docs/LicensesTemplateListEntry.md | 13 + forgejo-openapi/docs/ListActionRunResponse.md | 12 + forgejo-openapi/docs/MarkdownOption.md | 14 + forgejo-openapi/docs/MarkupOption.md | 16 + .../docs/MergePullRequestOption.md | 18 + forgejo-openapi/docs/MigrateRepoOptions.md | 30 + forgejo-openapi/docs/Milestone.md | 20 + forgejo-openapi/docs/MiscellaneousApi.md | 364 + forgejo-openapi/docs/NewIssuePinsAllowed.md | 12 + forgejo-openapi/docs/NodeInfo.md | 17 + forgejo-openapi/docs/NodeInfoServices.md | 12 + forgejo-openapi/docs/NodeInfoSoftware.md | 14 + forgejo-openapi/docs/NodeInfoUsage.md | 13 + forgejo-openapi/docs/NodeInfoUsageUsers.md | 13 + forgejo-openapi/docs/Note.md | 12 + forgejo-openapi/docs/NoteOptions.md | 11 + forgejo-openapi/docs/NotificationApi.md | 231 + forgejo-openapi/docs/NotificationCount.md | 11 + forgejo-openapi/docs/NotificationSubject.md | 17 + forgejo-openapi/docs/NotificationThread.md | 17 + forgejo-openapi/docs/OAuth2Application.md | 17 + forgejo-openapi/docs/Organization.md | 21 + forgejo-openapi/docs/OrganizationApi.md | 1983 ++ .../docs/OrganizationPermissions.md | 15 + forgejo-openapi/docs/Package.md | 19 + forgejo-openapi/docs/PackageApi.md | 200 + forgejo-openapi/docs/PackageFile.md | 17 + forgejo-openapi/docs/PayloadCommit.md | 20 + .../docs/PayloadCommitVerification.md | 15 + forgejo-openapi/docs/PayloadUser.md | 13 + forgejo-openapi/docs/Permission.md | 13 + forgejo-openapi/docs/PrBranchInfo.md | 15 + forgejo-openapi/docs/PublicKey.md | 19 + forgejo-openapi/docs/PullRequest.md | 48 + forgejo-openapi/docs/PullRequestMeta.md | 14 + forgejo-openapi/docs/PullReview.md | 24 + forgejo-openapi/docs/PullReviewComment.md | 25 + .../docs/PullReviewRequestOptions.md | 12 + forgejo-openapi/docs/PushMirror.md | 20 + forgejo-openapi/docs/QuotaGroup.md | 12 + forgejo-openapi/docs/QuotaInfo.md | 12 + forgejo-openapi/docs/QuotaRuleInfo.md | 13 + forgejo-openapi/docs/QuotaUsed.md | 11 + forgejo-openapi/docs/QuotaUsedArtifact.md | 13 + forgejo-openapi/docs/QuotaUsedAttachment.md | 14 + .../docs/QuotaUsedAttachmentContainedIn.md | 12 + forgejo-openapi/docs/QuotaUsedPackage.md | 15 + forgejo-openapi/docs/QuotaUsedSize.md | 13 + forgejo-openapi/docs/QuotaUsedSizeAssets.md | 13 + .../docs/QuotaUsedSizeAssetsAttachments.md | 12 + .../docs/QuotaUsedSizeAssetsPackages.md | 11 + forgejo-openapi/docs/QuotaUsedSizeGit.md | 11 + forgejo-openapi/docs/QuotaUsedSizeRepos.md | 12 + forgejo-openapi/docs/Reaction.md | 13 + forgejo-openapi/docs/Reference.md | 13 + forgejo-openapi/docs/RegistrationToken.md | 11 + forgejo-openapi/docs/Release.md | 28 + forgejo-openapi/docs/RenameOrgOption.md | 11 + forgejo-openapi/docs/RenameUserOption.md | 11 + forgejo-openapi/docs/ReplaceFlagsOption.md | 11 + .../docs/RepoCollaboratorPermission.md | 13 + forgejo-openapi/docs/RepoCommit.md | 16 + .../RepoCreateReleaseAttachmentRequest.md | 12 + forgejo-openapi/docs/RepoTopicOptions.md | 11 + forgejo-openapi/docs/RepoTransfer.md | 13 + forgejo-openapi/docs/Repository.md | 73 + forgejo-openapi/docs/RepositoryApi.md | 5816 ++++ forgejo-openapi/docs/RepositoryMeta.md | 14 + forgejo-openapi/docs/SearchResults.md | 12 + forgejo-openapi/docs/Secret.md | 12 + forgejo-openapi/docs/ServerVersion.md | 11 + .../docs/SetUserQuotaGroupsOptions.md | 11 + forgejo-openapi/docs/SettingsApi.md | 112 + forgejo-openapi/docs/StopWatch.md | 17 + .../docs/SubmitPullReviewOptions.md | 12 + forgejo-openapi/docs/SyncForkInfo.md | 14 + forgejo-openapi/docs/Tag.md | 17 + .../docs/TagArchiveDownloadCount.md | 12 + forgejo-openapi/docs/TagProtection.md | 16 + forgejo-openapi/docs/Team.md | 19 + forgejo-openapi/docs/TeamSearchResults.md | 12 + forgejo-openapi/docs/TimelineComment.md | 39 + forgejo-openapi/docs/TopicName.md | 11 + forgejo-openapi/docs/TopicResponse.md | 15 + forgejo-openapi/docs/TopicSearchResults.md | 11 + forgejo-openapi/docs/TrackedTime.md | 17 + forgejo-openapi/docs/TransferRepoOption.md | 12 + .../docs/UpdateBranchRepoOption.md | 11 + forgejo-openapi/docs/UpdateFileOptions.md | 20 + .../docs/UpdateRepoAvatarOption.md | 11 + .../docs/UpdateUserAvatarOption.md | 11 + forgejo-openapi/docs/UpdateVariableOption.md | 12 + forgejo-openapi/docs/User.md | 33 + forgejo-openapi/docs/UserApi.md | 2219 ++ forgejo-openapi/docs/UserHeatmapData.md | 12 + forgejo-openapi/docs/UserSearchResults.md | 12 + forgejo-openapi/docs/UserSettings.md | 22 + forgejo-openapi/docs/UserSettingsOptions.md | 22 + forgejo-openapi/docs/VerifyGpgKeyOption.md | 12 + forgejo-openapi/docs/WatchInfo.md | 16 + forgejo-openapi/docs/WikiCommit.md | 14 + forgejo-openapi/docs/WikiCommitList.md | 12 + forgejo-openapi/docs/WikiPage.md | 18 + forgejo-openapi/docs/WikiPageMetaData.md | 14 + forgejo-openapi/git_push.sh | 57 + forgejo-openapi/src/apis/activitypub_api.rs | 1018 + forgejo-openapi/src/apis/admin_api.rs | 3990 +++ forgejo-openapi/src/apis/configuration.rs | 51 + forgejo-openapi/src/apis/issue_api.rs | 6690 ++++ forgejo-openapi/src/apis/miscellaneous_api.rs | 1236 + forgejo-openapi/src/apis/mod.rs | 125 + forgejo-openapi/src/apis/notification_api.rs | 788 + forgejo-openapi/src/apis/organization_api.rs | 6213 ++++ forgejo-openapi/src/apis/package_api.rs | 585 + forgejo-openapi/src/apis/repository_api.rs | 18035 ++++++++++ forgejo-openapi/src/apis/settings_api.rs | 386 + forgejo-openapi/src/apis/user_api.rs | 7266 ++++ forgejo-openapi/src/lib.rs | 11 + forgejo-openapi/src/models/access_token.rs | 39 + forgejo-openapi/src/models/action_run.rs | 116 + forgejo-openapi/src/models/action_run_job.rs | 58 + forgejo-openapi/src/models/action_task.rs | 65 + .../src/models/action_task_response.rs | 32 + forgejo-openapi/src/models/action_variable.rs | 42 + forgejo-openapi/src/models/activity.rs | 128 + forgejo-openapi/src/models/activity_pub.rs | 29 + .../src/models/add_collaborator_option.rs | 45 + forgejo-openapi/src/models/add_time_option.rs | 37 + forgejo-openapi/src/models/annotated_tag.rs | 50 + .../src/models/annotated_tag_object.rs | 35 + forgejo-openapi/src/models/api_error.rs | 32 + .../src/models/api_forbidden_error.rs | 30 + .../src/models/api_internal_server_error.rs | 30 + .../src/models/api_invalid_topics_error.rs | 30 + forgejo-openapi/src/models/api_not_found.rs | 33 + .../src/models/api_repo_archived_error.rs | 30 + .../src/models/api_unauthorized_error.rs | 30 + .../src/models/api_validation_error.rs | 30 + forgejo-openapi/src/models/attachment.rs | 64 + forgejo-openapi/src/models/blocked_user.rs | 30 + forgejo-openapi/src/models/branch.rs | 53 + .../src/models/branch_protection.rs | 108 + .../src/models/change_file_operation.rs | 62 + .../src/models/change_files_options.rs | 55 + forgejo-openapi/src/models/changed_file.rs | 53 + forgejo-openapi/src/models/combined_status.rs | 48 + forgejo-openapi/src/models/comment.rs | 59 + forgejo-openapi/src/models/commit.rs | 54 + .../src/models/commit_affected_files.rs | 32 + .../src/models/commit_date_options.rs | 32 + forgejo-openapi/src/models/commit_meta.rs | 33 + forgejo-openapi/src/models/commit_stats.rs | 35 + forgejo-openapi/src/models/commit_status.rs | 54 + forgejo-openapi/src/models/commit_user.rs | 33 + forgejo-openapi/src/models/compare.rs | 33 + .../src/models/contents_response.rs | 79 + .../src/models/create_access_token_option.rs | 32 + .../models/create_branch_protection_option.rs | 102 + .../src/models/create_branch_repo_option.rs | 38 + .../src/models/create_email_option.rs | 30 + .../src/models/create_file_options.rs | 55 + .../src/models/create_fork_option.rs | 34 + .../src/models/create_gpg_key_option.rs | 33 + .../src/models/create_hook_option.rs | 77 + .../src/models/create_issue_comment_option.rs | 32 + .../src/models/create_issue_option.rs | 56 + .../src/models/create_key_option.rs | 38 + .../src/models/create_label_option.rs | 41 + .../src/models/create_milestone_option.rs | 52 + .../create_o_auth2_application_options.rs | 35 + .../models/create_or_update_secret_option.rs | 30 + .../src/models/create_org_option.rs | 67 + .../src/models/create_pull_request_option.rs | 53 + .../src/models/create_pull_review_comment.rs | 41 + .../src/models/create_pull_review_options.rs | 39 + .../src/models/create_push_mirror_option.rs | 45 + .../src/models/create_quota_group_options.rs | 34 + .../src/models/create_quota_rule_options.rs | 38 + .../src/models/create_release_option.rs | 47 + .../src/models/create_repo_option.rs | 106 + .../src/models/create_status_option.rs | 39 + .../src/models/create_tag_option.rs | 35 + .../models/create_tag_protection_option.rs | 35 + .../src/models/create_team_option.rs | 63 + .../src/models/create_user_option.rs | 60 + .../src/models/create_variable_option.rs | 30 + .../src/models/create_wiki_page_options.rs | 38 + forgejo-openapi/src/models/cron.rs | 41 + .../src/models/delete_email_option.rs | 30 + .../src/models/delete_file_options.rs | 55 + .../src/models/delete_labels_option.rs | 29 + forgejo-openapi/src/models/deploy_key.rs | 53 + .../src/models/dismiss_pull_review_options.rs | 32 + .../src/models/dispatch_workflow_option.rs | 38 + .../src/models/dispatch_workflow_run.rs | 38 + .../src/models/edit_attachment_options.rs | 33 + .../models/edit_branch_protection_option.rs | 95 + .../src/models/edit_deadline_option.rs | 29 + .../src/models/edit_git_hook_option.rs | 29 + .../src/models/edit_hook_option.rs | 41 + .../src/models/edit_issue_comment_option.rs | 32 + .../src/models/edit_issue_option.rs | 57 + .../src/models/edit_label_option.rs | 41 + .../src/models/edit_milestone_option.rs | 38 + forgejo-openapi/src/models/edit_org_option.rs | 64 + .../src/models/edit_pull_request_option.rs | 59 + .../src/models/edit_quota_rule_options.rs | 34 + .../src/models/edit_reaction_option.rs | 29 + .../src/models/edit_release_option.rs | 47 + .../src/models/edit_repo_option.rs | 159 + .../src/models/edit_tag_protection_option.rs | 35 + .../src/models/edit_team_option.rs | 63 + .../src/models/edit_user_option.rs | 86 + forgejo-openapi/src/models/email.rs | 41 + .../src/models/external_tracker.rs | 42 + forgejo-openapi/src/models/external_wiki.rs | 30 + .../src/models/file_commit_response.rs | 51 + .../src/models/file_delete_response.rs | 35 + .../src/models/file_links_response.rs | 35 + forgejo-openapi/src/models/file_response.rs | 35 + forgejo-openapi/src/models/files_response.rs | 35 + .../src/models/general_api_settings.rs | 38 + .../src/models/general_attachment_settings.rs | 38 + .../src/models/general_repo_settings.rs | 47 + .../src/models/general_ui_settings.rs | 35 + .../src/models/generate_repo_option.rs | 74 + forgejo-openapi/src/models/git_blob.rs | 41 + forgejo-openapi/src/models/git_entry.rs | 44 + forgejo-openapi/src/models/git_hook.rs | 35 + forgejo-openapi/src/models/git_object.rs | 33 + .../src/models/git_tree_response.rs | 44 + .../src/models/gitignore_template_info.rs | 32 + forgejo-openapi/src/models/gpg_key.rs | 65 + forgejo-openapi/src/models/gpg_key_email.rs | 32 + forgejo-openapi/src/models/hook.rs | 63 + forgejo-openapi/src/models/identity.rs | 32 + .../src/models/internal_tracker.rs | 38 + forgejo-openapi/src/models/issue.rs | 102 + forgejo-openapi/src/models/issue_config.rs | 30 + .../src/models/issue_config_contact_link.rs | 33 + .../src/models/issue_config_validation.rs | 30 + forgejo-openapi/src/models/issue_deadline.rs | 29 + .../src/models/issue_form_field.rs | 41 + .../src/models/issue_labels_option.rs | 33 + forgejo-openapi/src/models/issue_meta.rs | 35 + forgejo-openapi/src/models/issue_template.rs | 50 + forgejo-openapi/src/models/label.rs | 47 + forgejo-openapi/src/models/label_template.rs | 38 + .../src/models/license_template_info.rs | 41 + .../models/licenses_template_list_entry.rs | 35 + .../src/models/list_action_run_response.rs | 32 + forgejo-openapi/src/models/markdown_option.rs | 42 + forgejo-openapi/src/models/markup_option.rs | 50 + .../src/models/merge_pull_request_option.rs | 72 + .../src/models/migrate_repo_options.rs | 114 + forgejo-openapi/src/models/milestone.rs | 57 + forgejo-openapi/src/models/mod.rs | 456 + .../src/models/new_issue_pins_allowed.rs | 32 + forgejo-openapi/src/models/node_info.rs | 47 + .../src/models/node_info_services.rs | 32 + .../src/models/node_info_software.rs | 38 + forgejo-openapi/src/models/node_info_usage.rs | 35 + .../src/models/node_info_usage_users.rs | 35 + forgejo-openapi/src/models/note.rs | 32 + forgejo-openapi/src/models/note_options.rs | 27 + .../src/models/notification_count.rs | 29 + .../src/models/notification_subject.rs | 49 + .../src/models/notification_thread.rs | 47 + .../src/models/o_auth2_application.rs | 45 + forgejo-openapi/src/models/organization.rs | 60 + .../src/models/organization_permissions.rs | 41 + forgejo-openapi/src/models/package.rs | 53 + forgejo-openapi/src/models/package_file.rs | 47 + forgejo-openapi/src/models/payload_commit.rs | 57 + .../src/models/payload_commit_verification.rs | 41 + forgejo-openapi/src/models/payload_user.rs | 36 + forgejo-openapi/src/models/permission.rs | 35 + forgejo-openapi/src/models/pr_branch_info.rs | 41 + forgejo-openapi/src/models/public_key.rs | 53 + forgejo-openapi/src/models/pull_request.rs | 142 + .../src/models/pull_request_meta.rs | 38 + forgejo-openapi/src/models/pull_review.rs | 69 + .../src/models/pull_review_comment.rs | 71 + .../src/models/pull_review_request_options.rs | 32 + forgejo-openapi/src/models/push_mirror.rs | 56 + forgejo-openapi/src/models/quota_group.rs | 34 + forgejo-openapi/src/models/quota_info.rs | 33 + forgejo-openapi/src/models/quota_rule_info.rs | 38 + forgejo-openapi/src/models/quota_used.rs | 29 + .../src/models/quota_used_artifact.rs | 38 + .../src/models/quota_used_attachment.rs | 41 + .../quota_used_attachment_contained_in.rs | 34 + .../src/models/quota_used_package.rs | 46 + forgejo-openapi/src/models/quota_used_size.rs | 35 + .../src/models/quota_used_size_assets.rs | 36 + .../quota_used_size_assets_attachments.rs | 34 + .../models/quota_used_size_assets_packages.rs | 30 + .../src/models/quota_used_size_git.rs | 30 + .../src/models/quota_used_size_repos.rs | 34 + forgejo-openapi/src/models/reaction.rs | 35 + forgejo-openapi/src/models/reference.rs | 33 + .../src/models/registration_token.rs | 29 + forgejo-openapi/src/models/release.rs | 80 + .../src/models/rename_org_option.rs | 30 + .../src/models/rename_user_option.rs | 30 + .../src/models/replace_flags_option.rs | 29 + .../models/repo_collaborator_permission.rs | 35 + forgejo-openapi/src/models/repo_commit.rs | 42 + .../repo_create_release_attachment_request.rs | 32 + .../src/models/repo_topic_options.rs | 30 + forgejo-openapi/src/models/repo_transfer.rs | 35 + forgejo-openapi/src/models/repository.rs | 230 + forgejo-openapi/src/models/repository_meta.rs | 38 + forgejo-openapi/src/models/search_results.rs | 32 + forgejo-openapi/src/models/secret.rs | 33 + forgejo-openapi/src/models/server_version.rs | 29 + .../models/set_user_quota_groups_options.rs | 30 + forgejo-openapi/src/models/stop_watch.rs | 47 + .../src/models/submit_pull_review_options.rs | 33 + forgejo-openapi/src/models/sync_fork_info.rs | 38 + forgejo-openapi/src/models/tag.rs | 47 + .../src/models/tag_archive_download_count.rs | 32 + forgejo-openapi/src/models/tag_protection.rs | 44 + forgejo-openapi/src/models/team.rs | 73 + .../src/models/team_search_results.rs | 30 + .../src/models/timeline_comment.rs | 115 + forgejo-openapi/src/models/topic_name.rs | 29 + forgejo-openapi/src/models/topic_response.rs | 41 + .../src/models/topic_search_results.rs | 27 + forgejo-openapi/src/models/tracked_time.rs | 50 + .../src/models/transfer_repo_option.rs | 33 + .../src/models/update_branch_repo_option.rs | 30 + .../src/models/update_file_options.rs | 63 + .../src/models/update_repo_avatar_option.rs | 30 + .../src/models/update_user_avatar_option.rs | 30 + .../src/models/update_variable_option.rs | 34 + forgejo-openapi/src/models/user.rs | 113 + .../src/models/user_heatmap_data.rs | 33 + .../src/models/user_search_results.rs | 30 + forgejo-openapi/src/models/user_settings.rs | 63 + .../src/models/user_settings_options.rs | 63 + .../src/models/verify_gpg_key_option.rs | 33 + forgejo-openapi/src/models/watch_info.rs | 44 + forgejo-openapi/src/models/wiki_commit.rs | 38 + .../src/models/wiki_commit_list.rs | 32 + forgejo-openapi/src/models/wiki_page.rs | 51 + .../src/models/wiki_page_meta_data.rs | 38 + forgejo-openapi/swagger.v1.json | 28347 ++++++++++++++++ 490 files changed, 105323 insertions(+) create mode 100644 Cargo.toml create mode 100644 forgejo-openapi/.gitignore create mode 100644 forgejo-openapi/.openapi-generator-ignore create mode 100644 forgejo-openapi/.openapi-generator/FILES create mode 100644 forgejo-openapi/.openapi-generator/VERSION create mode 100644 forgejo-openapi/.travis.yml create mode 100644 forgejo-openapi/Cargo.toml create mode 100644 forgejo-openapi/README.md create mode 100644 forgejo-openapi/docs/AccessToken.md create mode 100644 forgejo-openapi/docs/ActionRun.md create mode 100644 forgejo-openapi/docs/ActionRunJob.md create mode 100644 forgejo-openapi/docs/ActionTask.md create mode 100644 forgejo-openapi/docs/ActionTaskResponse.md create mode 100644 forgejo-openapi/docs/ActionVariable.md create mode 100644 forgejo-openapi/docs/Activity.md create mode 100644 forgejo-openapi/docs/ActivityPub.md create mode 100644 forgejo-openapi/docs/ActivitypubApi.md create mode 100644 forgejo-openapi/docs/AddCollaboratorOption.md create mode 100644 forgejo-openapi/docs/AddTimeOption.md create mode 100644 forgejo-openapi/docs/AdminApi.md create mode 100644 forgejo-openapi/docs/AnnotatedTag.md create mode 100644 forgejo-openapi/docs/AnnotatedTagObject.md create mode 100644 forgejo-openapi/docs/ApiError.md create mode 100644 forgejo-openapi/docs/ApiForbiddenError.md create mode 100644 forgejo-openapi/docs/ApiInternalServerError.md create mode 100644 forgejo-openapi/docs/ApiInvalidTopicsError.md create mode 100644 forgejo-openapi/docs/ApiNotFound.md create mode 100644 forgejo-openapi/docs/ApiRepoArchivedError.md create mode 100644 forgejo-openapi/docs/ApiUnauthorizedError.md create mode 100644 forgejo-openapi/docs/ApiValidationError.md create mode 100644 forgejo-openapi/docs/Attachment.md create mode 100644 forgejo-openapi/docs/BlockedUser.md create mode 100644 forgejo-openapi/docs/Branch.md create mode 100644 forgejo-openapi/docs/BranchProtection.md create mode 100644 forgejo-openapi/docs/ChangeFileOperation.md create mode 100644 forgejo-openapi/docs/ChangeFilesOptions.md create mode 100644 forgejo-openapi/docs/ChangedFile.md create mode 100644 forgejo-openapi/docs/CombinedStatus.md create mode 100644 forgejo-openapi/docs/Comment.md create mode 100644 forgejo-openapi/docs/Commit.md create mode 100644 forgejo-openapi/docs/CommitAffectedFiles.md create mode 100644 forgejo-openapi/docs/CommitDateOptions.md create mode 100644 forgejo-openapi/docs/CommitMeta.md create mode 100644 forgejo-openapi/docs/CommitStats.md create mode 100644 forgejo-openapi/docs/CommitStatus.md create mode 100644 forgejo-openapi/docs/CommitUser.md create mode 100644 forgejo-openapi/docs/Compare.md create mode 100644 forgejo-openapi/docs/ContentsResponse.md create mode 100644 forgejo-openapi/docs/CreateAccessTokenOption.md create mode 100644 forgejo-openapi/docs/CreateBranchProtectionOption.md create mode 100644 forgejo-openapi/docs/CreateBranchRepoOption.md create mode 100644 forgejo-openapi/docs/CreateEmailOption.md create mode 100644 forgejo-openapi/docs/CreateFileOptions.md create mode 100644 forgejo-openapi/docs/CreateForkOption.md create mode 100644 forgejo-openapi/docs/CreateGpgKeyOption.md create mode 100644 forgejo-openapi/docs/CreateHookOption.md create mode 100644 forgejo-openapi/docs/CreateIssueCommentOption.md create mode 100644 forgejo-openapi/docs/CreateIssueOption.md create mode 100644 forgejo-openapi/docs/CreateKeyOption.md create mode 100644 forgejo-openapi/docs/CreateLabelOption.md create mode 100644 forgejo-openapi/docs/CreateMilestoneOption.md create mode 100644 forgejo-openapi/docs/CreateOAuth2ApplicationOptions.md create mode 100644 forgejo-openapi/docs/CreateOrUpdateSecretOption.md create mode 100644 forgejo-openapi/docs/CreateOrgOption.md create mode 100644 forgejo-openapi/docs/CreatePullRequestOption.md create mode 100644 forgejo-openapi/docs/CreatePullReviewComment.md create mode 100644 forgejo-openapi/docs/CreatePullReviewOptions.md create mode 100644 forgejo-openapi/docs/CreatePushMirrorOption.md create mode 100644 forgejo-openapi/docs/CreateQuotaGroupOptions.md create mode 100644 forgejo-openapi/docs/CreateQuotaRuleOptions.md create mode 100644 forgejo-openapi/docs/CreateReleaseOption.md create mode 100644 forgejo-openapi/docs/CreateRepoOption.md create mode 100644 forgejo-openapi/docs/CreateStatusOption.md create mode 100644 forgejo-openapi/docs/CreateTagOption.md create mode 100644 forgejo-openapi/docs/CreateTagProtectionOption.md create mode 100644 forgejo-openapi/docs/CreateTeamOption.md create mode 100644 forgejo-openapi/docs/CreateUserOption.md create mode 100644 forgejo-openapi/docs/CreateVariableOption.md create mode 100644 forgejo-openapi/docs/CreateWikiPageOptions.md create mode 100644 forgejo-openapi/docs/Cron.md create mode 100644 forgejo-openapi/docs/DeleteEmailOption.md create mode 100644 forgejo-openapi/docs/DeleteFileOptions.md create mode 100644 forgejo-openapi/docs/DeleteLabelsOption.md create mode 100644 forgejo-openapi/docs/DeployKey.md create mode 100644 forgejo-openapi/docs/DismissPullReviewOptions.md create mode 100644 forgejo-openapi/docs/DispatchWorkflowOption.md create mode 100644 forgejo-openapi/docs/DispatchWorkflowRun.md create mode 100644 forgejo-openapi/docs/EditAttachmentOptions.md create mode 100644 forgejo-openapi/docs/EditBranchProtectionOption.md create mode 100644 forgejo-openapi/docs/EditDeadlineOption.md create mode 100644 forgejo-openapi/docs/EditGitHookOption.md create mode 100644 forgejo-openapi/docs/EditHookOption.md create mode 100644 forgejo-openapi/docs/EditIssueCommentOption.md create mode 100644 forgejo-openapi/docs/EditIssueOption.md create mode 100644 forgejo-openapi/docs/EditLabelOption.md create mode 100644 forgejo-openapi/docs/EditMilestoneOption.md create mode 100644 forgejo-openapi/docs/EditOrgOption.md create mode 100644 forgejo-openapi/docs/EditPullRequestOption.md create mode 100644 forgejo-openapi/docs/EditQuotaRuleOptions.md create mode 100644 forgejo-openapi/docs/EditReactionOption.md create mode 100644 forgejo-openapi/docs/EditReleaseOption.md create mode 100644 forgejo-openapi/docs/EditRepoOption.md create mode 100644 forgejo-openapi/docs/EditTagProtectionOption.md create mode 100644 forgejo-openapi/docs/EditTeamOption.md create mode 100644 forgejo-openapi/docs/EditUserOption.md create mode 100644 forgejo-openapi/docs/Email.md create mode 100644 forgejo-openapi/docs/ExternalTracker.md create mode 100644 forgejo-openapi/docs/ExternalWiki.md create mode 100644 forgejo-openapi/docs/FileCommitResponse.md create mode 100644 forgejo-openapi/docs/FileDeleteResponse.md create mode 100644 forgejo-openapi/docs/FileLinksResponse.md create mode 100644 forgejo-openapi/docs/FileResponse.md create mode 100644 forgejo-openapi/docs/FilesResponse.md create mode 100644 forgejo-openapi/docs/GeneralApiSettings.md create mode 100644 forgejo-openapi/docs/GeneralAttachmentSettings.md create mode 100644 forgejo-openapi/docs/GeneralRepoSettings.md create mode 100644 forgejo-openapi/docs/GeneralUiSettings.md create mode 100644 forgejo-openapi/docs/GenerateRepoOption.md create mode 100644 forgejo-openapi/docs/GitBlob.md create mode 100644 forgejo-openapi/docs/GitEntry.md create mode 100644 forgejo-openapi/docs/GitHook.md create mode 100644 forgejo-openapi/docs/GitObject.md create mode 100644 forgejo-openapi/docs/GitTreeResponse.md create mode 100644 forgejo-openapi/docs/GitignoreTemplateInfo.md create mode 100644 forgejo-openapi/docs/GpgKey.md create mode 100644 forgejo-openapi/docs/GpgKeyEmail.md create mode 100644 forgejo-openapi/docs/Hook.md create mode 100644 forgejo-openapi/docs/Identity.md create mode 100644 forgejo-openapi/docs/InternalTracker.md create mode 100644 forgejo-openapi/docs/Issue.md create mode 100644 forgejo-openapi/docs/IssueApi.md create mode 100644 forgejo-openapi/docs/IssueConfig.md create mode 100644 forgejo-openapi/docs/IssueConfigContactLink.md create mode 100644 forgejo-openapi/docs/IssueConfigValidation.md create mode 100644 forgejo-openapi/docs/IssueDeadline.md create mode 100644 forgejo-openapi/docs/IssueFormField.md create mode 100644 forgejo-openapi/docs/IssueLabelsOption.md create mode 100644 forgejo-openapi/docs/IssueMeta.md create mode 100644 forgejo-openapi/docs/IssueTemplate.md create mode 100644 forgejo-openapi/docs/Label.md create mode 100644 forgejo-openapi/docs/LabelTemplate.md create mode 100644 forgejo-openapi/docs/LicenseTemplateInfo.md create mode 100644 forgejo-openapi/docs/LicensesTemplateListEntry.md create mode 100644 forgejo-openapi/docs/ListActionRunResponse.md create mode 100644 forgejo-openapi/docs/MarkdownOption.md create mode 100644 forgejo-openapi/docs/MarkupOption.md create mode 100644 forgejo-openapi/docs/MergePullRequestOption.md create mode 100644 forgejo-openapi/docs/MigrateRepoOptions.md create mode 100644 forgejo-openapi/docs/Milestone.md create mode 100644 forgejo-openapi/docs/MiscellaneousApi.md create mode 100644 forgejo-openapi/docs/NewIssuePinsAllowed.md create mode 100644 forgejo-openapi/docs/NodeInfo.md create mode 100644 forgejo-openapi/docs/NodeInfoServices.md create mode 100644 forgejo-openapi/docs/NodeInfoSoftware.md create mode 100644 forgejo-openapi/docs/NodeInfoUsage.md create mode 100644 forgejo-openapi/docs/NodeInfoUsageUsers.md create mode 100644 forgejo-openapi/docs/Note.md create mode 100644 forgejo-openapi/docs/NoteOptions.md create mode 100644 forgejo-openapi/docs/NotificationApi.md create mode 100644 forgejo-openapi/docs/NotificationCount.md create mode 100644 forgejo-openapi/docs/NotificationSubject.md create mode 100644 forgejo-openapi/docs/NotificationThread.md create mode 100644 forgejo-openapi/docs/OAuth2Application.md create mode 100644 forgejo-openapi/docs/Organization.md create mode 100644 forgejo-openapi/docs/OrganizationApi.md create mode 100644 forgejo-openapi/docs/OrganizationPermissions.md create mode 100644 forgejo-openapi/docs/Package.md create mode 100644 forgejo-openapi/docs/PackageApi.md create mode 100644 forgejo-openapi/docs/PackageFile.md create mode 100644 forgejo-openapi/docs/PayloadCommit.md create mode 100644 forgejo-openapi/docs/PayloadCommitVerification.md create mode 100644 forgejo-openapi/docs/PayloadUser.md create mode 100644 forgejo-openapi/docs/Permission.md create mode 100644 forgejo-openapi/docs/PrBranchInfo.md create mode 100644 forgejo-openapi/docs/PublicKey.md create mode 100644 forgejo-openapi/docs/PullRequest.md create mode 100644 forgejo-openapi/docs/PullRequestMeta.md create mode 100644 forgejo-openapi/docs/PullReview.md create mode 100644 forgejo-openapi/docs/PullReviewComment.md create mode 100644 forgejo-openapi/docs/PullReviewRequestOptions.md create mode 100644 forgejo-openapi/docs/PushMirror.md create mode 100644 forgejo-openapi/docs/QuotaGroup.md create mode 100644 forgejo-openapi/docs/QuotaInfo.md create mode 100644 forgejo-openapi/docs/QuotaRuleInfo.md create mode 100644 forgejo-openapi/docs/QuotaUsed.md create mode 100644 forgejo-openapi/docs/QuotaUsedArtifact.md create mode 100644 forgejo-openapi/docs/QuotaUsedAttachment.md create mode 100644 forgejo-openapi/docs/QuotaUsedAttachmentContainedIn.md create mode 100644 forgejo-openapi/docs/QuotaUsedPackage.md create mode 100644 forgejo-openapi/docs/QuotaUsedSize.md create mode 100644 forgejo-openapi/docs/QuotaUsedSizeAssets.md create mode 100644 forgejo-openapi/docs/QuotaUsedSizeAssetsAttachments.md create mode 100644 forgejo-openapi/docs/QuotaUsedSizeAssetsPackages.md create mode 100644 forgejo-openapi/docs/QuotaUsedSizeGit.md create mode 100644 forgejo-openapi/docs/QuotaUsedSizeRepos.md create mode 100644 forgejo-openapi/docs/Reaction.md create mode 100644 forgejo-openapi/docs/Reference.md create mode 100644 forgejo-openapi/docs/RegistrationToken.md create mode 100644 forgejo-openapi/docs/Release.md create mode 100644 forgejo-openapi/docs/RenameOrgOption.md create mode 100644 forgejo-openapi/docs/RenameUserOption.md create mode 100644 forgejo-openapi/docs/ReplaceFlagsOption.md create mode 100644 forgejo-openapi/docs/RepoCollaboratorPermission.md create mode 100644 forgejo-openapi/docs/RepoCommit.md create mode 100644 forgejo-openapi/docs/RepoCreateReleaseAttachmentRequest.md create mode 100644 forgejo-openapi/docs/RepoTopicOptions.md create mode 100644 forgejo-openapi/docs/RepoTransfer.md create mode 100644 forgejo-openapi/docs/Repository.md create mode 100644 forgejo-openapi/docs/RepositoryApi.md create mode 100644 forgejo-openapi/docs/RepositoryMeta.md create mode 100644 forgejo-openapi/docs/SearchResults.md create mode 100644 forgejo-openapi/docs/Secret.md create mode 100644 forgejo-openapi/docs/ServerVersion.md create mode 100644 forgejo-openapi/docs/SetUserQuotaGroupsOptions.md create mode 100644 forgejo-openapi/docs/SettingsApi.md create mode 100644 forgejo-openapi/docs/StopWatch.md create mode 100644 forgejo-openapi/docs/SubmitPullReviewOptions.md create mode 100644 forgejo-openapi/docs/SyncForkInfo.md create mode 100644 forgejo-openapi/docs/Tag.md create mode 100644 forgejo-openapi/docs/TagArchiveDownloadCount.md create mode 100644 forgejo-openapi/docs/TagProtection.md create mode 100644 forgejo-openapi/docs/Team.md create mode 100644 forgejo-openapi/docs/TeamSearchResults.md create mode 100644 forgejo-openapi/docs/TimelineComment.md create mode 100644 forgejo-openapi/docs/TopicName.md create mode 100644 forgejo-openapi/docs/TopicResponse.md create mode 100644 forgejo-openapi/docs/TopicSearchResults.md create mode 100644 forgejo-openapi/docs/TrackedTime.md create mode 100644 forgejo-openapi/docs/TransferRepoOption.md create mode 100644 forgejo-openapi/docs/UpdateBranchRepoOption.md create mode 100644 forgejo-openapi/docs/UpdateFileOptions.md create mode 100644 forgejo-openapi/docs/UpdateRepoAvatarOption.md create mode 100644 forgejo-openapi/docs/UpdateUserAvatarOption.md create mode 100644 forgejo-openapi/docs/UpdateVariableOption.md create mode 100644 forgejo-openapi/docs/User.md create mode 100644 forgejo-openapi/docs/UserApi.md create mode 100644 forgejo-openapi/docs/UserHeatmapData.md create mode 100644 forgejo-openapi/docs/UserSearchResults.md create mode 100644 forgejo-openapi/docs/UserSettings.md create mode 100644 forgejo-openapi/docs/UserSettingsOptions.md create mode 100644 forgejo-openapi/docs/VerifyGpgKeyOption.md create mode 100644 forgejo-openapi/docs/WatchInfo.md create mode 100644 forgejo-openapi/docs/WikiCommit.md create mode 100644 forgejo-openapi/docs/WikiCommitList.md create mode 100644 forgejo-openapi/docs/WikiPage.md create mode 100644 forgejo-openapi/docs/WikiPageMetaData.md create mode 100644 forgejo-openapi/git_push.sh create mode 100644 forgejo-openapi/src/apis/activitypub_api.rs create mode 100644 forgejo-openapi/src/apis/admin_api.rs create mode 100644 forgejo-openapi/src/apis/configuration.rs create mode 100644 forgejo-openapi/src/apis/issue_api.rs create mode 100644 forgejo-openapi/src/apis/miscellaneous_api.rs create mode 100644 forgejo-openapi/src/apis/mod.rs create mode 100644 forgejo-openapi/src/apis/notification_api.rs create mode 100644 forgejo-openapi/src/apis/organization_api.rs create mode 100644 forgejo-openapi/src/apis/package_api.rs create mode 100644 forgejo-openapi/src/apis/repository_api.rs create mode 100644 forgejo-openapi/src/apis/settings_api.rs create mode 100644 forgejo-openapi/src/apis/user_api.rs create mode 100644 forgejo-openapi/src/lib.rs create mode 100644 forgejo-openapi/src/models/access_token.rs create mode 100644 forgejo-openapi/src/models/action_run.rs create mode 100644 forgejo-openapi/src/models/action_run_job.rs create mode 100644 forgejo-openapi/src/models/action_task.rs create mode 100644 forgejo-openapi/src/models/action_task_response.rs create mode 100644 forgejo-openapi/src/models/action_variable.rs create mode 100644 forgejo-openapi/src/models/activity.rs create mode 100644 forgejo-openapi/src/models/activity_pub.rs create mode 100644 forgejo-openapi/src/models/add_collaborator_option.rs create mode 100644 forgejo-openapi/src/models/add_time_option.rs create mode 100644 forgejo-openapi/src/models/annotated_tag.rs create mode 100644 forgejo-openapi/src/models/annotated_tag_object.rs create mode 100644 forgejo-openapi/src/models/api_error.rs create mode 100644 forgejo-openapi/src/models/api_forbidden_error.rs create mode 100644 forgejo-openapi/src/models/api_internal_server_error.rs create mode 100644 forgejo-openapi/src/models/api_invalid_topics_error.rs create mode 100644 forgejo-openapi/src/models/api_not_found.rs create mode 100644 forgejo-openapi/src/models/api_repo_archived_error.rs create mode 100644 forgejo-openapi/src/models/api_unauthorized_error.rs create mode 100644 forgejo-openapi/src/models/api_validation_error.rs create mode 100644 forgejo-openapi/src/models/attachment.rs create mode 100644 forgejo-openapi/src/models/blocked_user.rs create mode 100644 forgejo-openapi/src/models/branch.rs create mode 100644 forgejo-openapi/src/models/branch_protection.rs create mode 100644 forgejo-openapi/src/models/change_file_operation.rs create mode 100644 forgejo-openapi/src/models/change_files_options.rs create mode 100644 forgejo-openapi/src/models/changed_file.rs create mode 100644 forgejo-openapi/src/models/combined_status.rs create mode 100644 forgejo-openapi/src/models/comment.rs create mode 100644 forgejo-openapi/src/models/commit.rs create mode 100644 forgejo-openapi/src/models/commit_affected_files.rs create mode 100644 forgejo-openapi/src/models/commit_date_options.rs create mode 100644 forgejo-openapi/src/models/commit_meta.rs create mode 100644 forgejo-openapi/src/models/commit_stats.rs create mode 100644 forgejo-openapi/src/models/commit_status.rs create mode 100644 forgejo-openapi/src/models/commit_user.rs create mode 100644 forgejo-openapi/src/models/compare.rs create mode 100644 forgejo-openapi/src/models/contents_response.rs create mode 100644 forgejo-openapi/src/models/create_access_token_option.rs create mode 100644 forgejo-openapi/src/models/create_branch_protection_option.rs create mode 100644 forgejo-openapi/src/models/create_branch_repo_option.rs create mode 100644 forgejo-openapi/src/models/create_email_option.rs create mode 100644 forgejo-openapi/src/models/create_file_options.rs create mode 100644 forgejo-openapi/src/models/create_fork_option.rs create mode 100644 forgejo-openapi/src/models/create_gpg_key_option.rs create mode 100644 forgejo-openapi/src/models/create_hook_option.rs create mode 100644 forgejo-openapi/src/models/create_issue_comment_option.rs create mode 100644 forgejo-openapi/src/models/create_issue_option.rs create mode 100644 forgejo-openapi/src/models/create_key_option.rs create mode 100644 forgejo-openapi/src/models/create_label_option.rs create mode 100644 forgejo-openapi/src/models/create_milestone_option.rs create mode 100644 forgejo-openapi/src/models/create_o_auth2_application_options.rs create mode 100644 forgejo-openapi/src/models/create_or_update_secret_option.rs create mode 100644 forgejo-openapi/src/models/create_org_option.rs create mode 100644 forgejo-openapi/src/models/create_pull_request_option.rs create mode 100644 forgejo-openapi/src/models/create_pull_review_comment.rs create mode 100644 forgejo-openapi/src/models/create_pull_review_options.rs create mode 100644 forgejo-openapi/src/models/create_push_mirror_option.rs create mode 100644 forgejo-openapi/src/models/create_quota_group_options.rs create mode 100644 forgejo-openapi/src/models/create_quota_rule_options.rs create mode 100644 forgejo-openapi/src/models/create_release_option.rs create mode 100644 forgejo-openapi/src/models/create_repo_option.rs create mode 100644 forgejo-openapi/src/models/create_status_option.rs create mode 100644 forgejo-openapi/src/models/create_tag_option.rs create mode 100644 forgejo-openapi/src/models/create_tag_protection_option.rs create mode 100644 forgejo-openapi/src/models/create_team_option.rs create mode 100644 forgejo-openapi/src/models/create_user_option.rs create mode 100644 forgejo-openapi/src/models/create_variable_option.rs create mode 100644 forgejo-openapi/src/models/create_wiki_page_options.rs create mode 100644 forgejo-openapi/src/models/cron.rs create mode 100644 forgejo-openapi/src/models/delete_email_option.rs create mode 100644 forgejo-openapi/src/models/delete_file_options.rs create mode 100644 forgejo-openapi/src/models/delete_labels_option.rs create mode 100644 forgejo-openapi/src/models/deploy_key.rs create mode 100644 forgejo-openapi/src/models/dismiss_pull_review_options.rs create mode 100644 forgejo-openapi/src/models/dispatch_workflow_option.rs create mode 100644 forgejo-openapi/src/models/dispatch_workflow_run.rs create mode 100644 forgejo-openapi/src/models/edit_attachment_options.rs create mode 100644 forgejo-openapi/src/models/edit_branch_protection_option.rs create mode 100644 forgejo-openapi/src/models/edit_deadline_option.rs create mode 100644 forgejo-openapi/src/models/edit_git_hook_option.rs create mode 100644 forgejo-openapi/src/models/edit_hook_option.rs create mode 100644 forgejo-openapi/src/models/edit_issue_comment_option.rs create mode 100644 forgejo-openapi/src/models/edit_issue_option.rs create mode 100644 forgejo-openapi/src/models/edit_label_option.rs create mode 100644 forgejo-openapi/src/models/edit_milestone_option.rs create mode 100644 forgejo-openapi/src/models/edit_org_option.rs create mode 100644 forgejo-openapi/src/models/edit_pull_request_option.rs create mode 100644 forgejo-openapi/src/models/edit_quota_rule_options.rs create mode 100644 forgejo-openapi/src/models/edit_reaction_option.rs create mode 100644 forgejo-openapi/src/models/edit_release_option.rs create mode 100644 forgejo-openapi/src/models/edit_repo_option.rs create mode 100644 forgejo-openapi/src/models/edit_tag_protection_option.rs create mode 100644 forgejo-openapi/src/models/edit_team_option.rs create mode 100644 forgejo-openapi/src/models/edit_user_option.rs create mode 100644 forgejo-openapi/src/models/email.rs create mode 100644 forgejo-openapi/src/models/external_tracker.rs create mode 100644 forgejo-openapi/src/models/external_wiki.rs create mode 100644 forgejo-openapi/src/models/file_commit_response.rs create mode 100644 forgejo-openapi/src/models/file_delete_response.rs create mode 100644 forgejo-openapi/src/models/file_links_response.rs create mode 100644 forgejo-openapi/src/models/file_response.rs create mode 100644 forgejo-openapi/src/models/files_response.rs create mode 100644 forgejo-openapi/src/models/general_api_settings.rs create mode 100644 forgejo-openapi/src/models/general_attachment_settings.rs create mode 100644 forgejo-openapi/src/models/general_repo_settings.rs create mode 100644 forgejo-openapi/src/models/general_ui_settings.rs create mode 100644 forgejo-openapi/src/models/generate_repo_option.rs create mode 100644 forgejo-openapi/src/models/git_blob.rs create mode 100644 forgejo-openapi/src/models/git_entry.rs create mode 100644 forgejo-openapi/src/models/git_hook.rs create mode 100644 forgejo-openapi/src/models/git_object.rs create mode 100644 forgejo-openapi/src/models/git_tree_response.rs create mode 100644 forgejo-openapi/src/models/gitignore_template_info.rs create mode 100644 forgejo-openapi/src/models/gpg_key.rs create mode 100644 forgejo-openapi/src/models/gpg_key_email.rs create mode 100644 forgejo-openapi/src/models/hook.rs create mode 100644 forgejo-openapi/src/models/identity.rs create mode 100644 forgejo-openapi/src/models/internal_tracker.rs create mode 100644 forgejo-openapi/src/models/issue.rs create mode 100644 forgejo-openapi/src/models/issue_config.rs create mode 100644 forgejo-openapi/src/models/issue_config_contact_link.rs create mode 100644 forgejo-openapi/src/models/issue_config_validation.rs create mode 100644 forgejo-openapi/src/models/issue_deadline.rs create mode 100644 forgejo-openapi/src/models/issue_form_field.rs create mode 100644 forgejo-openapi/src/models/issue_labels_option.rs create mode 100644 forgejo-openapi/src/models/issue_meta.rs create mode 100644 forgejo-openapi/src/models/issue_template.rs create mode 100644 forgejo-openapi/src/models/label.rs create mode 100644 forgejo-openapi/src/models/label_template.rs create mode 100644 forgejo-openapi/src/models/license_template_info.rs create mode 100644 forgejo-openapi/src/models/licenses_template_list_entry.rs create mode 100644 forgejo-openapi/src/models/list_action_run_response.rs create mode 100644 forgejo-openapi/src/models/markdown_option.rs create mode 100644 forgejo-openapi/src/models/markup_option.rs create mode 100644 forgejo-openapi/src/models/merge_pull_request_option.rs create mode 100644 forgejo-openapi/src/models/migrate_repo_options.rs create mode 100644 forgejo-openapi/src/models/milestone.rs create mode 100644 forgejo-openapi/src/models/mod.rs create mode 100644 forgejo-openapi/src/models/new_issue_pins_allowed.rs create mode 100644 forgejo-openapi/src/models/node_info.rs create mode 100644 forgejo-openapi/src/models/node_info_services.rs create mode 100644 forgejo-openapi/src/models/node_info_software.rs create mode 100644 forgejo-openapi/src/models/node_info_usage.rs create mode 100644 forgejo-openapi/src/models/node_info_usage_users.rs create mode 100644 forgejo-openapi/src/models/note.rs create mode 100644 forgejo-openapi/src/models/note_options.rs create mode 100644 forgejo-openapi/src/models/notification_count.rs create mode 100644 forgejo-openapi/src/models/notification_subject.rs create mode 100644 forgejo-openapi/src/models/notification_thread.rs create mode 100644 forgejo-openapi/src/models/o_auth2_application.rs create mode 100644 forgejo-openapi/src/models/organization.rs create mode 100644 forgejo-openapi/src/models/organization_permissions.rs create mode 100644 forgejo-openapi/src/models/package.rs create mode 100644 forgejo-openapi/src/models/package_file.rs create mode 100644 forgejo-openapi/src/models/payload_commit.rs create mode 100644 forgejo-openapi/src/models/payload_commit_verification.rs create mode 100644 forgejo-openapi/src/models/payload_user.rs create mode 100644 forgejo-openapi/src/models/permission.rs create mode 100644 forgejo-openapi/src/models/pr_branch_info.rs create mode 100644 forgejo-openapi/src/models/public_key.rs create mode 100644 forgejo-openapi/src/models/pull_request.rs create mode 100644 forgejo-openapi/src/models/pull_request_meta.rs create mode 100644 forgejo-openapi/src/models/pull_review.rs create mode 100644 forgejo-openapi/src/models/pull_review_comment.rs create mode 100644 forgejo-openapi/src/models/pull_review_request_options.rs create mode 100644 forgejo-openapi/src/models/push_mirror.rs create mode 100644 forgejo-openapi/src/models/quota_group.rs create mode 100644 forgejo-openapi/src/models/quota_info.rs create mode 100644 forgejo-openapi/src/models/quota_rule_info.rs create mode 100644 forgejo-openapi/src/models/quota_used.rs create mode 100644 forgejo-openapi/src/models/quota_used_artifact.rs create mode 100644 forgejo-openapi/src/models/quota_used_attachment.rs create mode 100644 forgejo-openapi/src/models/quota_used_attachment_contained_in.rs create mode 100644 forgejo-openapi/src/models/quota_used_package.rs create mode 100644 forgejo-openapi/src/models/quota_used_size.rs create mode 100644 forgejo-openapi/src/models/quota_used_size_assets.rs create mode 100644 forgejo-openapi/src/models/quota_used_size_assets_attachments.rs create mode 100644 forgejo-openapi/src/models/quota_used_size_assets_packages.rs create mode 100644 forgejo-openapi/src/models/quota_used_size_git.rs create mode 100644 forgejo-openapi/src/models/quota_used_size_repos.rs create mode 100644 forgejo-openapi/src/models/reaction.rs create mode 100644 forgejo-openapi/src/models/reference.rs create mode 100644 forgejo-openapi/src/models/registration_token.rs create mode 100644 forgejo-openapi/src/models/release.rs create mode 100644 forgejo-openapi/src/models/rename_org_option.rs create mode 100644 forgejo-openapi/src/models/rename_user_option.rs create mode 100644 forgejo-openapi/src/models/replace_flags_option.rs create mode 100644 forgejo-openapi/src/models/repo_collaborator_permission.rs create mode 100644 forgejo-openapi/src/models/repo_commit.rs create mode 100644 forgejo-openapi/src/models/repo_create_release_attachment_request.rs create mode 100644 forgejo-openapi/src/models/repo_topic_options.rs create mode 100644 forgejo-openapi/src/models/repo_transfer.rs create mode 100644 forgejo-openapi/src/models/repository.rs create mode 100644 forgejo-openapi/src/models/repository_meta.rs create mode 100644 forgejo-openapi/src/models/search_results.rs create mode 100644 forgejo-openapi/src/models/secret.rs create mode 100644 forgejo-openapi/src/models/server_version.rs create mode 100644 forgejo-openapi/src/models/set_user_quota_groups_options.rs create mode 100644 forgejo-openapi/src/models/stop_watch.rs create mode 100644 forgejo-openapi/src/models/submit_pull_review_options.rs create mode 100644 forgejo-openapi/src/models/sync_fork_info.rs create mode 100644 forgejo-openapi/src/models/tag.rs create mode 100644 forgejo-openapi/src/models/tag_archive_download_count.rs create mode 100644 forgejo-openapi/src/models/tag_protection.rs create mode 100644 forgejo-openapi/src/models/team.rs create mode 100644 forgejo-openapi/src/models/team_search_results.rs create mode 100644 forgejo-openapi/src/models/timeline_comment.rs create mode 100644 forgejo-openapi/src/models/topic_name.rs create mode 100644 forgejo-openapi/src/models/topic_response.rs create mode 100644 forgejo-openapi/src/models/topic_search_results.rs create mode 100644 forgejo-openapi/src/models/tracked_time.rs create mode 100644 forgejo-openapi/src/models/transfer_repo_option.rs create mode 100644 forgejo-openapi/src/models/update_branch_repo_option.rs create mode 100644 forgejo-openapi/src/models/update_file_options.rs create mode 100644 forgejo-openapi/src/models/update_repo_avatar_option.rs create mode 100644 forgejo-openapi/src/models/update_user_avatar_option.rs create mode 100644 forgejo-openapi/src/models/update_variable_option.rs create mode 100644 forgejo-openapi/src/models/user.rs create mode 100644 forgejo-openapi/src/models/user_heatmap_data.rs create mode 100644 forgejo-openapi/src/models/user_search_results.rs create mode 100644 forgejo-openapi/src/models/user_settings.rs create mode 100644 forgejo-openapi/src/models/user_settings_options.rs create mode 100644 forgejo-openapi/src/models/verify_gpg_key_option.rs create mode 100644 forgejo-openapi/src/models/watch_info.rs create mode 100644 forgejo-openapi/src/models/wiki_commit.rs create mode 100644 forgejo-openapi/src/models/wiki_commit_list.rs create mode 100644 forgejo-openapi/src/models/wiki_page.rs create mode 100644 forgejo-openapi/src/models/wiki_page_meta_data.rs create mode 100644 forgejo-openapi/swagger.v1.json diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..44c49c1 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,3 @@ +[workspace] +resolver = "3" +members = [ "forgejo-openapi" ] diff --git a/forgejo-openapi/.gitignore b/forgejo-openapi/.gitignore new file mode 100644 index 0000000..6aa1064 --- /dev/null +++ b/forgejo-openapi/.gitignore @@ -0,0 +1,3 @@ +/target/ +**/*.rs.bk +Cargo.lock diff --git a/forgejo-openapi/.openapi-generator-ignore b/forgejo-openapi/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/forgejo-openapi/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/forgejo-openapi/.openapi-generator/FILES b/forgejo-openapi/.openapi-generator/FILES new file mode 100644 index 0000000..fc63240 --- /dev/null +++ b/forgejo-openapi/.openapi-generator/FILES @@ -0,0 +1,486 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +Cargo.toml +README.md +docs/AccessToken.md +docs/ActionRun.md +docs/ActionRunJob.md +docs/ActionTask.md +docs/ActionTaskResponse.md +docs/ActionVariable.md +docs/Activity.md +docs/ActivityPub.md +docs/ActivitypubApi.md +docs/AddCollaboratorOption.md +docs/AddTimeOption.md +docs/AdminApi.md +docs/AnnotatedTag.md +docs/AnnotatedTagObject.md +docs/ApiError.md +docs/ApiForbiddenError.md +docs/ApiInternalServerError.md +docs/ApiInvalidTopicsError.md +docs/ApiNotFound.md +docs/ApiRepoArchivedError.md +docs/ApiUnauthorizedError.md +docs/ApiValidationError.md +docs/Attachment.md +docs/BlockedUser.md +docs/Branch.md +docs/BranchProtection.md +docs/ChangeFileOperation.md +docs/ChangeFilesOptions.md +docs/ChangedFile.md +docs/CombinedStatus.md +docs/Comment.md +docs/Commit.md +docs/CommitAffectedFiles.md +docs/CommitDateOptions.md +docs/CommitMeta.md +docs/CommitStats.md +docs/CommitStatus.md +docs/CommitUser.md +docs/Compare.md +docs/ContentsResponse.md +docs/CreateAccessTokenOption.md +docs/CreateBranchProtectionOption.md +docs/CreateBranchRepoOption.md +docs/CreateEmailOption.md +docs/CreateFileOptions.md +docs/CreateForkOption.md +docs/CreateGpgKeyOption.md +docs/CreateHookOption.md +docs/CreateIssueCommentOption.md +docs/CreateIssueOption.md +docs/CreateKeyOption.md +docs/CreateLabelOption.md +docs/CreateMilestoneOption.md +docs/CreateOAuth2ApplicationOptions.md +docs/CreateOrUpdateSecretOption.md +docs/CreateOrgOption.md +docs/CreatePullRequestOption.md +docs/CreatePullReviewComment.md +docs/CreatePullReviewOptions.md +docs/CreatePushMirrorOption.md +docs/CreateQuotaGroupOptions.md +docs/CreateQuotaRuleOptions.md +docs/CreateReleaseOption.md +docs/CreateRepoOption.md +docs/CreateStatusOption.md +docs/CreateTagOption.md +docs/CreateTagProtectionOption.md +docs/CreateTeamOption.md +docs/CreateUserOption.md +docs/CreateVariableOption.md +docs/CreateWikiPageOptions.md +docs/Cron.md +docs/DeleteEmailOption.md +docs/DeleteFileOptions.md +docs/DeleteLabelsOption.md +docs/DeployKey.md +docs/DismissPullReviewOptions.md +docs/DispatchWorkflowOption.md +docs/DispatchWorkflowRun.md +docs/EditAttachmentOptions.md +docs/EditBranchProtectionOption.md +docs/EditDeadlineOption.md +docs/EditGitHookOption.md +docs/EditHookOption.md +docs/EditIssueCommentOption.md +docs/EditIssueOption.md +docs/EditLabelOption.md +docs/EditMilestoneOption.md +docs/EditOrgOption.md +docs/EditPullRequestOption.md +docs/EditQuotaRuleOptions.md +docs/EditReactionOption.md +docs/EditReleaseOption.md +docs/EditRepoOption.md +docs/EditTagProtectionOption.md +docs/EditTeamOption.md +docs/EditUserOption.md +docs/Email.md +docs/ExternalTracker.md +docs/ExternalWiki.md +docs/FileCommitResponse.md +docs/FileDeleteResponse.md +docs/FileLinksResponse.md +docs/FileResponse.md +docs/FilesResponse.md +docs/GeneralApiSettings.md +docs/GeneralAttachmentSettings.md +docs/GeneralRepoSettings.md +docs/GeneralUiSettings.md +docs/GenerateRepoOption.md +docs/GitBlob.md +docs/GitEntry.md +docs/GitHook.md +docs/GitObject.md +docs/GitTreeResponse.md +docs/GitignoreTemplateInfo.md +docs/GpgKey.md +docs/GpgKeyEmail.md +docs/Hook.md +docs/Identity.md +docs/InternalTracker.md +docs/Issue.md +docs/IssueApi.md +docs/IssueConfig.md +docs/IssueConfigContactLink.md +docs/IssueConfigValidation.md +docs/IssueDeadline.md +docs/IssueFormField.md +docs/IssueLabelsOption.md +docs/IssueMeta.md +docs/IssueTemplate.md +docs/Label.md +docs/LabelTemplate.md +docs/LicenseTemplateInfo.md +docs/LicensesTemplateListEntry.md +docs/ListActionRunResponse.md +docs/MarkdownOption.md +docs/MarkupOption.md +docs/MergePullRequestOption.md +docs/MigrateRepoOptions.md +docs/Milestone.md +docs/MiscellaneousApi.md +docs/NewIssuePinsAllowed.md +docs/NodeInfo.md +docs/NodeInfoServices.md +docs/NodeInfoSoftware.md +docs/NodeInfoUsage.md +docs/NodeInfoUsageUsers.md +docs/Note.md +docs/NoteOptions.md +docs/NotificationApi.md +docs/NotificationCount.md +docs/NotificationSubject.md +docs/NotificationThread.md +docs/OAuth2Application.md +docs/Organization.md +docs/OrganizationApi.md +docs/OrganizationPermissions.md +docs/Package.md +docs/PackageApi.md +docs/PackageFile.md +docs/PayloadCommit.md +docs/PayloadCommitVerification.md +docs/PayloadUser.md +docs/Permission.md +docs/PrBranchInfo.md +docs/PublicKey.md +docs/PullRequest.md +docs/PullRequestMeta.md +docs/PullReview.md +docs/PullReviewComment.md +docs/PullReviewRequestOptions.md +docs/PushMirror.md +docs/QuotaGroup.md +docs/QuotaInfo.md +docs/QuotaRuleInfo.md +docs/QuotaUsed.md +docs/QuotaUsedArtifact.md +docs/QuotaUsedAttachment.md +docs/QuotaUsedAttachmentContainedIn.md +docs/QuotaUsedPackage.md +docs/QuotaUsedSize.md +docs/QuotaUsedSizeAssets.md +docs/QuotaUsedSizeAssetsAttachments.md +docs/QuotaUsedSizeAssetsPackages.md +docs/QuotaUsedSizeGit.md +docs/QuotaUsedSizeRepos.md +docs/Reaction.md +docs/Reference.md +docs/RegistrationToken.md +docs/Release.md +docs/RenameOrgOption.md +docs/RenameUserOption.md +docs/ReplaceFlagsOption.md +docs/RepoCollaboratorPermission.md +docs/RepoCommit.md +docs/RepoCreateReleaseAttachmentRequest.md +docs/RepoTopicOptions.md +docs/RepoTransfer.md +docs/Repository.md +docs/RepositoryApi.md +docs/RepositoryMeta.md +docs/SearchResults.md +docs/Secret.md +docs/ServerVersion.md +docs/SetUserQuotaGroupsOptions.md +docs/SettingsApi.md +docs/StopWatch.md +docs/SubmitPullReviewOptions.md +docs/SyncForkInfo.md +docs/Tag.md +docs/TagArchiveDownloadCount.md +docs/TagProtection.md +docs/Team.md +docs/TeamSearchResults.md +docs/TimelineComment.md +docs/TopicName.md +docs/TopicResponse.md +docs/TopicSearchResults.md +docs/TrackedTime.md +docs/TransferRepoOption.md +docs/UpdateBranchRepoOption.md +docs/UpdateFileOptions.md +docs/UpdateRepoAvatarOption.md +docs/UpdateUserAvatarOption.md +docs/UpdateVariableOption.md +docs/User.md +docs/UserApi.md +docs/UserHeatmapData.md +docs/UserSearchResults.md +docs/UserSettings.md +docs/UserSettingsOptions.md +docs/VerifyGpgKeyOption.md +docs/WatchInfo.md +docs/WikiCommit.md +docs/WikiCommitList.md +docs/WikiPage.md +docs/WikiPageMetaData.md +git_push.sh +src/apis/activitypub_api.rs +src/apis/admin_api.rs +src/apis/configuration.rs +src/apis/issue_api.rs +src/apis/miscellaneous_api.rs +src/apis/mod.rs +src/apis/notification_api.rs +src/apis/organization_api.rs +src/apis/package_api.rs +src/apis/repository_api.rs +src/apis/settings_api.rs +src/apis/user_api.rs +src/lib.rs +src/models/access_token.rs +src/models/action_run.rs +src/models/action_run_job.rs +src/models/action_task.rs +src/models/action_task_response.rs +src/models/action_variable.rs +src/models/activity.rs +src/models/activity_pub.rs +src/models/add_collaborator_option.rs +src/models/add_time_option.rs +src/models/annotated_tag.rs +src/models/annotated_tag_object.rs +src/models/api_error.rs +src/models/api_forbidden_error.rs +src/models/api_internal_server_error.rs +src/models/api_invalid_topics_error.rs +src/models/api_not_found.rs +src/models/api_repo_archived_error.rs +src/models/api_unauthorized_error.rs +src/models/api_validation_error.rs +src/models/attachment.rs +src/models/blocked_user.rs +src/models/branch.rs +src/models/branch_protection.rs +src/models/change_file_operation.rs +src/models/change_files_options.rs +src/models/changed_file.rs +src/models/combined_status.rs +src/models/comment.rs +src/models/commit.rs +src/models/commit_affected_files.rs +src/models/commit_date_options.rs +src/models/commit_meta.rs +src/models/commit_stats.rs +src/models/commit_status.rs +src/models/commit_user.rs +src/models/compare.rs +src/models/contents_response.rs +src/models/create_access_token_option.rs +src/models/create_branch_protection_option.rs +src/models/create_branch_repo_option.rs +src/models/create_email_option.rs +src/models/create_file_options.rs +src/models/create_fork_option.rs +src/models/create_gpg_key_option.rs +src/models/create_hook_option.rs +src/models/create_issue_comment_option.rs +src/models/create_issue_option.rs +src/models/create_key_option.rs +src/models/create_label_option.rs +src/models/create_milestone_option.rs +src/models/create_o_auth2_application_options.rs +src/models/create_or_update_secret_option.rs +src/models/create_org_option.rs +src/models/create_pull_request_option.rs +src/models/create_pull_review_comment.rs +src/models/create_pull_review_options.rs +src/models/create_push_mirror_option.rs +src/models/create_quota_group_options.rs +src/models/create_quota_rule_options.rs +src/models/create_release_option.rs +src/models/create_repo_option.rs +src/models/create_status_option.rs +src/models/create_tag_option.rs +src/models/create_tag_protection_option.rs +src/models/create_team_option.rs +src/models/create_user_option.rs +src/models/create_variable_option.rs +src/models/create_wiki_page_options.rs +src/models/cron.rs +src/models/delete_email_option.rs +src/models/delete_file_options.rs +src/models/delete_labels_option.rs +src/models/deploy_key.rs +src/models/dismiss_pull_review_options.rs +src/models/dispatch_workflow_option.rs +src/models/dispatch_workflow_run.rs +src/models/edit_attachment_options.rs +src/models/edit_branch_protection_option.rs +src/models/edit_deadline_option.rs +src/models/edit_git_hook_option.rs +src/models/edit_hook_option.rs +src/models/edit_issue_comment_option.rs +src/models/edit_issue_option.rs +src/models/edit_label_option.rs +src/models/edit_milestone_option.rs +src/models/edit_org_option.rs +src/models/edit_pull_request_option.rs +src/models/edit_quota_rule_options.rs +src/models/edit_reaction_option.rs +src/models/edit_release_option.rs +src/models/edit_repo_option.rs +src/models/edit_tag_protection_option.rs +src/models/edit_team_option.rs +src/models/edit_user_option.rs +src/models/email.rs +src/models/external_tracker.rs +src/models/external_wiki.rs +src/models/file_commit_response.rs +src/models/file_delete_response.rs +src/models/file_links_response.rs +src/models/file_response.rs +src/models/files_response.rs +src/models/general_api_settings.rs +src/models/general_attachment_settings.rs +src/models/general_repo_settings.rs +src/models/general_ui_settings.rs +src/models/generate_repo_option.rs +src/models/git_blob.rs +src/models/git_entry.rs +src/models/git_hook.rs +src/models/git_object.rs +src/models/git_tree_response.rs +src/models/gitignore_template_info.rs +src/models/gpg_key.rs +src/models/gpg_key_email.rs +src/models/hook.rs +src/models/identity.rs +src/models/internal_tracker.rs +src/models/issue.rs +src/models/issue_config.rs +src/models/issue_config_contact_link.rs +src/models/issue_config_validation.rs +src/models/issue_deadline.rs +src/models/issue_form_field.rs +src/models/issue_labels_option.rs +src/models/issue_meta.rs +src/models/issue_template.rs +src/models/label.rs +src/models/label_template.rs +src/models/license_template_info.rs +src/models/licenses_template_list_entry.rs +src/models/list_action_run_response.rs +src/models/markdown_option.rs +src/models/markup_option.rs +src/models/merge_pull_request_option.rs +src/models/migrate_repo_options.rs +src/models/milestone.rs +src/models/mod.rs +src/models/new_issue_pins_allowed.rs +src/models/node_info.rs +src/models/node_info_services.rs +src/models/node_info_software.rs +src/models/node_info_usage.rs +src/models/node_info_usage_users.rs +src/models/note.rs +src/models/note_options.rs +src/models/notification_count.rs +src/models/notification_subject.rs +src/models/notification_thread.rs +src/models/o_auth2_application.rs +src/models/organization.rs +src/models/organization_permissions.rs +src/models/package.rs +src/models/package_file.rs +src/models/payload_commit.rs +src/models/payload_commit_verification.rs +src/models/payload_user.rs +src/models/permission.rs +src/models/pr_branch_info.rs +src/models/public_key.rs +src/models/pull_request.rs +src/models/pull_request_meta.rs +src/models/pull_review.rs +src/models/pull_review_comment.rs +src/models/pull_review_request_options.rs +src/models/push_mirror.rs +src/models/quota_group.rs +src/models/quota_info.rs +src/models/quota_rule_info.rs +src/models/quota_used.rs +src/models/quota_used_artifact.rs +src/models/quota_used_attachment.rs +src/models/quota_used_attachment_contained_in.rs +src/models/quota_used_package.rs +src/models/quota_used_size.rs +src/models/quota_used_size_assets.rs +src/models/quota_used_size_assets_attachments.rs +src/models/quota_used_size_assets_packages.rs +src/models/quota_used_size_git.rs +src/models/quota_used_size_repos.rs +src/models/reaction.rs +src/models/reference.rs +src/models/registration_token.rs +src/models/release.rs +src/models/rename_org_option.rs +src/models/rename_user_option.rs +src/models/replace_flags_option.rs +src/models/repo_collaborator_permission.rs +src/models/repo_commit.rs +src/models/repo_create_release_attachment_request.rs +src/models/repo_topic_options.rs +src/models/repo_transfer.rs +src/models/repository.rs +src/models/repository_meta.rs +src/models/search_results.rs +src/models/secret.rs +src/models/server_version.rs +src/models/set_user_quota_groups_options.rs +src/models/stop_watch.rs +src/models/submit_pull_review_options.rs +src/models/sync_fork_info.rs +src/models/tag.rs +src/models/tag_archive_download_count.rs +src/models/tag_protection.rs +src/models/team.rs +src/models/team_search_results.rs +src/models/timeline_comment.rs +src/models/topic_name.rs +src/models/topic_response.rs +src/models/topic_search_results.rs +src/models/tracked_time.rs +src/models/transfer_repo_option.rs +src/models/update_branch_repo_option.rs +src/models/update_file_options.rs +src/models/update_repo_avatar_option.rs +src/models/update_user_avatar_option.rs +src/models/update_variable_option.rs +src/models/user.rs +src/models/user_heatmap_data.rs +src/models/user_search_results.rs +src/models/user_settings.rs +src/models/user_settings_options.rs +src/models/verify_gpg_key_option.rs +src/models/watch_info.rs +src/models/wiki_commit.rs +src/models/wiki_commit_list.rs +src/models/wiki_page.rs +src/models/wiki_page_meta_data.rs diff --git a/forgejo-openapi/.openapi-generator/VERSION b/forgejo-openapi/.openapi-generator/VERSION new file mode 100644 index 0000000..3821090 --- /dev/null +++ b/forgejo-openapi/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.19.0 diff --git a/forgejo-openapi/.travis.yml b/forgejo-openapi/.travis.yml new file mode 100644 index 0000000..22761ba --- /dev/null +++ b/forgejo-openapi/.travis.yml @@ -0,0 +1 @@ +language: rust diff --git a/forgejo-openapi/Cargo.toml b/forgejo-openapi/Cargo.toml new file mode 100644 index 0000000..4ff08ab --- /dev/null +++ b/forgejo-openapi/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "forgejo-openapi" +version = "14.0.0" +authors = ["OpenAPI Generator team and contributors"] +description = "This documentation describes the Forgejo API." +license = "This file is distributed under the MIT license for the purpose of interoperability" +edition = "2021" + +[dependencies] +serde = { version = "^1.0", features = ["derive"] } +serde_json = "^1.0" +serde_repr = "^0.1" +url = "^2.5" +tokio = { version = "^1.46.0", features = ["fs"] } +tokio-util = { version = "^0.7", features = ["codec"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart", "stream"] } + +[features] +default = ["native-tls"] +native-tls = ["reqwest/native-tls"] +rustls-tls = ["reqwest/rustls-tls"] diff --git a/forgejo-openapi/README.md b/forgejo-openapi/README.md new file mode 100644 index 0000000..bdc8c4b --- /dev/null +++ b/forgejo-openapi/README.md @@ -0,0 +1,746 @@ +# Rust API client for openapi + +This documentation describes the Forgejo API. + + +## Overview + +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. + +- API version: 14.0.0 +- Package version: 14.0.0 +- Generator version: 7.19.0 +- Build package: `org.openapitools.codegen.languages.RustClientCodegen` + +## Installation + +Put the package under your project folder in a directory named `openapi` and add the following to `Cargo.toml` under `[dependencies]`: + +``` +openapi = { path = "./openapi" } +``` + +## Documentation for API Endpoints + +All URIs are relative to */api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ActivitypubApi* | [**activitypub_instance_actor**](docs/ActivitypubApi.md#activitypub_instance_actor) | **GET** /activitypub/actor | Returns the instance's Actor +*ActivitypubApi* | [**activitypub_instance_actor_inbox**](docs/ActivitypubApi.md#activitypub_instance_actor_inbox) | **POST** /activitypub/actor/inbox | Send to the inbox +*ActivitypubApi* | [**activitypub_instance_actor_outbox**](docs/ActivitypubApi.md#activitypub_instance_actor_outbox) | **POST** /activitypub/actor/outbox | Display the outbox (always empty) +*ActivitypubApi* | [**activitypub_person**](docs/ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user_id} | Returns the Person actor for a user +*ActivitypubApi* | [**activitypub_person_activity**](docs/ActivitypubApi.md#activitypub_person_activity) | **GET** /activitypub/user-id/{user_id}/activities/{activity_id}/activity | Get a specific activity of the user +*ActivitypubApi* | [**activitypub_person_activity_note**](docs/ActivitypubApi.md#activitypub_person_activity_note) | **GET** /activitypub/user-id/{user_id}/activities/{activity_id} | Get a specific activity object of the user +*ActivitypubApi* | [**activitypub_person_feed**](docs/ActivitypubApi.md#activitypub_person_feed) | **GET** /activitypub/user-id/{user_id}/outbox | List the user's recorded activity +*ActivitypubApi* | [**activitypub_person_inbox**](docs/ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user_id}/inbox | Send to the inbox +*ActivitypubApi* | [**activitypub_repository**](docs/ActivitypubApi.md#activitypub_repository) | **GET** /activitypub/repository-id/{repository_id} | Returns the Repository actor for a repo +*ActivitypubApi* | [**activitypub_repository_inbox**](docs/ActivitypubApi.md#activitypub_repository_inbox) | **POST** /activitypub/repository-id/{repository_id}/inbox | Send to the inbox +*ActivitypubApi* | [**activitypub_repository_outbox**](docs/ActivitypubApi.md#activitypub_repository_outbox) | **POST** /activitypub/repository-id/{repository_id}/outbox | Display the outbox +*AdminApi* | [**admin_add_rule_to_quota_group**](docs/AdminApi.md#admin_add_rule_to_quota_group) | **PUT** /admin/quota/groups/{quotagroup}/rules/{quotarule} | Adds a rule to a quota group +*AdminApi* | [**admin_add_user_to_quota_group**](docs/AdminApi.md#admin_add_user_to_quota_group) | **PUT** /admin/quota/groups/{quotagroup}/users/{username} | Add a user to a quota group +*AdminApi* | [**admin_adopt_repository**](docs/AdminApi.md#admin_adopt_repository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository +*AdminApi* | [**admin_create_hook**](docs/AdminApi.md#admin_create_hook) | **POST** /admin/hooks | Create a hook +*AdminApi* | [**admin_create_org**](docs/AdminApi.md#admin_create_org) | **POST** /admin/users/{username}/orgs | Create an organization +*AdminApi* | [**admin_create_public_key**](docs/AdminApi.md#admin_create_public_key) | **POST** /admin/users/{username}/keys | Add an SSH public key to user's account +*AdminApi* | [**admin_create_quota_group**](docs/AdminApi.md#admin_create_quota_group) | **POST** /admin/quota/groups | Create a new quota group +*AdminApi* | [**admin_create_quota_rule**](docs/AdminApi.md#admin_create_quota_rule) | **POST** /admin/quota/rules | Create a new quota rule +*AdminApi* | [**admin_create_repo**](docs/AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf of a user +*AdminApi* | [**admin_create_user**](docs/AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user account +*AdminApi* | [**admin_cron_list**](docs/AdminApi.md#admin_cron_list) | **GET** /admin/cron | List cron tasks +*AdminApi* | [**admin_cron_run**](docs/AdminApi.md#admin_cron_run) | **POST** /admin/cron/{task} | Run cron task +*AdminApi* | [**admin_delete_hook**](docs/AdminApi.md#admin_delete_hook) | **DELETE** /admin/hooks/{id} | Delete a hook +*AdminApi* | [**admin_delete_quota_group**](docs/AdminApi.md#admin_delete_quota_group) | **DELETE** /admin/quota/groups/{quotagroup} | Delete a quota group +*AdminApi* | [**admin_delete_quota_rule**](docs/AdminApi.md#admin_delete_quota_rule) | **DELETE** /admin/quota/rules/{quotarule} | Deletes a quota rule +*AdminApi* | [**admin_delete_unadopted_repository**](docs/AdminApi.md#admin_delete_unadopted_repository) | **DELETE** /admin/unadopted/{owner}/{repo} | Delete unadopted files +*AdminApi* | [**admin_delete_user**](docs/AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete user account +*AdminApi* | [**admin_delete_user_emails**](docs/AdminApi.md#admin_delete_user_emails) | **DELETE** /admin/users/{username}/emails | Delete email addresses from a user's account +*AdminApi* | [**admin_delete_user_public_key**](docs/AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Remove a public key from user's account +*AdminApi* | [**admin_edit_hook**](docs/AdminApi.md#admin_edit_hook) | **PATCH** /admin/hooks/{id} | Update a hook +*AdminApi* | [**admin_edit_quota_rule**](docs/AdminApi.md#admin_edit_quota_rule) | **PATCH** /admin/quota/rules/{quotarule} | Change an existing quota rule +*AdminApi* | [**admin_edit_user**](docs/AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user +*AdminApi* | [**admin_get_all_emails**](docs/AdminApi.md#admin_get_all_emails) | **GET** /admin/emails | List all users' email addresses +*AdminApi* | [**admin_get_all_orgs**](docs/AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations +*AdminApi* | [**admin_get_hook**](docs/AdminApi.md#admin_get_hook) | **GET** /admin/hooks/{id} | Get a hook +*AdminApi* | [**admin_get_quota_group**](docs/AdminApi.md#admin_get_quota_group) | **GET** /admin/quota/groups/{quotagroup} | Get information about the quota group +*AdminApi* | [**admin_get_quota_rule**](docs/AdminApi.md#admin_get_quota_rule) | **GET** /admin/quota/rules/{quotarule} | Get information about a quota rule +*AdminApi* | [**admin_get_runner_registration_token**](docs/AdminApi.md#admin_get_runner_registration_token) | **GET** /admin/runners/registration-token | Get an global actions runner registration token +*AdminApi* | [**admin_get_user_quota**](docs/AdminApi.md#admin_get_user_quota) | **GET** /admin/users/{username}/quota | Get the user's quota info +*AdminApi* | [**admin_list_hooks**](docs/AdminApi.md#admin_list_hooks) | **GET** /admin/hooks | List global (system) webhooks +*AdminApi* | [**admin_list_quota_groups**](docs/AdminApi.md#admin_list_quota_groups) | **GET** /admin/quota/groups | List the available quota groups +*AdminApi* | [**admin_list_quota_rules**](docs/AdminApi.md#admin_list_quota_rules) | **GET** /admin/quota/rules | List the available quota rules +*AdminApi* | [**admin_list_user_emails**](docs/AdminApi.md#admin_list_user_emails) | **GET** /admin/users/{username}/emails | List all email addresses for a user +*AdminApi* | [**admin_list_users_in_quota_group**](docs/AdminApi.md#admin_list_users_in_quota_group) | **GET** /admin/quota/groups/{quotagroup}/users | List users in a quota group +*AdminApi* | [**admin_remove_rule_from_quota_group**](docs/AdminApi.md#admin_remove_rule_from_quota_group) | **DELETE** /admin/quota/groups/{quotagroup}/rules/{quotarule} | Removes a rule from a quota group +*AdminApi* | [**admin_remove_user_from_quota_group**](docs/AdminApi.md#admin_remove_user_from_quota_group) | **DELETE** /admin/quota/groups/{quotagroup}/users/{username} | Remove a user from a quota group +*AdminApi* | [**admin_rename_user**](docs/AdminApi.md#admin_rename_user) | **POST** /admin/users/{username}/rename | Rename a user +*AdminApi* | [**admin_search_emails**](docs/AdminApi.md#admin_search_emails) | **GET** /admin/emails/search | Search users' email addresses +*AdminApi* | [**admin_search_run_jobs**](docs/AdminApi.md#admin_search_run_jobs) | **GET** /admin/runners/jobs | Search action jobs according filter conditions +*AdminApi* | [**admin_search_users**](docs/AdminApi.md#admin_search_users) | **GET** /admin/users | Search users according filter conditions +*AdminApi* | [**admin_set_user_quota_groups**](docs/AdminApi.md#admin_set_user_quota_groups) | **POST** /admin/users/{username}/quota/groups | Set the user's quota groups to a given list. +*AdminApi* | [**admin_unadopted_list**](docs/AdminApi.md#admin_unadopted_list) | **GET** /admin/unadopted | List unadopted repositories +*IssueApi* | [**issue_add_label**](docs/IssueApi.md#issue_add_label) | **POST** /repos/{owner}/{repo}/issues/{index}/labels | Add a label to an issue +*IssueApi* | [**issue_add_subscription**](docs/IssueApi.md#issue_add_subscription) | **PUT** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Subscribe user to issue +*IssueApi* | [**issue_add_time**](docs/IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{index}/times | Add tracked time to a issue +*IssueApi* | [**issue_check_subscription**](docs/IssueApi.md#issue_check_subscription) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions/check | Check if user is subscribed to an issue +*IssueApi* | [**issue_clear_labels**](docs/IssueApi.md#issue_clear_labels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue +*IssueApi* | [**issue_create_comment**](docs/IssueApi.md#issue_create_comment) | **POST** /repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue +*IssueApi* | [**issue_create_issue**](docs/IssueApi.md#issue_create_issue) | **POST** /repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored. +*IssueApi* | [**issue_create_issue_attachment**](docs/IssueApi.md#issue_create_issue_attachment) | **POST** /repos/{owner}/{repo}/issues/{index}/assets | Create an issue attachment +*IssueApi* | [**issue_create_issue_blocking**](docs/IssueApi.md#issue_create_issue_blocking) | **POST** /repos/{owner}/{repo}/issues/{index}/blocks | Block the issue given in the body by the issue in path +*IssueApi* | [**issue_create_issue_comment_attachment**](docs/IssueApi.md#issue_create_issue_comment_attachment) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/assets | Create a comment attachment +*IssueApi* | [**issue_create_issue_dependencies**](docs/IssueApi.md#issue_create_issue_dependencies) | **POST** /repos/{owner}/{repo}/issues/{index}/dependencies | Make the issue in the url depend on the issue in the form. +*IssueApi* | [**issue_create_label**](docs/IssueApi.md#issue_create_label) | **POST** /repos/{owner}/{repo}/labels | Create a label +*IssueApi* | [**issue_create_milestone**](docs/IssueApi.md#issue_create_milestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone +*IssueApi* | [**issue_delete**](docs/IssueApi.md#issue_delete) | **DELETE** /repos/{owner}/{repo}/issues/{index} | Delete an issue +*IssueApi* | [**issue_delete_comment**](docs/IssueApi.md#issue_delete_comment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment +*IssueApi* | [**issue_delete_comment_deprecated**](docs/IssueApi.md#issue_delete_comment_deprecated) | **DELETE** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Delete a comment +*IssueApi* | [**issue_delete_comment_reaction**](docs/IssueApi.md#issue_delete_comment_reaction) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Remove a reaction from a comment of an issue +*IssueApi* | [**issue_delete_issue_attachment**](docs/IssueApi.md#issue_delete_issue_attachment) | **DELETE** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Delete an issue attachment +*IssueApi* | [**issue_delete_issue_comment_attachment**](docs/IssueApi.md#issue_delete_issue_comment_attachment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Delete a comment attachment +*IssueApi* | [**issue_delete_issue_reaction**](docs/IssueApi.md#issue_delete_issue_reaction) | **DELETE** /repos/{owner}/{repo}/issues/{index}/reactions | Remove a reaction from an issue +*IssueApi* | [**issue_delete_label**](docs/IssueApi.md#issue_delete_label) | **DELETE** /repos/{owner}/{repo}/labels/{id} | Delete a label +*IssueApi* | [**issue_delete_milestone**](docs/IssueApi.md#issue_delete_milestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone +*IssueApi* | [**issue_delete_stop_watch**](docs/IssueApi.md#issue_delete_stop_watch) | **DELETE** /repos/{owner}/{repo}/issues/{index}/stopwatch/delete | Delete an issue's existing stopwatch. +*IssueApi* | [**issue_delete_subscription**](docs/IssueApi.md#issue_delete_subscription) | **DELETE** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Unsubscribe user from issue +*IssueApi* | [**issue_delete_time**](docs/IssueApi.md#issue_delete_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times/{id} | Delete specific tracked time +*IssueApi* | [**issue_edit_comment**](docs/IssueApi.md#issue_edit_comment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id} | Edit a comment +*IssueApi* | [**issue_edit_comment_deprecated**](docs/IssueApi.md#issue_edit_comment_deprecated) | **PATCH** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment +*IssueApi* | [**issue_edit_issue**](docs/IssueApi.md#issue_edit_issue) | **PATCH** /repos/{owner}/{repo}/issues/{index} | Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. +*IssueApi* | [**issue_edit_issue_attachment**](docs/IssueApi.md#issue_edit_issue_attachment) | **PATCH** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Edit an issue attachment +*IssueApi* | [**issue_edit_issue_comment_attachment**](docs/IssueApi.md#issue_edit_issue_comment_attachment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Edit a comment attachment +*IssueApi* | [**issue_edit_issue_deadline**](docs/IssueApi.md#issue_edit_issue_deadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. +*IssueApi* | [**issue_edit_label**](docs/IssueApi.md#issue_edit_label) | **PATCH** /repos/{owner}/{repo}/labels/{id} | Update a label +*IssueApi* | [**issue_edit_milestone**](docs/IssueApi.md#issue_edit_milestone) | **PATCH** /repos/{owner}/{repo}/milestones/{id} | Update a milestone +*IssueApi* | [**issue_get_comment**](docs/IssueApi.md#issue_get_comment) | **GET** /repos/{owner}/{repo}/issues/comments/{id} | Get a comment +*IssueApi* | [**issue_get_comment_reactions**](docs/IssueApi.md#issue_get_comment_reactions) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Get a list of reactions from a comment of an issue +*IssueApi* | [**issue_get_comments**](docs/IssueApi.md#issue_get_comments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue +*IssueApi* | [**issue_get_comments_and_timeline**](docs/IssueApi.md#issue_get_comments_and_timeline) | **GET** /repos/{owner}/{repo}/issues/{index}/timeline | List all comments and events on an issue +*IssueApi* | [**issue_get_issue**](docs/IssueApi.md#issue_get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get an issue +*IssueApi* | [**issue_get_issue_attachment**](docs/IssueApi.md#issue_get_issue_attachment) | **GET** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Get an issue attachment +*IssueApi* | [**issue_get_issue_comment_attachment**](docs/IssueApi.md#issue_get_issue_comment_attachment) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Get a comment attachment +*IssueApi* | [**issue_get_issue_reactions**](docs/IssueApi.md#issue_get_issue_reactions) | **GET** /repos/{owner}/{repo}/issues/{index}/reactions | Get a list reactions of an issue +*IssueApi* | [**issue_get_label**](docs/IssueApi.md#issue_get_label) | **GET** /repos/{owner}/{repo}/labels/{id} | Get a single label +*IssueApi* | [**issue_get_labels**](docs/IssueApi.md#issue_get_labels) | **GET** /repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels +*IssueApi* | [**issue_get_milestone**](docs/IssueApi.md#issue_get_milestone) | **GET** /repos/{owner}/{repo}/milestones/{id} | Get a milestone +*IssueApi* | [**issue_get_milestones_list**](docs/IssueApi.md#issue_get_milestones_list) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones +*IssueApi* | [**issue_get_repo_comments**](docs/IssueApi.md#issue_get_repo_comments) | **GET** /repos/{owner}/{repo}/issues/comments | List all comments in a repository +*IssueApi* | [**issue_list_blocks**](docs/IssueApi.md#issue_list_blocks) | **GET** /repos/{owner}/{repo}/issues/{index}/blocks | List issues that are blocked by this issue +*IssueApi* | [**issue_list_issue_attachments**](docs/IssueApi.md#issue_list_issue_attachments) | **GET** /repos/{owner}/{repo}/issues/{index}/assets | List issue's attachments +*IssueApi* | [**issue_list_issue_comment_attachments**](docs/IssueApi.md#issue_list_issue_comment_attachments) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets | List comment's attachments +*IssueApi* | [**issue_list_issue_dependencies**](docs/IssueApi.md#issue_list_issue_dependencies) | **GET** /repos/{owner}/{repo}/issues/{index}/dependencies | List an issue's dependencies, i.e all issues that block this issue. +*IssueApi* | [**issue_list_issues**](docs/IssueApi.md#issue_list_issues) | **GET** /repos/{owner}/{repo}/issues | List a repository's issues +*IssueApi* | [**issue_list_labels**](docs/IssueApi.md#issue_list_labels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels +*IssueApi* | [**issue_post_comment_reaction**](docs/IssueApi.md#issue_post_comment_reaction) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Add a reaction to a comment of an issue +*IssueApi* | [**issue_post_issue_reaction**](docs/IssueApi.md#issue_post_issue_reaction) | **POST** /repos/{owner}/{repo}/issues/{index}/reactions | Add a reaction to an issue +*IssueApi* | [**issue_remove_issue_blocking**](docs/IssueApi.md#issue_remove_issue_blocking) | **DELETE** /repos/{owner}/{repo}/issues/{index}/blocks | Unblock the issue given in the body by the issue in path +*IssueApi* | [**issue_remove_issue_dependencies**](docs/IssueApi.md#issue_remove_issue_dependencies) | **DELETE** /repos/{owner}/{repo}/issues/{index}/dependencies | Remove an issue dependency +*IssueApi* | [**issue_remove_label**](docs/IssueApi.md#issue_remove_label) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{identifier} | Remove a label from an issue +*IssueApi* | [**issue_replace_labels**](docs/IssueApi.md#issue_replace_labels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels +*IssueApi* | [**issue_reset_time**](docs/IssueApi.md#issue_reset_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times | Reset a tracked time of an issue +*IssueApi* | [**issue_search_issues**](docs/IssueApi.md#issue_search_issues) | **GET** /repos/issues/search | Search for issues across the repositories that the user has access to +*IssueApi* | [**issue_start_stop_watch**](docs/IssueApi.md#issue_start_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue. +*IssueApi* | [**issue_stop_stop_watch**](docs/IssueApi.md#issue_stop_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. +*IssueApi* | [**issue_subscriptions**](docs/IssueApi.md#issue_subscriptions) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions | Get users who subscribed on an issue. +*IssueApi* | [**issue_tracked_times**](docs/IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{index}/times | List an issue's tracked times +*IssueApi* | [**move_issue_pin**](docs/IssueApi.md#move_issue_pin) | **PATCH** /repos/{owner}/{repo}/issues/{index}/pin/{position} | Moves the Pin to the given Position +*IssueApi* | [**pin_issue**](docs/IssueApi.md#pin_issue) | **POST** /repos/{owner}/{repo}/issues/{index}/pin | Pin an Issue +*IssueApi* | [**unpin_issue**](docs/IssueApi.md#unpin_issue) | **DELETE** /repos/{owner}/{repo}/issues/{index}/pin | Unpin an Issue +*MiscellaneousApi* | [**get_gitignore_template_info**](docs/MiscellaneousApi.md#get_gitignore_template_info) | **GET** /gitignore/templates/{name} | Returns information about a gitignore template +*MiscellaneousApi* | [**get_label_template_info**](docs/MiscellaneousApi.md#get_label_template_info) | **GET** /label/templates/{name} | Returns all labels in a template +*MiscellaneousApi* | [**get_license_template_info**](docs/MiscellaneousApi.md#get_license_template_info) | **GET** /licenses/{name} | Returns information about a license template +*MiscellaneousApi* | [**get_node_info**](docs/MiscellaneousApi.md#get_node_info) | **GET** /nodeinfo | Returns the nodeinfo of the Forgejo application +*MiscellaneousApi* | [**get_signing_key**](docs/MiscellaneousApi.md#get_signing_key) | **GET** /signing-key.gpg | Get default signing-key.gpg +*MiscellaneousApi* | [**get_ssh_signing_key**](docs/MiscellaneousApi.md#get_ssh_signing_key) | **GET** /signing-key.ssh | Get default signing-key.ssh +*MiscellaneousApi* | [**get_version**](docs/MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the running application +*MiscellaneousApi* | [**list_gitignores_templates**](docs/MiscellaneousApi.md#list_gitignores_templates) | **GET** /gitignore/templates | Returns a list of all gitignore templates +*MiscellaneousApi* | [**list_label_templates**](docs/MiscellaneousApi.md#list_label_templates) | **GET** /label/templates | Returns a list of all label templates +*MiscellaneousApi* | [**list_license_templates**](docs/MiscellaneousApi.md#list_license_templates) | **GET** /licenses | Returns a list of all license templates +*MiscellaneousApi* | [**render_markdown**](docs/MiscellaneousApi.md#render_markdown) | **POST** /markdown | Render a markdown document as HTML +*MiscellaneousApi* | [**render_markdown_raw**](docs/MiscellaneousApi.md#render_markdown_raw) | **POST** /markdown/raw | Render raw markdown as HTML +*MiscellaneousApi* | [**render_markup**](docs/MiscellaneousApi.md#render_markup) | **POST** /markup | Render a markup document as HTML +*NotificationApi* | [**notify_get_list**](docs/NotificationApi.md#notify_get_list) | **GET** /notifications | List users's notification threads +*NotificationApi* | [**notify_get_repo_list**](docs/NotificationApi.md#notify_get_repo_list) | **GET** /repos/{owner}/{repo}/notifications | List users's notification threads on a specific repo +*NotificationApi* | [**notify_get_thread**](docs/NotificationApi.md#notify_get_thread) | **GET** /notifications/threads/{id} | Get notification thread by ID +*NotificationApi* | [**notify_new_available**](docs/NotificationApi.md#notify_new_available) | **GET** /notifications/new | Check if unread notifications exist +*NotificationApi* | [**notify_read_list**](docs/NotificationApi.md#notify_read_list) | **PUT** /notifications | Mark notification threads as read, pinned or unread +*NotificationApi* | [**notify_read_repo_list**](docs/NotificationApi.md#notify_read_repo_list) | **PUT** /repos/{owner}/{repo}/notifications | Mark notification threads as read, pinned or unread on a specific repo +*NotificationApi* | [**notify_read_thread**](docs/NotificationApi.md#notify_read_thread) | **PATCH** /notifications/threads/{id} | Mark notification thread as read by ID +*OrganizationApi* | [**create_org_repo**](docs/OrganizationApi.md#create_org_repo) | **POST** /orgs/{org}/repos | Create a repository in an organization +*OrganizationApi* | [**create_org_repo_deprecated**](docs/OrganizationApi.md#create_org_repo_deprecated) | **POST** /org/{org}/repos | Create a repository in an organization +*OrganizationApi* | [**create_org_variable**](docs/OrganizationApi.md#create_org_variable) | **POST** /orgs/{org}/actions/variables/{variablename} | Create a new variable in organization +*OrganizationApi* | [**delete_org_secret**](docs/OrganizationApi.md#delete_org_secret) | **DELETE** /orgs/{org}/actions/secrets/{secretname} | Delete a secret in an organization +*OrganizationApi* | [**delete_org_variable**](docs/OrganizationApi.md#delete_org_variable) | **DELETE** /orgs/{org}/actions/variables/{variablename} | Delete organization's variable by name +*OrganizationApi* | [**get_org_variable**](docs/OrganizationApi.md#get_org_variable) | **GET** /orgs/{org}/actions/variables/{variablename} | Get organization's variable by name +*OrganizationApi* | [**get_org_variables_list**](docs/OrganizationApi.md#get_org_variables_list) | **GET** /orgs/{org}/actions/variables | List variables of an organization +*OrganizationApi* | [**org_add_team_member**](docs/OrganizationApi.md#org_add_team_member) | **PUT** /teams/{id}/members/{username} | Add a team member +*OrganizationApi* | [**org_add_team_repository**](docs/OrganizationApi.md#org_add_team_repository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team +*OrganizationApi* | [**org_block_user**](docs/OrganizationApi.md#org_block_user) | **PUT** /orgs/{org}/block/{username} | Blocks a user from the organization +*OrganizationApi* | [**org_check_quota**](docs/OrganizationApi.md#org_check_quota) | **GET** /orgs/{org}/quota/check | Check if the organization is over quota for a given subject +*OrganizationApi* | [**org_conceal_member**](docs/OrganizationApi.md#org_conceal_member) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership +*OrganizationApi* | [**org_create**](docs/OrganizationApi.md#org_create) | **POST** /orgs | Create an organization +*OrganizationApi* | [**org_create_hook**](docs/OrganizationApi.md#org_create_hook) | **POST** /orgs/{org}/hooks | Create a hook +*OrganizationApi* | [**org_create_label**](docs/OrganizationApi.md#org_create_label) | **POST** /orgs/{org}/labels | Create a label for an organization +*OrganizationApi* | [**org_create_team**](docs/OrganizationApi.md#org_create_team) | **POST** /orgs/{org}/teams | Create a team +*OrganizationApi* | [**org_delete**](docs/OrganizationApi.md#org_delete) | **DELETE** /orgs/{org} | Delete an organization +*OrganizationApi* | [**org_delete_avatar**](docs/OrganizationApi.md#org_delete_avatar) | **DELETE** /orgs/{org}/avatar | Delete an organization's avatar. It will be replaced by a default one +*OrganizationApi* | [**org_delete_hook**](docs/OrganizationApi.md#org_delete_hook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook +*OrganizationApi* | [**org_delete_label**](docs/OrganizationApi.md#org_delete_label) | **DELETE** /orgs/{org}/labels/{id} | Delete a label +*OrganizationApi* | [**org_delete_member**](docs/OrganizationApi.md#org_delete_member) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization +*OrganizationApi* | [**org_delete_team**](docs/OrganizationApi.md#org_delete_team) | **DELETE** /teams/{id} | Delete a team +*OrganizationApi* | [**org_edit**](docs/OrganizationApi.md#org_edit) | **PATCH** /orgs/{org} | Edit an organization +*OrganizationApi* | [**org_edit_hook**](docs/OrganizationApi.md#org_edit_hook) | **PATCH** /orgs/{org}/hooks/{id} | Update a hook +*OrganizationApi* | [**org_edit_label**](docs/OrganizationApi.md#org_edit_label) | **PATCH** /orgs/{org}/labels/{id} | Update a label +*OrganizationApi* | [**org_edit_team**](docs/OrganizationApi.md#org_edit_team) | **PATCH** /teams/{id} | Edit a team +*OrganizationApi* | [**org_get**](docs/OrganizationApi.md#org_get) | **GET** /orgs/{org} | Get an organization +*OrganizationApi* | [**org_get_all**](docs/OrganizationApi.md#org_get_all) | **GET** /orgs | List all organizations +*OrganizationApi* | [**org_get_hook**](docs/OrganizationApi.md#org_get_hook) | **GET** /orgs/{org}/hooks/{id} | Get a hook +*OrganizationApi* | [**org_get_label**](docs/OrganizationApi.md#org_get_label) | **GET** /orgs/{org}/labels/{id} | Get a single label +*OrganizationApi* | [**org_get_quota**](docs/OrganizationApi.md#org_get_quota) | **GET** /orgs/{org}/quota | Get quota information for an organization +*OrganizationApi* | [**org_get_runner_registration_token**](docs/OrganizationApi.md#org_get_runner_registration_token) | **GET** /orgs/{org}/actions/runners/registration-token | Get an organization's actions runner registration token +*OrganizationApi* | [**org_get_team**](docs/OrganizationApi.md#org_get_team) | **GET** /teams/{id} | Get a team +*OrganizationApi* | [**org_get_user_permissions**](docs/OrganizationApi.md#org_get_user_permissions) | **GET** /users/{username}/orgs/{org}/permissions | Get user permissions in organization +*OrganizationApi* | [**org_is_member**](docs/OrganizationApi.md#org_is_member) | **GET** /orgs/{org}/members/{username} | Check if a user is a member of an organization +*OrganizationApi* | [**org_is_public_member**](docs/OrganizationApi.md#org_is_public_member) | **GET** /orgs/{org}/public_members/{username} | Check if a user is a public member of an organization +*OrganizationApi* | [**org_list_actions_secrets**](docs/OrganizationApi.md#org_list_actions_secrets) | **GET** /orgs/{org}/actions/secrets | List actions secrets of an organization +*OrganizationApi* | [**org_list_activity_feeds**](docs/OrganizationApi.md#org_list_activity_feeds) | **GET** /orgs/{org}/activities/feeds | List an organization's activity feeds +*OrganizationApi* | [**org_list_blocked_users**](docs/OrganizationApi.md#org_list_blocked_users) | **GET** /orgs/{org}/list_blocked | List the organization's blocked users +*OrganizationApi* | [**org_list_current_user_orgs**](docs/OrganizationApi.md#org_list_current_user_orgs) | **GET** /user/orgs | List the current user's organizations +*OrganizationApi* | [**org_list_hooks**](docs/OrganizationApi.md#org_list_hooks) | **GET** /orgs/{org}/hooks | List an organization's webhooks +*OrganizationApi* | [**org_list_labels**](docs/OrganizationApi.md#org_list_labels) | **GET** /orgs/{org}/labels | List an organization's labels +*OrganizationApi* | [**org_list_members**](docs/OrganizationApi.md#org_list_members) | **GET** /orgs/{org}/members | List an organization's members +*OrganizationApi* | [**org_list_public_members**](docs/OrganizationApi.md#org_list_public_members) | **GET** /orgs/{org}/public_members | List an organization's public members +*OrganizationApi* | [**org_list_quota_artifacts**](docs/OrganizationApi.md#org_list_quota_artifacts) | **GET** /orgs/{org}/quota/artifacts | List the artifacts affecting the organization's quota +*OrganizationApi* | [**org_list_quota_attachments**](docs/OrganizationApi.md#org_list_quota_attachments) | **GET** /orgs/{org}/quota/attachments | List the attachments affecting the organization's quota +*OrganizationApi* | [**org_list_quota_packages**](docs/OrganizationApi.md#org_list_quota_packages) | **GET** /orgs/{org}/quota/packages | List the packages affecting the organization's quota +*OrganizationApi* | [**org_list_repos**](docs/OrganizationApi.md#org_list_repos) | **GET** /orgs/{org}/repos | List an organization's repos +*OrganizationApi* | [**org_list_team_activity_feeds**](docs/OrganizationApi.md#org_list_team_activity_feeds) | **GET** /teams/{id}/activities/feeds | List a team's activity feeds +*OrganizationApi* | [**org_list_team_member**](docs/OrganizationApi.md#org_list_team_member) | **GET** /teams/{id}/members/{username} | List a particular member of team +*OrganizationApi* | [**org_list_team_members**](docs/OrganizationApi.md#org_list_team_members) | **GET** /teams/{id}/members | List a team's members +*OrganizationApi* | [**org_list_team_repo**](docs/OrganizationApi.md#org_list_team_repo) | **GET** /teams/{id}/repos/{org}/{repo} | List a particular repo of team +*OrganizationApi* | [**org_list_team_repos**](docs/OrganizationApi.md#org_list_team_repos) | **GET** /teams/{id}/repos | List a team's repos +*OrganizationApi* | [**org_list_teams**](docs/OrganizationApi.md#org_list_teams) | **GET** /orgs/{org}/teams | List an organization's teams +*OrganizationApi* | [**org_list_user_orgs**](docs/OrganizationApi.md#org_list_user_orgs) | **GET** /users/{username}/orgs | List a user's organizations +*OrganizationApi* | [**org_publicize_member**](docs/OrganizationApi.md#org_publicize_member) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership +*OrganizationApi* | [**org_remove_team_member**](docs/OrganizationApi.md#org_remove_team_member) | **DELETE** /teams/{id}/members/{username} | Remove a team member +*OrganizationApi* | [**org_remove_team_repository**](docs/OrganizationApi.md#org_remove_team_repository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team +*OrganizationApi* | [**org_search_run_jobs**](docs/OrganizationApi.md#org_search_run_jobs) | **GET** /orgs/{org}/actions/runners/jobs | Search for organization's action jobs according filter conditions +*OrganizationApi* | [**org_unblock_user**](docs/OrganizationApi.md#org_unblock_user) | **PUT** /orgs/{org}/unblock/{username} | Unblock a user from the organization +*OrganizationApi* | [**org_update_avatar**](docs/OrganizationApi.md#org_update_avatar) | **POST** /orgs/{org}/avatar | Update an organization's avatar +*OrganizationApi* | [**rename_org**](docs/OrganizationApi.md#rename_org) | **POST** /orgs/{org}/rename | Rename an organization +*OrganizationApi* | [**team_search**](docs/OrganizationApi.md#team_search) | **GET** /orgs/{org}/teams/search | Search for teams within an organization +*OrganizationApi* | [**update_org_secret**](docs/OrganizationApi.md#update_org_secret) | **PUT** /orgs/{org}/actions/secrets/{secretname} | Create or Update a secret value in an organization +*OrganizationApi* | [**update_org_variable**](docs/OrganizationApi.md#update_org_variable) | **PUT** /orgs/{org}/actions/variables/{variablename} | Update variable in organization +*PackageApi* | [**delete_package**](docs/PackageApi.md#delete_package) | **DELETE** /packages/{owner}/{type}/{name}/{version} | Delete a package +*PackageApi* | [**get_package**](docs/PackageApi.md#get_package) | **GET** /packages/{owner}/{type}/{name}/{version} | Gets a package +*PackageApi* | [**link_package**](docs/PackageApi.md#link_package) | **POST** /packages/{owner}/{type}/{name}/-/link/{repo_name} | Link a package to a repository +*PackageApi* | [**list_package_files**](docs/PackageApi.md#list_package_files) | **GET** /packages/{owner}/{type}/{name}/{version}/files | Gets all files of a package +*PackageApi* | [**list_packages**](docs/PackageApi.md#list_packages) | **GET** /packages/{owner} | Gets all packages of an owner +*PackageApi* | [**unlink_package**](docs/PackageApi.md#unlink_package) | **POST** /packages/{owner}/{type}/{name}/-/unlink | Unlink a package from a repository +*RepositoryApi* | [**accept_repo_transfer**](docs/RepositoryApi.md#accept_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/accept | Accept a repo transfer +*RepositoryApi* | [**action_run**](docs/RepositoryApi.md#action_run) | **GET** /repos/{owner}/{repo}/actions/runs/{run_id} | Get an action run +*RepositoryApi* | [**create_current_user_repo**](docs/RepositoryApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +*RepositoryApi* | [**create_fork**](docs/RepositoryApi.md#create_fork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository +*RepositoryApi* | [**create_repo_variable**](docs/RepositoryApi.md#create_repo_variable) | **POST** /repos/{owner}/{repo}/actions/variables/{variablename} | Create a repo-level variable +*RepositoryApi* | [**delete_repo_secret**](docs/RepositoryApi.md#delete_repo_secret) | **DELETE** /repos/{owner}/{repo}/actions/secrets/{secretname} | Delete a secret in a repository +*RepositoryApi* | [**delete_repo_variable**](docs/RepositoryApi.md#delete_repo_variable) | **DELETE** /repos/{owner}/{repo}/actions/variables/{variablename} | Delete a repo-level variable +*RepositoryApi* | [**dispatch_workflow**](docs/RepositoryApi.md#dispatch_workflow) | **POST** /repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches | Dispatches a workflow +*RepositoryApi* | [**generate_repo**](docs/RepositoryApi.md#generate_repo) | **POST** /repos/{template_owner}/{template_repo}/generate | Create a repository using a template +*RepositoryApi* | [**get_annotated_tag**](docs/RepositoryApi.md#get_annotated_tag) | **GET** /repos/{owner}/{repo}/git/tags/{sha} | Gets the tag object of an annotated tag (not lightweight tags) +*RepositoryApi* | [**get_blob**](docs/RepositoryApi.md#get_blob) | **GET** /repos/{owner}/{repo}/git/blobs/{sha} | Gets the blob of a repository. +*RepositoryApi* | [**get_blobs**](docs/RepositoryApi.md#get_blobs) | **GET** /repos/{owner}/{repo}/git/blobs | Gets multiple blobs of a repository. +*RepositoryApi* | [**get_repo_variable**](docs/RepositoryApi.md#get_repo_variable) | **GET** /repos/{owner}/{repo}/actions/variables/{variablename} | Get a repo-level variable +*RepositoryApi* | [**get_repo_variables_list**](docs/RepositoryApi.md#get_repo_variables_list) | **GET** /repos/{owner}/{repo}/actions/variables | Get repo-level variables list +*RepositoryApi* | [**get_tree**](docs/RepositoryApi.md#get_tree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. +*RepositoryApi* | [**list_action_runs**](docs/RepositoryApi.md#list_action_runs) | **GET** /repos/{owner}/{repo}/actions/runs | List a repository's action runs +*RepositoryApi* | [**list_action_tasks**](docs/RepositoryApi.md#list_action_tasks) | **GET** /repos/{owner}/{repo}/actions/tasks | List a repository's action tasks +*RepositoryApi* | [**list_forks**](docs/RepositoryApi.md#list_forks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks +*RepositoryApi* | [**reject_repo_transfer**](docs/RepositoryApi.md#reject_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/reject | Reject a repo transfer +*RepositoryApi* | [**repo_add_collaborator**](docs/RepositoryApi.md#repo_add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add a collaborator to a repository +*RepositoryApi* | [**repo_add_flag**](docs/RepositoryApi.md#repo_add_flag) | **PUT** /repos/{owner}/{repo}/flags/{flag} | Add a flag to a repository +*RepositoryApi* | [**repo_add_push_mirror**](docs/RepositoryApi.md#repo_add_push_mirror) | **POST** /repos/{owner}/{repo}/push_mirrors | Set up a new push mirror in a repository +*RepositoryApi* | [**repo_add_team**](docs/RepositoryApi.md#repo_add_team) | **PUT** /repos/{owner}/{repo}/teams/{team} | Add a team to a repository +*RepositoryApi* | [**repo_add_topic**](docs/RepositoryApi.md#repo_add_topic) | **PUT** /repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository +*RepositoryApi* | [**repo_apply_diff_patch**](docs/RepositoryApi.md#repo_apply_diff_patch) | **POST** /repos/{owner}/{repo}/diffpatch | Apply diff patch to repository +*RepositoryApi* | [**repo_cancel_scheduled_auto_merge**](docs/RepositoryApi.md#repo_cancel_scheduled_auto_merge) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/merge | Cancel the scheduled auto merge for the given pull request +*RepositoryApi* | [**repo_change_files**](docs/RepositoryApi.md#repo_change_files) | **POST** /repos/{owner}/{repo}/contents | Modify multiple files in a repository +*RepositoryApi* | [**repo_check_collaborator**](docs/RepositoryApi.md#repo_check_collaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository +*RepositoryApi* | [**repo_check_flag**](docs/RepositoryApi.md#repo_check_flag) | **GET** /repos/{owner}/{repo}/flags/{flag} | Check if a repository has a given flag +*RepositoryApi* | [**repo_check_team**](docs/RepositoryApi.md#repo_check_team) | **GET** /repos/{owner}/{repo}/teams/{team} | Check if a team is assigned to a repository +*RepositoryApi* | [**repo_compare_diff**](docs/RepositoryApi.md#repo_compare_diff) | **GET** /repos/{owner}/{repo}/compare/{basehead} | Get commit comparison information +*RepositoryApi* | [**repo_convert**](docs/RepositoryApi.md#repo_convert) | **POST** /repos/{owner}/{repo}/convert | Convert a mirror repo to a normal repo. +*RepositoryApi* | [**repo_create_branch**](docs/RepositoryApi.md#repo_create_branch) | **POST** /repos/{owner}/{repo}/branches | Create a branch +*RepositoryApi* | [**repo_create_branch_protection**](docs/RepositoryApi.md#repo_create_branch_protection) | **POST** /repos/{owner}/{repo}/branch_protections | Create a branch protections for a repository +*RepositoryApi* | [**repo_create_file**](docs/RepositoryApi.md#repo_create_file) | **POST** /repos/{owner}/{repo}/contents/{filepath} | Create a file in a repository +*RepositoryApi* | [**repo_create_hook**](docs/RepositoryApi.md#repo_create_hook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook +*RepositoryApi* | [**repo_create_key**](docs/RepositoryApi.md#repo_create_key) | **POST** /repos/{owner}/{repo}/keys | Add a key to a repository +*RepositoryApi* | [**repo_create_pull_request**](docs/RepositoryApi.md#repo_create_pull_request) | **POST** /repos/{owner}/{repo}/pulls | Create a pull request +*RepositoryApi* | [**repo_create_pull_review**](docs/RepositoryApi.md#repo_create_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews | Create a review to an pull request +*RepositoryApi* | [**repo_create_pull_review_comment**](docs/RepositoryApi.md#repo_create_pull_review_comment) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Add a new comment to a pull request review +*RepositoryApi* | [**repo_create_pull_review_requests**](docs/RepositoryApi.md#repo_create_pull_review_requests) | **POST** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | Create review requests for a pull request +*RepositoryApi* | [**repo_create_release**](docs/RepositoryApi.md#repo_create_release) | **POST** /repos/{owner}/{repo}/releases | Create a release +*RepositoryApi* | [**repo_create_release_attachment**](docs/RepositoryApi.md#repo_create_release_attachment) | **POST** /repos/{owner}/{repo}/releases/{id}/assets | Create a release attachment +*RepositoryApi* | [**repo_create_status**](docs/RepositoryApi.md#repo_create_status) | **POST** /repos/{owner}/{repo}/statuses/{sha} | Create a commit status +*RepositoryApi* | [**repo_create_tag**](docs/RepositoryApi.md#repo_create_tag) | **POST** /repos/{owner}/{repo}/tags | Create a new git tag in a repository +*RepositoryApi* | [**repo_create_tag_protection**](docs/RepositoryApi.md#repo_create_tag_protection) | **POST** /repos/{owner}/{repo}/tag_protections | Create a tag protections for a repository +*RepositoryApi* | [**repo_create_wiki_page**](docs/RepositoryApi.md#repo_create_wiki_page) | **POST** /repos/{owner}/{repo}/wiki/new | Create a wiki page +*RepositoryApi* | [**repo_delete**](docs/RepositoryApi.md#repo_delete) | **DELETE** /repos/{owner}/{repo} | Delete a repository +*RepositoryApi* | [**repo_delete_all_flags**](docs/RepositoryApi.md#repo_delete_all_flags) | **DELETE** /repos/{owner}/{repo}/flags | Remove all flags from a repository +*RepositoryApi* | [**repo_delete_avatar**](docs/RepositoryApi.md#repo_delete_avatar) | **DELETE** /repos/{owner}/{repo}/avatar | Delete a repository's avatar +*RepositoryApi* | [**repo_delete_branch**](docs/RepositoryApi.md#repo_delete_branch) | **DELETE** /repos/{owner}/{repo}/branches/{branch} | Delete a specific branch from a repository +*RepositoryApi* | [**repo_delete_branch_protection**](docs/RepositoryApi.md#repo_delete_branch_protection) | **DELETE** /repos/{owner}/{repo}/branch_protections/{name} | Delete a specific branch protection for the repository +*RepositoryApi* | [**repo_delete_collaborator**](docs/RepositoryApi.md#repo_delete_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository +*RepositoryApi* | [**repo_delete_file**](docs/RepositoryApi.md#repo_delete_file) | **DELETE** /repos/{owner}/{repo}/contents/{filepath} | Delete a file in a repository +*RepositoryApi* | [**repo_delete_flag**](docs/RepositoryApi.md#repo_delete_flag) | **DELETE** /repos/{owner}/{repo}/flags/{flag} | Remove a flag from a repository +*RepositoryApi* | [**repo_delete_git_hook**](docs/RepositoryApi.md#repo_delete_git_hook) | **DELETE** /repos/{owner}/{repo}/hooks/git/{id} | Delete a Git hook in a repository +*RepositoryApi* | [**repo_delete_hook**](docs/RepositoryApi.md#repo_delete_hook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook in a repository +*RepositoryApi* | [**repo_delete_key**](docs/RepositoryApi.md#repo_delete_key) | **DELETE** /repos/{owner}/{repo}/keys/{id} | Delete a key from a repository +*RepositoryApi* | [**repo_delete_pull_review**](docs/RepositoryApi.md#repo_delete_pull_review) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Delete a specific review from a pull request +*RepositoryApi* | [**repo_delete_pull_review_comment**](docs/RepositoryApi.md#repo_delete_pull_review_comment) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment} | Delete a pull review comment +*RepositoryApi* | [**repo_delete_pull_review_requests**](docs/RepositoryApi.md#repo_delete_pull_review_requests) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | Cancel review requests for a pull request +*RepositoryApi* | [**repo_delete_push_mirror**](docs/RepositoryApi.md#repo_delete_push_mirror) | **DELETE** /repos/{owner}/{repo}/push_mirrors/{name} | Remove a push mirror from a repository by remoteName +*RepositoryApi* | [**repo_delete_release**](docs/RepositoryApi.md#repo_delete_release) | **DELETE** /repos/{owner}/{repo}/releases/{id} | Delete a release +*RepositoryApi* | [**repo_delete_release_attachment**](docs/RepositoryApi.md#repo_delete_release_attachment) | **DELETE** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment +*RepositoryApi* | [**repo_delete_release_by_tag**](docs/RepositoryApi.md#repo_delete_release_by_tag) | **DELETE** /repos/{owner}/{repo}/releases/tags/{tag} | Delete a release by tag name +*RepositoryApi* | [**repo_delete_tag**](docs/RepositoryApi.md#repo_delete_tag) | **DELETE** /repos/{owner}/{repo}/tags/{tag} | Delete a repository's tag by name +*RepositoryApi* | [**repo_delete_tag_protection**](docs/RepositoryApi.md#repo_delete_tag_protection) | **DELETE** /repos/{owner}/{repo}/tag_protections/{id} | Delete a specific tag protection for the repository +*RepositoryApi* | [**repo_delete_team**](docs/RepositoryApi.md#repo_delete_team) | **DELETE** /repos/{owner}/{repo}/teams/{team} | Delete a team from a repository +*RepositoryApi* | [**repo_delete_topic**](docs/RepositoryApi.md#repo_delete_topic) | **DELETE** /repos/{owner}/{repo}/topics/{topic} | Delete a topic from a repository +*RepositoryApi* | [**repo_delete_wiki_page**](docs/RepositoryApi.md#repo_delete_wiki_page) | **DELETE** /repos/{owner}/{repo}/wiki/page/{pageName} | Delete a wiki page +*RepositoryApi* | [**repo_dismiss_pull_review**](docs/RepositoryApi.md#repo_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals | Dismiss a review for a pull request +*RepositoryApi* | [**repo_download_commit_diff_or_patch**](docs/RepositoryApi.md#repo_download_commit_diff_or_patch) | **GET** /repos/{owner}/{repo}/git/commits/{sha}.{diffType} | Get a commit's diff or patch +*RepositoryApi* | [**repo_download_pull_diff_or_patch**](docs/RepositoryApi.md#repo_download_pull_diff_or_patch) | **GET** /repos/{owner}/{repo}/pulls/{index}.{diffType} | Get a pull request diff or patch +*RepositoryApi* | [**repo_edit**](docs/RepositoryApi.md#repo_edit) | **PATCH** /repos/{owner}/{repo} | Edit a repository's properties. Only fields that are set will be changed. +*RepositoryApi* | [**repo_edit_branch_protection**](docs/RepositoryApi.md#repo_edit_branch_protection) | **PATCH** /repos/{owner}/{repo}/branch_protections/{name} | Edit a branch protections for a repository. Only fields that are set will be changed +*RepositoryApi* | [**repo_edit_git_hook**](docs/RepositoryApi.md#repo_edit_git_hook) | **PATCH** /repos/{owner}/{repo}/hooks/git/{id} | Edit a Git hook in a repository +*RepositoryApi* | [**repo_edit_hook**](docs/RepositoryApi.md#repo_edit_hook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook in a repository +*RepositoryApi* | [**repo_edit_pull_request**](docs/RepositoryApi.md#repo_edit_pull_request) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. +*RepositoryApi* | [**repo_edit_release**](docs/RepositoryApi.md#repo_edit_release) | **PATCH** /repos/{owner}/{repo}/releases/{id} | Update a release +*RepositoryApi* | [**repo_edit_release_attachment**](docs/RepositoryApi.md#repo_edit_release_attachment) | **PATCH** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment +*RepositoryApi* | [**repo_edit_tag_protection**](docs/RepositoryApi.md#repo_edit_tag_protection) | **PATCH** /repos/{owner}/{repo}/tag_protections/{id} | Edit a tag protections for a repository. Only fields that are set will be changed +*RepositoryApi* | [**repo_edit_wiki_page**](docs/RepositoryApi.md#repo_edit_wiki_page) | **PATCH** /repos/{owner}/{repo}/wiki/page/{pageName} | Edit a wiki page +*RepositoryApi* | [**repo_get**](docs/RepositoryApi.md#repo_get) | **GET** /repos/{owner}/{repo} | Get a repository +*RepositoryApi* | [**repo_get_all_commits**](docs/RepositoryApi.md#repo_get_all_commits) | **GET** /repos/{owner}/{repo}/commits | Get a list of all commits from a repository +*RepositoryApi* | [**repo_get_archive**](docs/RepositoryApi.md#repo_get_archive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository +*RepositoryApi* | [**repo_get_assignees**](docs/RepositoryApi.md#repo_get_assignees) | **GET** /repos/{owner}/{repo}/assignees | Return all users that have write access and can be assigned to issues +*RepositoryApi* | [**repo_get_branch**](docs/RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository, including its effective branch protection +*RepositoryApi* | [**repo_get_branch_protection**](docs/RepositoryApi.md#repo_get_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections/{name} | Get a specific branch protection for the repository +*RepositoryApi* | [**repo_get_by_id**](docs/RepositoryApi.md#repo_get_by_id) | **GET** /repositories/{id} | Get a repository by id +*RepositoryApi* | [**repo_get_combined_status_by_ref**](docs/RepositoryApi.md#repo_get_combined_status_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/status | Get a commit's combined status, by branch/tag/commit reference +*RepositoryApi* | [**repo_get_commit_pull_request**](docs/RepositoryApi.md#repo_get_commit_pull_request) | **GET** /repos/{owner}/{repo}/commits/{sha}/pull | Get the pull request of the commit +*RepositoryApi* | [**repo_get_contents**](docs/RepositoryApi.md#repo_get_contents) | **GET** /repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir +*RepositoryApi* | [**repo_get_contents_list**](docs/RepositoryApi.md#repo_get_contents_list) | **GET** /repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir +*RepositoryApi* | [**repo_get_editor_config**](docs/RepositoryApi.md#repo_get_editor_config) | **GET** /repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository +*RepositoryApi* | [**repo_get_git_hook**](docs/RepositoryApi.md#repo_get_git_hook) | **GET** /repos/{owner}/{repo}/hooks/git/{id} | Get a Git hook +*RepositoryApi* | [**repo_get_hook**](docs/RepositoryApi.md#repo_get_hook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook +*RepositoryApi* | [**repo_get_issue_config**](docs/RepositoryApi.md#repo_get_issue_config) | **GET** /repos/{owner}/{repo}/issue_config | Returns the issue config for a repo +*RepositoryApi* | [**repo_get_issue_templates**](docs/RepositoryApi.md#repo_get_issue_templates) | **GET** /repos/{owner}/{repo}/issue_templates | Get available issue templates for a repository +*RepositoryApi* | [**repo_get_key**](docs/RepositoryApi.md#repo_get_key) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id +*RepositoryApi* | [**repo_get_languages**](docs/RepositoryApi.md#repo_get_languages) | **GET** /repos/{owner}/{repo}/languages | Get languages and number of bytes of code written +*RepositoryApi* | [**repo_get_latest_release**](docs/RepositoryApi.md#repo_get_latest_release) | **GET** /repos/{owner}/{repo}/releases/latest | Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at +*RepositoryApi* | [**repo_get_note**](docs/RepositoryApi.md#repo_get_note) | **GET** /repos/{owner}/{repo}/git/notes/{sha} | Get a note corresponding to a single commit from a repository +*RepositoryApi* | [**repo_get_pull_request**](docs/RepositoryApi.md#repo_get_pull_request) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request +*RepositoryApi* | [**repo_get_pull_request_by_base_head**](docs/RepositoryApi.md#repo_get_pull_request_by_base_head) | **GET** /repos/{owner}/{repo}/pulls/{base}/{head} | Get a pull request by base and head +*RepositoryApi* | [**repo_get_pull_request_commits**](docs/RepositoryApi.md#repo_get_pull_request_commits) | **GET** /repos/{owner}/{repo}/pulls/{index}/commits | Get commits for a pull request +*RepositoryApi* | [**repo_get_pull_request_files**](docs/RepositoryApi.md#repo_get_pull_request_files) | **GET** /repos/{owner}/{repo}/pulls/{index}/files | Get changed files for a pull request +*RepositoryApi* | [**repo_get_pull_review**](docs/RepositoryApi.md#repo_get_pull_review) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Get a specific review for a pull request +*RepositoryApi* | [**repo_get_pull_review_comment**](docs/RepositoryApi.md#repo_get_pull_review_comment) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment} | Get a pull review comment +*RepositoryApi* | [**repo_get_pull_review_comments**](docs/RepositoryApi.md#repo_get_pull_review_comments) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Get a specific review for a pull request +*RepositoryApi* | [**repo_get_push_mirror_by_remote_name**](docs/RepositoryApi.md#repo_get_push_mirror_by_remote_name) | **GET** /repos/{owner}/{repo}/push_mirrors/{name} | Get push mirror of the repository by remoteName +*RepositoryApi* | [**repo_get_raw_file**](docs/RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository +*RepositoryApi* | [**repo_get_raw_file_or_lfs**](docs/RepositoryApi.md#repo_get_raw_file_or_lfs) | **GET** /repos/{owner}/{repo}/media/{filepath} | Get a file or it's LFS object from a repository +*RepositoryApi* | [**repo_get_release**](docs/RepositoryApi.md#repo_get_release) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release +*RepositoryApi* | [**repo_get_release_attachment**](docs/RepositoryApi.md#repo_get_release_attachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment +*RepositoryApi* | [**repo_get_release_by_tag**](docs/RepositoryApi.md#repo_get_release_by_tag) | **GET** /repos/{owner}/{repo}/releases/tags/{tag} | Get a release by tag name +*RepositoryApi* | [**repo_get_repo_permissions**](docs/RepositoryApi.md#repo_get_repo_permissions) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator}/permission | Get repository permissions for a user +*RepositoryApi* | [**repo_get_reviewers**](docs/RepositoryApi.md#repo_get_reviewers) | **GET** /repos/{owner}/{repo}/reviewers | Return all users that can be requested to review in this repo +*RepositoryApi* | [**repo_get_runner_registration_token**](docs/RepositoryApi.md#repo_get_runner_registration_token) | **GET** /repos/{owner}/{repo}/actions/runners/registration-token | Get a repository's actions runner registration token +*RepositoryApi* | [**repo_get_single_commit**](docs/RepositoryApi.md#repo_get_single_commit) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository +*RepositoryApi* | [**repo_get_tag**](docs/RepositoryApi.md#repo_get_tag) | **GET** /repos/{owner}/{repo}/tags/{tag} | Get the tag of a repository by tag name +*RepositoryApi* | [**repo_get_tag_protection**](docs/RepositoryApi.md#repo_get_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections/{id} | Get a specific tag protection for the repository +*RepositoryApi* | [**repo_get_wiki_page**](docs/RepositoryApi.md#repo_get_wiki_page) | **GET** /repos/{owner}/{repo}/wiki/page/{pageName} | Get a wiki page +*RepositoryApi* | [**repo_get_wiki_page_revisions**](docs/RepositoryApi.md#repo_get_wiki_page_revisions) | **GET** /repos/{owner}/{repo}/wiki/revisions/{pageName} | Get revisions of a wiki page +*RepositoryApi* | [**repo_get_wiki_pages**](docs/RepositoryApi.md#repo_get_wiki_pages) | **GET** /repos/{owner}/{repo}/wiki/pages | Get all wiki pages +*RepositoryApi* | [**repo_list_actions_secrets**](docs/RepositoryApi.md#repo_list_actions_secrets) | **GET** /repos/{owner}/{repo}/actions/secrets | List an repo's actions secrets +*RepositoryApi* | [**repo_list_activity_feeds**](docs/RepositoryApi.md#repo_list_activity_feeds) | **GET** /repos/{owner}/{repo}/activities/feeds | List a repository's activity feeds +*RepositoryApi* | [**repo_list_all_git_refs**](docs/RepositoryApi.md#repo_list_all_git_refs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs +*RepositoryApi* | [**repo_list_branch_protection**](docs/RepositoryApi.md#repo_list_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections | List branch protections for a repository +*RepositoryApi* | [**repo_list_branches**](docs/RepositoryApi.md#repo_list_branches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches +*RepositoryApi* | [**repo_list_collaborators**](docs/RepositoryApi.md#repo_list_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators +*RepositoryApi* | [**repo_list_flags**](docs/RepositoryApi.md#repo_list_flags) | **GET** /repos/{owner}/{repo}/flags | List a repository's flags +*RepositoryApi* | [**repo_list_git_hooks**](docs/RepositoryApi.md#repo_list_git_hooks) | **GET** /repos/{owner}/{repo}/hooks/git | List the Git hooks in a repository +*RepositoryApi* | [**repo_list_git_refs**](docs/RepositoryApi.md#repo_list_git_refs) | **GET** /repos/{owner}/{repo}/git/refs/{ref} | Get specified ref or filtered repository's refs +*RepositoryApi* | [**repo_list_hooks**](docs/RepositoryApi.md#repo_list_hooks) | **GET** /repos/{owner}/{repo}/hooks | List the hooks in a repository +*RepositoryApi* | [**repo_list_keys**](docs/RepositoryApi.md#repo_list_keys) | **GET** /repos/{owner}/{repo}/keys | List a repository's keys +*RepositoryApi* | [**repo_list_pinned_issues**](docs/RepositoryApi.md#repo_list_pinned_issues) | **GET** /repos/{owner}/{repo}/issues/pinned | List a repo's pinned issues +*RepositoryApi* | [**repo_list_pinned_pull_requests**](docs/RepositoryApi.md#repo_list_pinned_pull_requests) | **GET** /repos/{owner}/{repo}/pulls/pinned | List a repo's pinned pull requests +*RepositoryApi* | [**repo_list_pull_requests**](docs/RepositoryApi.md#repo_list_pull_requests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results. +*RepositoryApi* | [**repo_list_pull_reviews**](docs/RepositoryApi.md#repo_list_pull_reviews) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews | List all reviews for a pull request +*RepositoryApi* | [**repo_list_push_mirrors**](docs/RepositoryApi.md#repo_list_push_mirrors) | **GET** /repos/{owner}/{repo}/push_mirrors | Get all push mirrors of the repository +*RepositoryApi* | [**repo_list_release_attachments**](docs/RepositoryApi.md#repo_list_release_attachments) | **GET** /repos/{owner}/{repo}/releases/{id}/assets | List release's attachments +*RepositoryApi* | [**repo_list_releases**](docs/RepositoryApi.md#repo_list_releases) | **GET** /repos/{owner}/{repo}/releases | List a repo's releases +*RepositoryApi* | [**repo_list_stargazers**](docs/RepositoryApi.md#repo_list_stargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers +*RepositoryApi* | [**repo_list_statuses**](docs/RepositoryApi.md#repo_list_statuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses +*RepositoryApi* | [**repo_list_statuses_by_ref**](docs/RepositoryApi.md#repo_list_statuses_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's statuses, by branch/tag/commit reference +*RepositoryApi* | [**repo_list_subscribers**](docs/RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers +*RepositoryApi* | [**repo_list_tag_protection**](docs/RepositoryApi.md#repo_list_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections | List tag protections for a repository +*RepositoryApi* | [**repo_list_tags**](docs/RepositoryApi.md#repo_list_tags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags +*RepositoryApi* | [**repo_list_teams**](docs/RepositoryApi.md#repo_list_teams) | **GET** /repos/{owner}/{repo}/teams | List a repository's teams +*RepositoryApi* | [**repo_list_topics**](docs/RepositoryApi.md#repo_list_topics) | **GET** /repos/{owner}/{repo}/topics | Get list of topics that a repository has +*RepositoryApi* | [**repo_merge_pull_request**](docs/RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request +*RepositoryApi* | [**repo_migrate**](docs/RepositoryApi.md#repo_migrate) | **POST** /repos/migrate | Migrate a remote git repository +*RepositoryApi* | [**repo_mirror_sync**](docs/RepositoryApi.md#repo_mirror_sync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository +*RepositoryApi* | [**repo_new_pin_allowed**](docs/RepositoryApi.md#repo_new_pin_allowed) | **GET** /repos/{owner}/{repo}/new_pin_allowed | Returns if new Issue Pins are allowed +*RepositoryApi* | [**repo_pull_request_is_merged**](docs/RepositoryApi.md#repo_pull_request_is_merged) | **GET** /repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged +*RepositoryApi* | [**repo_push_mirror_sync**](docs/RepositoryApi.md#repo_push_mirror_sync) | **POST** /repos/{owner}/{repo}/push_mirrors-sync | Sync all push mirrored repository +*RepositoryApi* | [**repo_remove_note**](docs/RepositoryApi.md#repo_remove_note) | **DELETE** /repos/{owner}/{repo}/git/notes/{sha} | Removes a note corresponding to a single commit from a repository +*RepositoryApi* | [**repo_replace_all_flags**](docs/RepositoryApi.md#repo_replace_all_flags) | **PUT** /repos/{owner}/{repo}/flags | Replace all flags of a repository +*RepositoryApi* | [**repo_search**](docs/RepositoryApi.md#repo_search) | **GET** /repos/search | Search for repositories +*RepositoryApi* | [**repo_search_run_jobs**](docs/RepositoryApi.md#repo_search_run_jobs) | **GET** /repos/{owner}/{repo}/actions/runners/jobs | Search for repository's action jobs according filter conditions +*RepositoryApi* | [**repo_set_note**](docs/RepositoryApi.md#repo_set_note) | **POST** /repos/{owner}/{repo}/git/notes/{sha} | Set a note corresponding to a single commit from a repository +*RepositoryApi* | [**repo_signing_key**](docs/RepositoryApi.md#repo_signing_key) | **GET** /repos/{owner}/{repo}/signing-key.gpg | Get signing-key.gpg for given repository +*RepositoryApi* | [**repo_submit_pull_review**](docs/RepositoryApi.md#repo_submit_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Submit a pending review to an pull request +*RepositoryApi* | [**repo_sync_fork_branch**](docs/RepositoryApi.md#repo_sync_fork_branch) | **POST** /repos/{owner}/{repo}/sync_fork/{branch} | Syncs a fork branch with the base branch +*RepositoryApi* | [**repo_sync_fork_branch_info**](docs/RepositoryApi.md#repo_sync_fork_branch_info) | **GET** /repos/{owner}/{repo}/sync_fork/{branch} | Gets information about syncing a fork branch with the base branch +*RepositoryApi* | [**repo_sync_fork_default**](docs/RepositoryApi.md#repo_sync_fork_default) | **POST** /repos/{owner}/{repo}/sync_fork | Syncs the default branch of a fork with the base branch +*RepositoryApi* | [**repo_sync_fork_default_info**](docs/RepositoryApi.md#repo_sync_fork_default_info) | **GET** /repos/{owner}/{repo}/sync_fork | Gets information about syncing the fork default branch with the base branch +*RepositoryApi* | [**repo_test_hook**](docs/RepositoryApi.md#repo_test_hook) | **POST** /repos/{owner}/{repo}/hooks/{id}/tests | Test a push webhook +*RepositoryApi* | [**repo_tracked_times**](docs/RepositoryApi.md#repo_tracked_times) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times +*RepositoryApi* | [**repo_transfer**](docs/RepositoryApi.md#repo_transfer) | **POST** /repos/{owner}/{repo}/transfer | Transfer a repo ownership +*RepositoryApi* | [**repo_un_dismiss_pull_review**](docs/RepositoryApi.md#repo_un_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals | Cancel to dismiss a review for a pull request +*RepositoryApi* | [**repo_update_avatar**](docs/RepositoryApi.md#repo_update_avatar) | **POST** /repos/{owner}/{repo}/avatar | Update a repository's avatar +*RepositoryApi* | [**repo_update_branch**](docs/RepositoryApi.md#repo_update_branch) | **PATCH** /repos/{owner}/{repo}/branches/{branch} | Update a branch +*RepositoryApi* | [**repo_update_file**](docs/RepositoryApi.md#repo_update_file) | **PUT** /repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository +*RepositoryApi* | [**repo_update_pull_request**](docs/RepositoryApi.md#repo_update_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/update | Merge PR's baseBranch into headBranch +*RepositoryApi* | [**repo_update_topics**](docs/RepositoryApi.md#repo_update_topics) | **PUT** /repos/{owner}/{repo}/topics | Replace list of topics for a repository +*RepositoryApi* | [**repo_validate_issue_config**](docs/RepositoryApi.md#repo_validate_issue_config) | **GET** /repos/{owner}/{repo}/issue_config/validate | Returns the validation information for a issue config +*RepositoryApi* | [**topic_search**](docs/RepositoryApi.md#topic_search) | **GET** /topics/search | Search for topics by keyword +*RepositoryApi* | [**update_repo_secret**](docs/RepositoryApi.md#update_repo_secret) | **PUT** /repos/{owner}/{repo}/actions/secrets/{secretname} | Create or Update a secret value in a repository +*RepositoryApi* | [**update_repo_variable**](docs/RepositoryApi.md#update_repo_variable) | **PUT** /repos/{owner}/{repo}/actions/variables/{variablename} | Update a repo-level variable +*RepositoryApi* | [**user_current_check_subscription**](docs/RepositoryApi.md#user_current_check_subscription) | **GET** /repos/{owner}/{repo}/subscription | Check if the current user is watching a repo +*RepositoryApi* | [**user_current_delete_subscription**](docs/RepositoryApi.md#user_current_delete_subscription) | **DELETE** /repos/{owner}/{repo}/subscription | Unwatch a repo +*RepositoryApi* | [**user_current_put_subscription**](docs/RepositoryApi.md#user_current_put_subscription) | **PUT** /repos/{owner}/{repo}/subscription | Watch a repo +*RepositoryApi* | [**user_tracked_times**](docs/RepositoryApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo +*SettingsApi* | [**get_general_api_settings**](docs/SettingsApi.md#get_general_api_settings) | **GET** /settings/api | Get instance's global settings for api +*SettingsApi* | [**get_general_attachment_settings**](docs/SettingsApi.md#get_general_attachment_settings) | **GET** /settings/attachment | Get instance's global settings for Attachment +*SettingsApi* | [**get_general_repository_settings**](docs/SettingsApi.md#get_general_repository_settings) | **GET** /settings/repository | Get instance's global settings for repositories +*SettingsApi* | [**get_general_ui_settings**](docs/SettingsApi.md#get_general_ui_settings) | **GET** /settings/ui | Get instance's global settings for ui +*UserApi* | [**create_current_user_repo**](docs/UserApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +*UserApi* | [**create_user_variable**](docs/UserApi.md#create_user_variable) | **POST** /user/actions/variables/{variablename} | Create a user-level variable +*UserApi* | [**delete_user_secret**](docs/UserApi.md#delete_user_secret) | **DELETE** /user/actions/secrets/{secretname} | Delete a secret in a user scope +*UserApi* | [**delete_user_variable**](docs/UserApi.md#delete_user_variable) | **DELETE** /user/actions/variables/{variablename} | Delete a user-level variable which is created by current doer +*UserApi* | [**get_user_settings**](docs/UserApi.md#get_user_settings) | **GET** /user/settings | Get current user's account settings +*UserApi* | [**get_user_variable**](docs/UserApi.md#get_user_variable) | **GET** /user/actions/variables/{variablename} | Get a user-level variable which is created by current doer +*UserApi* | [**get_user_variables_list**](docs/UserApi.md#get_user_variables_list) | **GET** /user/actions/variables | Get the user-level list of variables which is created by current doer +*UserApi* | [**get_verification_token**](docs/UserApi.md#get_verification_token) | **GET** /user/gpg_key_token | Get a Token to verify +*UserApi* | [**update_user_secret**](docs/UserApi.md#update_user_secret) | **PUT** /user/actions/secrets/{secretname} | Create or Update a secret value in a user scope +*UserApi* | [**update_user_settings**](docs/UserApi.md#update_user_settings) | **PATCH** /user/settings | Update settings in current user's account +*UserApi* | [**update_user_variable**](docs/UserApi.md#update_user_variable) | **PUT** /user/actions/variables/{variablename} | Update a user-level variable which is created by current doer +*UserApi* | [**user_add_email**](docs/UserApi.md#user_add_email) | **POST** /user/emails | Add an email addresses to the current user's account +*UserApi* | [**user_block_user**](docs/UserApi.md#user_block_user) | **PUT** /user/block/{username} | Blocks a user from the doer +*UserApi* | [**user_check_following**](docs/UserApi.md#user_check_following) | **GET** /users/{username}/following/{target} | Check if one user is following another user +*UserApi* | [**user_check_quota**](docs/UserApi.md#user_check_quota) | **GET** /user/quota/check | Check if the authenticated user is over quota for a given subject +*UserApi* | [**user_create_hook**](docs/UserApi.md#user_create_hook) | **POST** /user/hooks | Create a hook +*UserApi* | [**user_create_o_auth2_application**](docs/UserApi.md#user_create_o_auth2_application) | **POST** /user/applications/oauth2 | Creates a new OAuth2 application +*UserApi* | [**user_create_token**](docs/UserApi.md#user_create_token) | **POST** /users/{username}/tokens | Generate an access token for the specified user +*UserApi* | [**user_current_check_following**](docs/UserApi.md#user_current_check_following) | **GET** /user/following/{username} | Check whether a user is followed by the authenticated user +*UserApi* | [**user_current_check_starring**](docs/UserApi.md#user_current_check_starring) | **GET** /user/starred/{owner}/{repo} | Whether the authenticated is starring the repo +*UserApi* | [**user_current_delete_follow**](docs/UserApi.md#user_current_delete_follow) | **DELETE** /user/following/{username} | Unfollow a user +*UserApi* | [**user_current_delete_gpg_key**](docs/UserApi.md#user_current_delete_gpg_key) | **DELETE** /user/gpg_keys/{id} | Remove a GPG public key from current user's account +*UserApi* | [**user_current_delete_key**](docs/UserApi.md#user_current_delete_key) | **DELETE** /user/keys/{id} | Delete a public key +*UserApi* | [**user_current_delete_star**](docs/UserApi.md#user_current_delete_star) | **DELETE** /user/starred/{owner}/{repo} | Unstar the given repo +*UserApi* | [**user_current_get_gpg_key**](docs/UserApi.md#user_current_get_gpg_key) | **GET** /user/gpg_keys/{id} | Get a GPG key +*UserApi* | [**user_current_get_key**](docs/UserApi.md#user_current_get_key) | **GET** /user/keys/{id} | Get a public key +*UserApi* | [**user_current_list_followers**](docs/UserApi.md#user_current_list_followers) | **GET** /user/followers | List the authenticated user's followers +*UserApi* | [**user_current_list_following**](docs/UserApi.md#user_current_list_following) | **GET** /user/following | List the users that the authenticated user is following +*UserApi* | [**user_current_list_gpg_keys**](docs/UserApi.md#user_current_list_gpg_keys) | **GET** /user/gpg_keys | List the authenticated user's GPG keys +*UserApi* | [**user_current_list_keys**](docs/UserApi.md#user_current_list_keys) | **GET** /user/keys | List the authenticated user's public keys +*UserApi* | [**user_current_list_repos**](docs/UserApi.md#user_current_list_repos) | **GET** /user/repos | List the repos that the authenticated user owns +*UserApi* | [**user_current_list_starred**](docs/UserApi.md#user_current_list_starred) | **GET** /user/starred | The repos that the authenticated user has starred +*UserApi* | [**user_current_list_subscriptions**](docs/UserApi.md#user_current_list_subscriptions) | **GET** /user/subscriptions | List repositories watched by the authenticated user +*UserApi* | [**user_current_post_gpg_key**](docs/UserApi.md#user_current_post_gpg_key) | **POST** /user/gpg_keys | Add a GPG public key to current user's account +*UserApi* | [**user_current_post_key**](docs/UserApi.md#user_current_post_key) | **POST** /user/keys | Create a public key +*UserApi* | [**user_current_put_follow**](docs/UserApi.md#user_current_put_follow) | **PUT** /user/following/{username} | Follow a user +*UserApi* | [**user_current_put_star**](docs/UserApi.md#user_current_put_star) | **PUT** /user/starred/{owner}/{repo} | Star the given repo +*UserApi* | [**user_current_tracked_times**](docs/UserApi.md#user_current_tracked_times) | **GET** /user/times | List the current user's tracked times +*UserApi* | [**user_delete_access_token**](docs/UserApi.md#user_delete_access_token) | **DELETE** /users/{username}/tokens/{token} | Delete an access token from the specified user's account +*UserApi* | [**user_delete_avatar**](docs/UserApi.md#user_delete_avatar) | **DELETE** /user/avatar | Delete avatar of the current user. It will be replaced by a default one +*UserApi* | [**user_delete_email**](docs/UserApi.md#user_delete_email) | **DELETE** /user/emails | Delete email addresses from the current user's account +*UserApi* | [**user_delete_hook**](docs/UserApi.md#user_delete_hook) | **DELETE** /user/hooks/{id} | Delete a hook +*UserApi* | [**user_delete_o_auth2_application**](docs/UserApi.md#user_delete_o_auth2_application) | **DELETE** /user/applications/oauth2/{id} | Delete an OAuth2 application +*UserApi* | [**user_edit_hook**](docs/UserApi.md#user_edit_hook) | **PATCH** /user/hooks/{id} | Update a hook +*UserApi* | [**user_get**](docs/UserApi.md#user_get) | **GET** /users/{username} | Get a user +*UserApi* | [**user_get_current**](docs/UserApi.md#user_get_current) | **GET** /user | Get the authenticated user +*UserApi* | [**user_get_heatmap_data**](docs/UserApi.md#user_get_heatmap_data) | **GET** /users/{username}/heatmap | Get a user's heatmap +*UserApi* | [**user_get_hook**](docs/UserApi.md#user_get_hook) | **GET** /user/hooks/{id} | Get a hook +*UserApi* | [**user_get_o_auth2_application**](docs/UserApi.md#user_get_o_auth2_application) | **GET** /user/applications/oauth2/{id} | Get an OAuth2 application +*UserApi* | [**user_get_o_auth2_applications**](docs/UserApi.md#user_get_o_auth2_applications) | **GET** /user/applications/oauth2 | List the authenticated user's oauth2 applications +*UserApi* | [**user_get_quota**](docs/UserApi.md#user_get_quota) | **GET** /user/quota | Get quota information for the authenticated user +*UserApi* | [**user_get_runner_registration_token**](docs/UserApi.md#user_get_runner_registration_token) | **GET** /user/actions/runners/registration-token | Get an user's actions runner registration token +*UserApi* | [**user_get_stop_watches**](docs/UserApi.md#user_get_stop_watches) | **GET** /user/stopwatches | Get list of all existing stopwatches +*UserApi* | [**user_get_tokens**](docs/UserApi.md#user_get_tokens) | **GET** /users/{username}/tokens | List the specified user's access tokens +*UserApi* | [**user_list_activity_feeds**](docs/UserApi.md#user_list_activity_feeds) | **GET** /users/{username}/activities/feeds | List a user's activity feeds +*UserApi* | [**user_list_blocked_users**](docs/UserApi.md#user_list_blocked_users) | **GET** /user/list_blocked | List the authenticated user's blocked users +*UserApi* | [**user_list_emails**](docs/UserApi.md#user_list_emails) | **GET** /user/emails | List all email addresses of the current user +*UserApi* | [**user_list_followers**](docs/UserApi.md#user_list_followers) | **GET** /users/{username}/followers | List the given user's followers +*UserApi* | [**user_list_following**](docs/UserApi.md#user_list_following) | **GET** /users/{username}/following | List the users that the given user is following +*UserApi* | [**user_list_gpg_keys**](docs/UserApi.md#user_list_gpg_keys) | **GET** /users/{username}/gpg_keys | List the given user's GPG keys +*UserApi* | [**user_list_hooks**](docs/UserApi.md#user_list_hooks) | **GET** /user/hooks | List the authenticated user's webhooks +*UserApi* | [**user_list_keys**](docs/UserApi.md#user_list_keys) | **GET** /users/{username}/keys | List the given user's public keys +*UserApi* | [**user_list_quota_artifacts**](docs/UserApi.md#user_list_quota_artifacts) | **GET** /user/quota/artifacts | List the artifacts affecting the authenticated user's quota +*UserApi* | [**user_list_quota_attachments**](docs/UserApi.md#user_list_quota_attachments) | **GET** /user/quota/attachments | List the attachments affecting the authenticated user's quota +*UserApi* | [**user_list_quota_packages**](docs/UserApi.md#user_list_quota_packages) | **GET** /user/quota/packages | List the packages affecting the authenticated user's quota +*UserApi* | [**user_list_repos**](docs/UserApi.md#user_list_repos) | **GET** /users/{username}/repos | List the repos owned by the given user +*UserApi* | [**user_list_starred**](docs/UserApi.md#user_list_starred) | **GET** /users/{username}/starred | The repos that the given user has starred +*UserApi* | [**user_list_subscriptions**](docs/UserApi.md#user_list_subscriptions) | **GET** /users/{username}/subscriptions | List the repositories watched by a user +*UserApi* | [**user_list_teams**](docs/UserApi.md#user_list_teams) | **GET** /user/teams | List all the teams a user belongs to +*UserApi* | [**user_search**](docs/UserApi.md#user_search) | **GET** /users/search | Search for users +*UserApi* | [**user_search_run_jobs**](docs/UserApi.md#user_search_run_jobs) | **GET** /user/actions/runners/jobs | Search for user's action jobs according filter conditions +*UserApi* | [**user_unblock_user**](docs/UserApi.md#user_unblock_user) | **PUT** /user/unblock/{username} | Unblocks a user from the doer +*UserApi* | [**user_update_avatar**](docs/UserApi.md#user_update_avatar) | **POST** /user/avatar | Update avatar of the current user +*UserApi* | [**user_update_o_auth2_application**](docs/UserApi.md#user_update_o_auth2_application) | **PATCH** /user/applications/oauth2/{id} | Update an OAuth2 application, this includes regenerating the client secret +*UserApi* | [**user_verify_gpg_key**](docs/UserApi.md#user_verify_gpg_key) | **POST** /user/gpg_key_verify | Verify a GPG key + + +## Documentation For Models + + - [AccessToken](docs/AccessToken.md) + - [ActionRun](docs/ActionRun.md) + - [ActionRunJob](docs/ActionRunJob.md) + - [ActionTask](docs/ActionTask.md) + - [ActionTaskResponse](docs/ActionTaskResponse.md) + - [ActionVariable](docs/ActionVariable.md) + - [Activity](docs/Activity.md) + - [ActivityPub](docs/ActivityPub.md) + - [AddCollaboratorOption](docs/AddCollaboratorOption.md) + - [AddTimeOption](docs/AddTimeOption.md) + - [AnnotatedTag](docs/AnnotatedTag.md) + - [AnnotatedTagObject](docs/AnnotatedTagObject.md) + - [ApiError](docs/ApiError.md) + - [ApiForbiddenError](docs/ApiForbiddenError.md) + - [ApiInternalServerError](docs/ApiInternalServerError.md) + - [ApiInvalidTopicsError](docs/ApiInvalidTopicsError.md) + - [ApiNotFound](docs/ApiNotFound.md) + - [ApiRepoArchivedError](docs/ApiRepoArchivedError.md) + - [ApiUnauthorizedError](docs/ApiUnauthorizedError.md) + - [ApiValidationError](docs/ApiValidationError.md) + - [Attachment](docs/Attachment.md) + - [BlockedUser](docs/BlockedUser.md) + - [Branch](docs/Branch.md) + - [BranchProtection](docs/BranchProtection.md) + - [ChangeFileOperation](docs/ChangeFileOperation.md) + - [ChangeFilesOptions](docs/ChangeFilesOptions.md) + - [ChangedFile](docs/ChangedFile.md) + - [CombinedStatus](docs/CombinedStatus.md) + - [Comment](docs/Comment.md) + - [Commit](docs/Commit.md) + - [CommitAffectedFiles](docs/CommitAffectedFiles.md) + - [CommitDateOptions](docs/CommitDateOptions.md) + - [CommitMeta](docs/CommitMeta.md) + - [CommitStats](docs/CommitStats.md) + - [CommitStatus](docs/CommitStatus.md) + - [CommitUser](docs/CommitUser.md) + - [Compare](docs/Compare.md) + - [ContentsResponse](docs/ContentsResponse.md) + - [CreateAccessTokenOption](docs/CreateAccessTokenOption.md) + - [CreateBranchProtectionOption](docs/CreateBranchProtectionOption.md) + - [CreateBranchRepoOption](docs/CreateBranchRepoOption.md) + - [CreateEmailOption](docs/CreateEmailOption.md) + - [CreateFileOptions](docs/CreateFileOptions.md) + - [CreateForkOption](docs/CreateForkOption.md) + - [CreateGpgKeyOption](docs/CreateGpgKeyOption.md) + - [CreateHookOption](docs/CreateHookOption.md) + - [CreateIssueCommentOption](docs/CreateIssueCommentOption.md) + - [CreateIssueOption](docs/CreateIssueOption.md) + - [CreateKeyOption](docs/CreateKeyOption.md) + - [CreateLabelOption](docs/CreateLabelOption.md) + - [CreateMilestoneOption](docs/CreateMilestoneOption.md) + - [CreateOAuth2ApplicationOptions](docs/CreateOAuth2ApplicationOptions.md) + - [CreateOrUpdateSecretOption](docs/CreateOrUpdateSecretOption.md) + - [CreateOrgOption](docs/CreateOrgOption.md) + - [CreatePullRequestOption](docs/CreatePullRequestOption.md) + - [CreatePullReviewComment](docs/CreatePullReviewComment.md) + - [CreatePullReviewOptions](docs/CreatePullReviewOptions.md) + - [CreatePushMirrorOption](docs/CreatePushMirrorOption.md) + - [CreateQuotaGroupOptions](docs/CreateQuotaGroupOptions.md) + - [CreateQuotaRuleOptions](docs/CreateQuotaRuleOptions.md) + - [CreateReleaseOption](docs/CreateReleaseOption.md) + - [CreateRepoOption](docs/CreateRepoOption.md) + - [CreateStatusOption](docs/CreateStatusOption.md) + - [CreateTagOption](docs/CreateTagOption.md) + - [CreateTagProtectionOption](docs/CreateTagProtectionOption.md) + - [CreateTeamOption](docs/CreateTeamOption.md) + - [CreateUserOption](docs/CreateUserOption.md) + - [CreateVariableOption](docs/CreateVariableOption.md) + - [CreateWikiPageOptions](docs/CreateWikiPageOptions.md) + - [Cron](docs/Cron.md) + - [DeleteEmailOption](docs/DeleteEmailOption.md) + - [DeleteFileOptions](docs/DeleteFileOptions.md) + - [DeleteLabelsOption](docs/DeleteLabelsOption.md) + - [DeployKey](docs/DeployKey.md) + - [DismissPullReviewOptions](docs/DismissPullReviewOptions.md) + - [DispatchWorkflowOption](docs/DispatchWorkflowOption.md) + - [DispatchWorkflowRun](docs/DispatchWorkflowRun.md) + - [EditAttachmentOptions](docs/EditAttachmentOptions.md) + - [EditBranchProtectionOption](docs/EditBranchProtectionOption.md) + - [EditDeadlineOption](docs/EditDeadlineOption.md) + - [EditGitHookOption](docs/EditGitHookOption.md) + - [EditHookOption](docs/EditHookOption.md) + - [EditIssueCommentOption](docs/EditIssueCommentOption.md) + - [EditIssueOption](docs/EditIssueOption.md) + - [EditLabelOption](docs/EditLabelOption.md) + - [EditMilestoneOption](docs/EditMilestoneOption.md) + - [EditOrgOption](docs/EditOrgOption.md) + - [EditPullRequestOption](docs/EditPullRequestOption.md) + - [EditQuotaRuleOptions](docs/EditQuotaRuleOptions.md) + - [EditReactionOption](docs/EditReactionOption.md) + - [EditReleaseOption](docs/EditReleaseOption.md) + - [EditRepoOption](docs/EditRepoOption.md) + - [EditTagProtectionOption](docs/EditTagProtectionOption.md) + - [EditTeamOption](docs/EditTeamOption.md) + - [EditUserOption](docs/EditUserOption.md) + - [Email](docs/Email.md) + - [ExternalTracker](docs/ExternalTracker.md) + - [ExternalWiki](docs/ExternalWiki.md) + - [FileCommitResponse](docs/FileCommitResponse.md) + - [FileDeleteResponse](docs/FileDeleteResponse.md) + - [FileLinksResponse](docs/FileLinksResponse.md) + - [FileResponse](docs/FileResponse.md) + - [FilesResponse](docs/FilesResponse.md) + - [GeneralApiSettings](docs/GeneralApiSettings.md) + - [GeneralAttachmentSettings](docs/GeneralAttachmentSettings.md) + - [GeneralRepoSettings](docs/GeneralRepoSettings.md) + - [GeneralUiSettings](docs/GeneralUiSettings.md) + - [GenerateRepoOption](docs/GenerateRepoOption.md) + - [GitBlob](docs/GitBlob.md) + - [GitEntry](docs/GitEntry.md) + - [GitHook](docs/GitHook.md) + - [GitObject](docs/GitObject.md) + - [GitTreeResponse](docs/GitTreeResponse.md) + - [GitignoreTemplateInfo](docs/GitignoreTemplateInfo.md) + - [GpgKey](docs/GpgKey.md) + - [GpgKeyEmail](docs/GpgKeyEmail.md) + - [Hook](docs/Hook.md) + - [Identity](docs/Identity.md) + - [InternalTracker](docs/InternalTracker.md) + - [Issue](docs/Issue.md) + - [IssueConfig](docs/IssueConfig.md) + - [IssueConfigContactLink](docs/IssueConfigContactLink.md) + - [IssueConfigValidation](docs/IssueConfigValidation.md) + - [IssueDeadline](docs/IssueDeadline.md) + - [IssueFormField](docs/IssueFormField.md) + - [IssueLabelsOption](docs/IssueLabelsOption.md) + - [IssueMeta](docs/IssueMeta.md) + - [IssueTemplate](docs/IssueTemplate.md) + - [Label](docs/Label.md) + - [LabelTemplate](docs/LabelTemplate.md) + - [LicenseTemplateInfo](docs/LicenseTemplateInfo.md) + - [LicensesTemplateListEntry](docs/LicensesTemplateListEntry.md) + - [ListActionRunResponse](docs/ListActionRunResponse.md) + - [MarkdownOption](docs/MarkdownOption.md) + - [MarkupOption](docs/MarkupOption.md) + - [MergePullRequestOption](docs/MergePullRequestOption.md) + - [MigrateRepoOptions](docs/MigrateRepoOptions.md) + - [Milestone](docs/Milestone.md) + - [NewIssuePinsAllowed](docs/NewIssuePinsAllowed.md) + - [NodeInfo](docs/NodeInfo.md) + - [NodeInfoServices](docs/NodeInfoServices.md) + - [NodeInfoSoftware](docs/NodeInfoSoftware.md) + - [NodeInfoUsage](docs/NodeInfoUsage.md) + - [NodeInfoUsageUsers](docs/NodeInfoUsageUsers.md) + - [Note](docs/Note.md) + - [NoteOptions](docs/NoteOptions.md) + - [NotificationCount](docs/NotificationCount.md) + - [NotificationSubject](docs/NotificationSubject.md) + - [NotificationThread](docs/NotificationThread.md) + - [OAuth2Application](docs/OAuth2Application.md) + - [Organization](docs/Organization.md) + - [OrganizationPermissions](docs/OrganizationPermissions.md) + - [Package](docs/Package.md) + - [PackageFile](docs/PackageFile.md) + - [PayloadCommit](docs/PayloadCommit.md) + - [PayloadCommitVerification](docs/PayloadCommitVerification.md) + - [PayloadUser](docs/PayloadUser.md) + - [Permission](docs/Permission.md) + - [PrBranchInfo](docs/PrBranchInfo.md) + - [PublicKey](docs/PublicKey.md) + - [PullRequest](docs/PullRequest.md) + - [PullRequestMeta](docs/PullRequestMeta.md) + - [PullReview](docs/PullReview.md) + - [PullReviewComment](docs/PullReviewComment.md) + - [PullReviewRequestOptions](docs/PullReviewRequestOptions.md) + - [PushMirror](docs/PushMirror.md) + - [QuotaGroup](docs/QuotaGroup.md) + - [QuotaInfo](docs/QuotaInfo.md) + - [QuotaRuleInfo](docs/QuotaRuleInfo.md) + - [QuotaUsed](docs/QuotaUsed.md) + - [QuotaUsedArtifact](docs/QuotaUsedArtifact.md) + - [QuotaUsedAttachment](docs/QuotaUsedAttachment.md) + - [QuotaUsedAttachmentContainedIn](docs/QuotaUsedAttachmentContainedIn.md) + - [QuotaUsedPackage](docs/QuotaUsedPackage.md) + - [QuotaUsedSize](docs/QuotaUsedSize.md) + - [QuotaUsedSizeAssets](docs/QuotaUsedSizeAssets.md) + - [QuotaUsedSizeAssetsAttachments](docs/QuotaUsedSizeAssetsAttachments.md) + - [QuotaUsedSizeAssetsPackages](docs/QuotaUsedSizeAssetsPackages.md) + - [QuotaUsedSizeGit](docs/QuotaUsedSizeGit.md) + - [QuotaUsedSizeRepos](docs/QuotaUsedSizeRepos.md) + - [Reaction](docs/Reaction.md) + - [Reference](docs/Reference.md) + - [RegistrationToken](docs/RegistrationToken.md) + - [Release](docs/Release.md) + - [RenameOrgOption](docs/RenameOrgOption.md) + - [RenameUserOption](docs/RenameUserOption.md) + - [ReplaceFlagsOption](docs/ReplaceFlagsOption.md) + - [RepoCollaboratorPermission](docs/RepoCollaboratorPermission.md) + - [RepoCommit](docs/RepoCommit.md) + - [RepoCreateReleaseAttachmentRequest](docs/RepoCreateReleaseAttachmentRequest.md) + - [RepoTopicOptions](docs/RepoTopicOptions.md) + - [RepoTransfer](docs/RepoTransfer.md) + - [Repository](docs/Repository.md) + - [RepositoryMeta](docs/RepositoryMeta.md) + - [SearchResults](docs/SearchResults.md) + - [Secret](docs/Secret.md) + - [ServerVersion](docs/ServerVersion.md) + - [SetUserQuotaGroupsOptions](docs/SetUserQuotaGroupsOptions.md) + - [StopWatch](docs/StopWatch.md) + - [SubmitPullReviewOptions](docs/SubmitPullReviewOptions.md) + - [SyncForkInfo](docs/SyncForkInfo.md) + - [Tag](docs/Tag.md) + - [TagArchiveDownloadCount](docs/TagArchiveDownloadCount.md) + - [TagProtection](docs/TagProtection.md) + - [Team](docs/Team.md) + - [TeamSearchResults](docs/TeamSearchResults.md) + - [TimelineComment](docs/TimelineComment.md) + - [TopicName](docs/TopicName.md) + - [TopicResponse](docs/TopicResponse.md) + - [TopicSearchResults](docs/TopicSearchResults.md) + - [TrackedTime](docs/TrackedTime.md) + - [TransferRepoOption](docs/TransferRepoOption.md) + - [UpdateBranchRepoOption](docs/UpdateBranchRepoOption.md) + - [UpdateFileOptions](docs/UpdateFileOptions.md) + - [UpdateRepoAvatarOption](docs/UpdateRepoAvatarOption.md) + - [UpdateUserAvatarOption](docs/UpdateUserAvatarOption.md) + - [UpdateVariableOption](docs/UpdateVariableOption.md) + - [User](docs/User.md) + - [UserHeatmapData](docs/UserHeatmapData.md) + - [UserSearchResults](docs/UserSearchResults.md) + - [UserSettings](docs/UserSettings.md) + - [UserSettingsOptions](docs/UserSettingsOptions.md) + - [VerifyGpgKeyOption](docs/VerifyGpgKeyOption.md) + - [WatchInfo](docs/WatchInfo.md) + - [WikiCommit](docs/WikiCommit.md) + - [WikiCommitList](docs/WikiCommitList.md) + - [WikiPage](docs/WikiPage.md) + - [WikiPageMetaData](docs/WikiPageMetaData.md) + + +To get access to the crate's generated documentation, use: + +``` +cargo doc --open +``` + +## Author + + + diff --git a/forgejo-openapi/docs/AccessToken.md b/forgejo-openapi/docs/AccessToken.md new file mode 100644 index 0000000..d52fb41 --- /dev/null +++ b/forgejo-openapi/docs/AccessToken.md @@ -0,0 +1,15 @@ +# AccessToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] +**scopes** | Option<**Vec**> | | [optional] +**sha1** | Option<**String**> | | [optional] +**token_last_eight** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ActionRun.md b/forgejo-openapi/docs/ActionRun.md new file mode 100644 index 0000000..8114d38 --- /dev/null +++ b/forgejo-openapi/docs/ActionRun.md @@ -0,0 +1,33 @@ +# ActionRun + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**schedule_id** | Option<**i64**> | the cron id for the schedule trigger | [optional] +**approved_by** | Option<**i64**> | who approved this action run | [optional] +**commit_sha** | Option<**String**> | the commit sha the action run ran on | [optional] +**created** | Option<**String**> | when the action run was created | [optional] +**duration** | Option<**i64**> | A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years. | [optional] +**event** | Option<**String**> | the webhook event that causes the workflow to run | [optional] +**event_payload** | Option<**String**> | the payload of the webhook event that causes the workflow to run | [optional] +**html_url** | Option<**String**> | the url of this action run | [optional] +**id** | Option<**i64**> | the action run id | [optional] +**index_in_repo** | Option<**i64**> | a unique number for each run of a repository | [optional] +**is_fork_pull_request** | Option<**bool**> | If this is triggered by a PR from a forked repository or an untrusted user, we need to check if it is approved and limit permissions when running the workflow. | [optional] +**is_ref_deleted** | Option<**bool**> | has the commit/tag/… the action run ran on been deleted | [optional] +**need_approval** | Option<**bool**> | may need approval if it's a fork pull request | [optional] +**prettyref** | Option<**String**> | the commit/tag/… the action run ran on | [optional] +**repository** | Option<[**models::Repository**](Repository.md)> | | [optional] +**started** | Option<**String**> | when the action run was started | [optional] +**status** | Option<**String**> | the current status of this run | [optional] +**stopped** | Option<**String**> | when the action run was stopped | [optional] +**title** | Option<**String**> | the action run's title | [optional] +**trigger_event** | Option<**String**> | the trigger event defined in the `on` configuration of the triggered workflow | [optional] +**trigger_user** | Option<[**models::User**](User.md)> | | [optional] +**updated** | Option<**String**> | when the action run was last updated | [optional] +**workflow_id** | Option<**String**> | the name of workflow file | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ActionRunJob.md b/forgejo-openapi/docs/ActionRunJob.md new file mode 100644 index 0000000..ca0887c --- /dev/null +++ b/forgejo-openapi/docs/ActionRunJob.md @@ -0,0 +1,18 @@ +# ActionRunJob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | the action run job id | [optional] +**name** | Option<**String**> | the action run job name | [optional] +**needs** | Option<**Vec**> | the action run job needed ids | [optional] +**owner_id** | Option<**i64**> | the owner id | [optional] +**repo_id** | Option<**i64**> | the repository id | [optional] +**runs_on** | Option<**Vec**> | the action run job labels to run on | [optional] +**status** | Option<**String**> | the action run job status | [optional] +**task_id** | Option<**i64**> | the action run job latest task id | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ActionTask.md b/forgejo-openapi/docs/ActionTask.md new file mode 100644 index 0000000..3f70af3 --- /dev/null +++ b/forgejo-openapi/docs/ActionTask.md @@ -0,0 +1,23 @@ +# ActionTask + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | Option<**String**> | | [optional] +**display_title** | Option<**String**> | | [optional] +**event** | Option<**String**> | | [optional] +**head_branch** | Option<**String**> | | [optional] +**head_sha** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] +**run_number** | Option<**i64**> | | [optional] +**run_started_at** | Option<**String**> | | [optional] +**status** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] +**workflow_id** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ActionTaskResponse.md b/forgejo-openapi/docs/ActionTaskResponse.md new file mode 100644 index 0000000..3eeb5a4 --- /dev/null +++ b/forgejo-openapi/docs/ActionTaskResponse.md @@ -0,0 +1,12 @@ +# ActionTaskResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_count** | Option<**i64**> | | [optional] +**workflow_runs** | Option<[**Vec**](ActionTask.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ActionVariable.md b/forgejo-openapi/docs/ActionVariable.md new file mode 100644 index 0000000..663b9c0 --- /dev/null +++ b/forgejo-openapi/docs/ActionVariable.md @@ -0,0 +1,14 @@ +# ActionVariable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | Option<**String**> | the value of the variable | [optional] +**name** | Option<**String**> | the name of the variable | [optional] +**owner_id** | Option<**i64**> | the owner to which the variable belongs | [optional] +**repo_id** | Option<**i64**> | the repository to which the variable belongs | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Activity.md b/forgejo-openapi/docs/Activity.md new file mode 100644 index 0000000..3163858 --- /dev/null +++ b/forgejo-openapi/docs/Activity.md @@ -0,0 +1,23 @@ +# Activity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**act_user** | Option<[**models::User**](User.md)> | | [optional] +**act_user_id** | Option<**i64**> | | [optional] +**comment** | Option<[**models::Comment**](Comment.md)> | | [optional] +**comment_id** | Option<**i64**> | | [optional] +**content** | Option<**String**> | | [optional] +**created** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**is_private** | Option<**bool**> | | [optional] +**op_type** | Option<**OpType**> | the type of action (enum: create_repo, rename_repo, star_repo, watch_repo, commit_repo, create_issue, create_pull_request, transfer_repo, push_tag, comment_issue, merge_pull_request, close_issue, reopen_issue, close_pull_request, reopen_pull_request, delete_tag, delete_branch, mirror_sync_push, mirror_sync_create, mirror_sync_delete, approve_pull_request, reject_pull_request, comment_pull, publish_release, pull_review_dismissed, pull_request_ready_for_review, auto_merge_pull_request) | [optional] +**ref_name** | Option<**String**> | | [optional] +**repo** | Option<[**models::Repository**](Repository.md)> | | [optional] +**repo_id** | Option<**i64**> | | [optional] +**user_id** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ActivityPub.md b/forgejo-openapi/docs/ActivityPub.md new file mode 100644 index 0000000..433610d --- /dev/null +++ b/forgejo-openapi/docs/ActivityPub.md @@ -0,0 +1,11 @@ +# ActivityPub + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**at_context** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ActivitypubApi.md b/forgejo-openapi/docs/ActivitypubApi.md new file mode 100644 index 0000000..b788087 --- /dev/null +++ b/forgejo-openapi/docs/ActivitypubApi.md @@ -0,0 +1,321 @@ +# \ActivitypubApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**activitypub_instance_actor**](ActivitypubApi.md#activitypub_instance_actor) | **GET** /activitypub/actor | Returns the instance's Actor +[**activitypub_instance_actor_inbox**](ActivitypubApi.md#activitypub_instance_actor_inbox) | **POST** /activitypub/actor/inbox | Send to the inbox +[**activitypub_instance_actor_outbox**](ActivitypubApi.md#activitypub_instance_actor_outbox) | **POST** /activitypub/actor/outbox | Display the outbox (always empty) +[**activitypub_person**](ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user_id} | Returns the Person actor for a user +[**activitypub_person_activity**](ActivitypubApi.md#activitypub_person_activity) | **GET** /activitypub/user-id/{user_id}/activities/{activity_id}/activity | Get a specific activity of the user +[**activitypub_person_activity_note**](ActivitypubApi.md#activitypub_person_activity_note) | **GET** /activitypub/user-id/{user_id}/activities/{activity_id} | Get a specific activity object of the user +[**activitypub_person_feed**](ActivitypubApi.md#activitypub_person_feed) | **GET** /activitypub/user-id/{user_id}/outbox | List the user's recorded activity +[**activitypub_person_inbox**](ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user_id}/inbox | Send to the inbox +[**activitypub_repository**](ActivitypubApi.md#activitypub_repository) | **GET** /activitypub/repository-id/{repository_id} | Returns the Repository actor for a repo +[**activitypub_repository_inbox**](ActivitypubApi.md#activitypub_repository_inbox) | **POST** /activitypub/repository-id/{repository_id}/inbox | Send to the inbox +[**activitypub_repository_outbox**](ActivitypubApi.md#activitypub_repository_outbox) | **POST** /activitypub/repository-id/{repository_id}/outbox | Display the outbox + + + +## activitypub_instance_actor + +> models::ActivityPub activitypub_instance_actor() +Returns the instance's Actor + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::ActivityPub**](ActivityPub.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## activitypub_instance_actor_inbox + +> activitypub_instance_actor_inbox() +Send to the inbox + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## activitypub_instance_actor_outbox + +> serde_json::Value activitypub_instance_actor_outbox() +Display the outbox (always empty) + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/ld+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## activitypub_person + +> models::ActivityPub activitypub_person(user_id) +Returns the Person actor for a user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i64** | user ID of the user | [required] | + +### Return type + +[**models::ActivityPub**](ActivityPub.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## activitypub_person_activity + +> models::ActivityPub activitypub_person_activity(user_id, activity_id) +Get a specific activity of the user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | user ID of the user | [required] | +**activity_id** | **i32** | activity ID of the sought activity | [required] | + +### Return type + +[**models::ActivityPub**](ActivityPub.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## activitypub_person_activity_note + +> models::ActivityPub activitypub_person_activity_note(user_id, activity_id) +Get a specific activity object of the user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | user ID of the user | [required] | +**activity_id** | **i32** | activity ID of the sought activity | [required] | + +### Return type + +[**models::ActivityPub**](ActivityPub.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## activitypub_person_feed + +> serde_json::Value activitypub_person_feed(user_id) +List the user's recorded activity + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | user ID of the user | [required] | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## activitypub_person_inbox + +> activitypub_person_inbox(user_id) +Send to the inbox + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i64** | user ID of the user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## activitypub_repository + +> models::ActivityPub activitypub_repository(repository_id) +Returns the Repository actor for a repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**repository_id** | **i64** | repository ID of the repo | [required] | + +### Return type + +[**models::ActivityPub**](ActivityPub.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## activitypub_repository_inbox + +> activitypub_repository_inbox(repository_id, body) +Send to the inbox + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**repository_id** | **i64** | repository ID of the repo | [required] | +**body** | Option<**serde_json::Value**> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## activitypub_repository_outbox + +> serde_json::Value activitypub_repository_outbox(repository_id) +Display the outbox + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**repository_id** | **i64** | repository ID of the repo | [required] | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/ld+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/forgejo-openapi/docs/AddCollaboratorOption.md b/forgejo-openapi/docs/AddCollaboratorOption.md new file mode 100644 index 0000000..c614fd6 --- /dev/null +++ b/forgejo-openapi/docs/AddCollaboratorOption.md @@ -0,0 +1,11 @@ +# AddCollaboratorOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**permission** | Option<**Permission**> | (enum: read, write, admin) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/AddTimeOption.md b/forgejo-openapi/docs/AddTimeOption.md new file mode 100644 index 0000000..e64bdc4 --- /dev/null +++ b/forgejo-openapi/docs/AddTimeOption.md @@ -0,0 +1,13 @@ +# AddTimeOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | Option<**String**> | | [optional] +**time** | **i64** | time in seconds | +**user_name** | Option<**String**> | User who spent the time (optional) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/AdminApi.md b/forgejo-openapi/docs/AdminApi.md new file mode 100644 index 0000000..cb89920 --- /dev/null +++ b/forgejo-openapi/docs/AdminApi.md @@ -0,0 +1,1246 @@ +# \AdminApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**admin_add_rule_to_quota_group**](AdminApi.md#admin_add_rule_to_quota_group) | **PUT** /admin/quota/groups/{quotagroup}/rules/{quotarule} | Adds a rule to a quota group +[**admin_add_user_to_quota_group**](AdminApi.md#admin_add_user_to_quota_group) | **PUT** /admin/quota/groups/{quotagroup}/users/{username} | Add a user to a quota group +[**admin_adopt_repository**](AdminApi.md#admin_adopt_repository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository +[**admin_create_hook**](AdminApi.md#admin_create_hook) | **POST** /admin/hooks | Create a hook +[**admin_create_org**](AdminApi.md#admin_create_org) | **POST** /admin/users/{username}/orgs | Create an organization +[**admin_create_public_key**](AdminApi.md#admin_create_public_key) | **POST** /admin/users/{username}/keys | Add an SSH public key to user's account +[**admin_create_quota_group**](AdminApi.md#admin_create_quota_group) | **POST** /admin/quota/groups | Create a new quota group +[**admin_create_quota_rule**](AdminApi.md#admin_create_quota_rule) | **POST** /admin/quota/rules | Create a new quota rule +[**admin_create_repo**](AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf of a user +[**admin_create_user**](AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user account +[**admin_cron_list**](AdminApi.md#admin_cron_list) | **GET** /admin/cron | List cron tasks +[**admin_cron_run**](AdminApi.md#admin_cron_run) | **POST** /admin/cron/{task} | Run cron task +[**admin_delete_hook**](AdminApi.md#admin_delete_hook) | **DELETE** /admin/hooks/{id} | Delete a hook +[**admin_delete_quota_group**](AdminApi.md#admin_delete_quota_group) | **DELETE** /admin/quota/groups/{quotagroup} | Delete a quota group +[**admin_delete_quota_rule**](AdminApi.md#admin_delete_quota_rule) | **DELETE** /admin/quota/rules/{quotarule} | Deletes a quota rule +[**admin_delete_unadopted_repository**](AdminApi.md#admin_delete_unadopted_repository) | **DELETE** /admin/unadopted/{owner}/{repo} | Delete unadopted files +[**admin_delete_user**](AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete user account +[**admin_delete_user_emails**](AdminApi.md#admin_delete_user_emails) | **DELETE** /admin/users/{username}/emails | Delete email addresses from a user's account +[**admin_delete_user_public_key**](AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Remove a public key from user's account +[**admin_edit_hook**](AdminApi.md#admin_edit_hook) | **PATCH** /admin/hooks/{id} | Update a hook +[**admin_edit_quota_rule**](AdminApi.md#admin_edit_quota_rule) | **PATCH** /admin/quota/rules/{quotarule} | Change an existing quota rule +[**admin_edit_user**](AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user +[**admin_get_all_emails**](AdminApi.md#admin_get_all_emails) | **GET** /admin/emails | List all users' email addresses +[**admin_get_all_orgs**](AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations +[**admin_get_hook**](AdminApi.md#admin_get_hook) | **GET** /admin/hooks/{id} | Get a hook +[**admin_get_quota_group**](AdminApi.md#admin_get_quota_group) | **GET** /admin/quota/groups/{quotagroup} | Get information about the quota group +[**admin_get_quota_rule**](AdminApi.md#admin_get_quota_rule) | **GET** /admin/quota/rules/{quotarule} | Get information about a quota rule +[**admin_get_runner_registration_token**](AdminApi.md#admin_get_runner_registration_token) | **GET** /admin/runners/registration-token | Get an global actions runner registration token +[**admin_get_user_quota**](AdminApi.md#admin_get_user_quota) | **GET** /admin/users/{username}/quota | Get the user's quota info +[**admin_list_hooks**](AdminApi.md#admin_list_hooks) | **GET** /admin/hooks | List global (system) webhooks +[**admin_list_quota_groups**](AdminApi.md#admin_list_quota_groups) | **GET** /admin/quota/groups | List the available quota groups +[**admin_list_quota_rules**](AdminApi.md#admin_list_quota_rules) | **GET** /admin/quota/rules | List the available quota rules +[**admin_list_user_emails**](AdminApi.md#admin_list_user_emails) | **GET** /admin/users/{username}/emails | List all email addresses for a user +[**admin_list_users_in_quota_group**](AdminApi.md#admin_list_users_in_quota_group) | **GET** /admin/quota/groups/{quotagroup}/users | List users in a quota group +[**admin_remove_rule_from_quota_group**](AdminApi.md#admin_remove_rule_from_quota_group) | **DELETE** /admin/quota/groups/{quotagroup}/rules/{quotarule} | Removes a rule from a quota group +[**admin_remove_user_from_quota_group**](AdminApi.md#admin_remove_user_from_quota_group) | **DELETE** /admin/quota/groups/{quotagroup}/users/{username} | Remove a user from a quota group +[**admin_rename_user**](AdminApi.md#admin_rename_user) | **POST** /admin/users/{username}/rename | Rename a user +[**admin_search_emails**](AdminApi.md#admin_search_emails) | **GET** /admin/emails/search | Search users' email addresses +[**admin_search_run_jobs**](AdminApi.md#admin_search_run_jobs) | **GET** /admin/runners/jobs | Search action jobs according filter conditions +[**admin_search_users**](AdminApi.md#admin_search_users) | **GET** /admin/users | Search users according filter conditions +[**admin_set_user_quota_groups**](AdminApi.md#admin_set_user_quota_groups) | **POST** /admin/users/{username}/quota/groups | Set the user's quota groups to a given list. +[**admin_unadopted_list**](AdminApi.md#admin_unadopted_list) | **GET** /admin/unadopted | List unadopted repositories + + + +## admin_add_rule_to_quota_group + +> admin_add_rule_to_quota_group(quotagroup, quotarule) +Adds a rule to a quota group + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**quotagroup** | **String** | quota group to add a rule to | [required] | +**quotarule** | **String** | the name of the quota rule to add to the group | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_add_user_to_quota_group + +> admin_add_user_to_quota_group(quotagroup, username) +Add a user to a quota group + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**quotagroup** | **String** | quota group to add the user to | [required] | +**username** | **String** | username of the user to add to the quota group | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_adopt_repository + +> admin_adopt_repository(owner, repo) +Adopt unadopted files as a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_create_hook + +> models::Hook admin_create_hook(body) +Create a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | [**CreateHookOption**](CreateHookOption.md) | | [required] | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_create_org + +> models::Organization admin_create_org(username, organization) +Create an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of the user that will own the created organization | [required] | +**organization** | [**CreateOrgOption**](CreateOrgOption.md) | | [required] | + +### Return type + +[**models::Organization**](Organization.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_create_public_key + +> models::PublicKey admin_create_public_key(username, key) +Add an SSH public key to user's account + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of the user | [required] | +**key** | Option<[**CreateKeyOption**](CreateKeyOption.md)> | | | + +### Return type + +[**models::PublicKey**](PublicKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_create_quota_group + +> models::QuotaGroup admin_create_quota_group(group) +Create a new quota group + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group** | [**CreateQuotaGroupOptions**](CreateQuotaGroupOptions.md) | Definition of the quota group | [required] | + +### Return type + +[**models::QuotaGroup**](QuotaGroup.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_create_quota_rule + +> models::QuotaRuleInfo admin_create_quota_rule(rule) +Create a new quota rule + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**rule** | [**CreateQuotaRuleOptions**](CreateQuotaRuleOptions.md) | Definition of the quota rule | [required] | + +### Return type + +[**models::QuotaRuleInfo**](QuotaRuleInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_create_repo + +> models::Repository admin_create_repo(username, repository) +Create a repository on behalf of a user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of the user. This user will own the created repository | [required] | +**repository** | [**CreateRepoOption**](CreateRepoOption.md) | | [required] | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_create_user + +> models::User admin_create_user(body) +Create a user account + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**CreateUserOption**](CreateUserOption.md)> | | | + +### Return type + +[**models::User**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_cron_list + +> Vec admin_cron_list(page, limit) +List cron tasks + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Cron.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_cron_run + +> admin_cron_run(task) +Run cron task + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**task** | **String** | task to run | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_delete_hook + +> admin_delete_hook(id) +Delete a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the hook to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_delete_quota_group + +> admin_delete_quota_group(quotagroup) +Delete a quota group + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**quotagroup** | **String** | quota group to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_delete_quota_rule + +> admin_delete_quota_rule(quotarule) +Deletes a quota rule + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**quotarule** | **String** | quota rule to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_delete_unadopted_repository + +> admin_delete_unadopted_repository(owner, repo) +Delete unadopted files + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_delete_user + +> admin_delete_user(username, purge) +Delete user account + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user to delete | [required] | +**purge** | Option<**bool**> | purge the user from the system completely | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_delete_user_emails + +> admin_delete_user_emails(username, body) +Delete email addresses from a user's account + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user to delete email addresses from | [required] | +**body** | Option<[**DeleteEmailOption**](DeleteEmailOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_delete_user_public_key + +> admin_delete_user_public_key(username, id) +Remove a public key from user's account + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**id** | **i64** | id of the key to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_edit_hook + +> models::Hook admin_edit_hook(id, body) +Update a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the hook to update | [required] | +**body** | Option<[**EditHookOption**](EditHookOption.md)> | | | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_edit_quota_rule + +> models::QuotaRuleInfo admin_edit_quota_rule(quotarule, rule) +Change an existing quota rule + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**quotarule** | **String** | Quota rule to change | [required] | +**rule** | [**EditQuotaRuleOptions**](EditQuotaRuleOptions.md) | | [required] | + +### Return type + +[**models::QuotaRuleInfo**](QuotaRuleInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_edit_user + +> models::User admin_edit_user(username, body) +Edit an existing user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user to edit | [required] | +**body** | Option<[**EditUserOption**](EditUserOption.md)> | | | + +### Return type + +[**models::User**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_get_all_emails + +> Vec admin_get_all_emails(page, limit) +List all users' email addresses + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Email.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_get_all_orgs + +> Vec admin_get_all_orgs(page, limit) +List all organizations + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Organization.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_get_hook + +> models::Hook admin_get_hook(id) +Get a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the hook to get | [required] | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_get_quota_group + +> models::QuotaGroup admin_get_quota_group(quotagroup) +Get information about the quota group + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**quotagroup** | **String** | quota group to query | [required] | + +### Return type + +[**models::QuotaGroup**](QuotaGroup.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_get_quota_rule + +> models::QuotaRuleInfo admin_get_quota_rule(quotarule) +Get information about a quota rule + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**quotarule** | **String** | quota rule to query | [required] | + +### Return type + +[**models::QuotaRuleInfo**](QuotaRuleInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_get_runner_registration_token + +> models::RegistrationToken admin_get_runner_registration_token() +Get an global actions runner registration token + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::RegistrationToken**](RegistrationToken.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_get_user_quota + +> models::QuotaInfo admin_get_user_quota(username) +Get the user's quota info + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user to query | [required] | + +### Return type + +[**models::QuotaInfo**](QuotaInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_list_hooks + +> Vec admin_list_hooks(page, limit) +List global (system) webhooks + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_list_quota_groups + +> Vec admin_list_quota_groups() +List the available quota groups + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Vec**](QuotaGroup.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_list_quota_rules + +> Vec admin_list_quota_rules() +List the available quota rules + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Vec**](QuotaRuleInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_list_user_emails + +> Vec admin_list_user_emails(username) +List all email addresses for a user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user to get email addresses of | [required] | + +### Return type + +[**Vec**](Email.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_list_users_in_quota_group + +> Vec admin_list_users_in_quota_group(quotagroup) +List users in a quota group + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**quotagroup** | **String** | quota group to list members of | [required] | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_remove_rule_from_quota_group + +> admin_remove_rule_from_quota_group(quotagroup, quotarule) +Removes a rule from a quota group + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**quotagroup** | **String** | quota group to remove a rule from | [required] | +**quotarule** | **String** | the name of the quota rule to remove from the group | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_remove_user_from_quota_group + +> admin_remove_user_from_quota_group(quotagroup, username) +Remove a user from a quota group + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**quotagroup** | **String** | quota group to remove a user from | [required] | +**username** | **String** | username of the user to remove from the quota group | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_rename_user + +> admin_rename_user(username, body) +Rename a user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | existing username of user | [required] | +**body** | [**RenameUserOption**](RenameUserOption.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_search_emails + +> Vec admin_search_emails(q, page, limit) +Search users' email addresses + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**q** | Option<**String**> | keyword | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Email.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_search_run_jobs + +> Vec admin_search_run_jobs(labels) +Search action jobs according filter conditions + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**labels** | Option<**String**> | a comma separated list of run job labels to search for | | + +### Return type + +[**Vec**](ActionRunJob.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_search_users + +> Vec admin_search_users(source_id, login_name, sort, page, limit) +Search users according filter conditions + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**source_id** | Option<**i64**> | ID of the user's login source to search for | | +**login_name** | Option<**String**> | user's login name to search for | | +**sort** | Option<**String**> | sort order of results | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_set_user_quota_groups + +> admin_set_user_quota_groups(username, groups) +Set the user's quota groups to a given list. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of the user to modify the quota groups from | [required] | +**groups** | [**SetUserQuotaGroupsOptions**](SetUserQuotaGroupsOptions.md) | list of groups that the user should be a member of | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## admin_unadopted_list + +> Vec admin_unadopted_list(page, limit, pattern) +List unadopted repositories + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | +**pattern** | Option<**String**> | pattern of repositories to search for | | + +### Return type + +**Vec** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/forgejo-openapi/docs/AnnotatedTag.md b/forgejo-openapi/docs/AnnotatedTag.md new file mode 100644 index 0000000..69fec26 --- /dev/null +++ b/forgejo-openapi/docs/AnnotatedTag.md @@ -0,0 +1,18 @@ +# AnnotatedTag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**archive_download_count** | Option<[**models::TagArchiveDownloadCount**](TagArchiveDownloadCount.md)> | | [optional] +**message** | Option<**String**> | | [optional] +**object** | Option<[**models::AnnotatedTagObject**](AnnotatedTagObject.md)> | | [optional] +**sha** | Option<**String**> | | [optional] +**tag** | Option<**String**> | | [optional] +**tagger** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] +**url** | Option<**String**> | | [optional] +**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/AnnotatedTagObject.md b/forgejo-openapi/docs/AnnotatedTagObject.md new file mode 100644 index 0000000..01837b9 --- /dev/null +++ b/forgejo-openapi/docs/AnnotatedTagObject.md @@ -0,0 +1,13 @@ +# AnnotatedTagObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha** | Option<**String**> | | [optional] +**r#type** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ApiError.md b/forgejo-openapi/docs/ApiError.md new file mode 100644 index 0000000..94e66d5 --- /dev/null +++ b/forgejo-openapi/docs/ApiError.md @@ -0,0 +1,12 @@ +# ApiError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ApiForbiddenError.md b/forgejo-openapi/docs/ApiForbiddenError.md new file mode 100644 index 0000000..b786de3 --- /dev/null +++ b/forgejo-openapi/docs/ApiForbiddenError.md @@ -0,0 +1,12 @@ +# ApiForbiddenError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ApiInternalServerError.md b/forgejo-openapi/docs/ApiInternalServerError.md new file mode 100644 index 0000000..07fb4ac --- /dev/null +++ b/forgejo-openapi/docs/ApiInternalServerError.md @@ -0,0 +1,12 @@ +# ApiInternalServerError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ApiInvalidTopicsError.md b/forgejo-openapi/docs/ApiInvalidTopicsError.md new file mode 100644 index 0000000..6bf2d24 --- /dev/null +++ b/forgejo-openapi/docs/ApiInvalidTopicsError.md @@ -0,0 +1,12 @@ +# ApiInvalidTopicsError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invalid_topics** | Option<**Vec**> | | [optional] +**message** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ApiNotFound.md b/forgejo-openapi/docs/ApiNotFound.md new file mode 100644 index 0000000..18d5230 --- /dev/null +++ b/forgejo-openapi/docs/ApiNotFound.md @@ -0,0 +1,13 @@ +# ApiNotFound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | Option<**Vec**> | | [optional] +**message** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ApiRepoArchivedError.md b/forgejo-openapi/docs/ApiRepoArchivedError.md new file mode 100644 index 0000000..5b2f93c --- /dev/null +++ b/forgejo-openapi/docs/ApiRepoArchivedError.md @@ -0,0 +1,12 @@ +# ApiRepoArchivedError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ApiUnauthorizedError.md b/forgejo-openapi/docs/ApiUnauthorizedError.md new file mode 100644 index 0000000..6ce0171 --- /dev/null +++ b/forgejo-openapi/docs/ApiUnauthorizedError.md @@ -0,0 +1,12 @@ +# ApiUnauthorizedError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ApiValidationError.md b/forgejo-openapi/docs/ApiValidationError.md new file mode 100644 index 0000000..e074c1a --- /dev/null +++ b/forgejo-openapi/docs/ApiValidationError.md @@ -0,0 +1,12 @@ +# ApiValidationError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Attachment.md b/forgejo-openapi/docs/Attachment.md new file mode 100644 index 0000000..d57ae79 --- /dev/null +++ b/forgejo-openapi/docs/Attachment.md @@ -0,0 +1,18 @@ +# Attachment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**browser_download_url** | Option<**String**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**download_count** | Option<**i64**> | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] +**size** | Option<**i64**> | | [optional] +**r#type** | Option<**Type**> | (enum: attachment, external) | [optional] +**uuid** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/BlockedUser.md b/forgejo-openapi/docs/BlockedUser.md new file mode 100644 index 0000000..0cd7f99 --- /dev/null +++ b/forgejo-openapi/docs/BlockedUser.md @@ -0,0 +1,12 @@ +# BlockedUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**block_id** | Option<**i64**> | | [optional] +**created_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Branch.md b/forgejo-openapi/docs/Branch.md new file mode 100644 index 0000000..4f50aa0 --- /dev/null +++ b/forgejo-openapi/docs/Branch.md @@ -0,0 +1,19 @@ +# Branch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | Option<[**models::PayloadCommit**](PayloadCommit.md)> | | [optional] +**effective_branch_protection_name** | Option<**String**> | | [optional] +**enable_status_check** | Option<**bool**> | | [optional] +**name** | Option<**String**> | | [optional] +**protected** | Option<**bool**> | | [optional] +**required_approvals** | Option<**i64**> | | [optional] +**status_check_contexts** | Option<**Vec**> | | [optional] +**user_can_merge** | Option<**bool**> | | [optional] +**user_can_push** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/BranchProtection.md b/forgejo-openapi/docs/BranchProtection.md new file mode 100644 index 0000000..6ecc625 --- /dev/null +++ b/forgejo-openapi/docs/BranchProtection.md @@ -0,0 +1,37 @@ +# BranchProtection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apply_to_admins** | Option<**bool**> | | [optional] +**approvals_whitelist_teams** | Option<**Vec**> | | [optional] +**approvals_whitelist_username** | Option<**Vec**> | | [optional] +**block_on_official_review_requests** | Option<**bool**> | | [optional] +**block_on_outdated_branch** | Option<**bool**> | | [optional] +**block_on_rejected_reviews** | Option<**bool**> | | [optional] +**branch_name** | Option<**String**> | Deprecated: true | [optional] +**created_at** | Option<**String**> | | [optional] +**dismiss_stale_approvals** | Option<**bool**> | | [optional] +**enable_approvals_whitelist** | Option<**bool**> | | [optional] +**enable_merge_whitelist** | Option<**bool**> | | [optional] +**enable_push** | Option<**bool**> | | [optional] +**enable_push_whitelist** | Option<**bool**> | | [optional] +**enable_status_check** | Option<**bool**> | | [optional] +**ignore_stale_approvals** | Option<**bool**> | | [optional] +**merge_whitelist_teams** | Option<**Vec**> | | [optional] +**merge_whitelist_usernames** | Option<**Vec**> | | [optional] +**protected_file_patterns** | Option<**String**> | | [optional] +**push_whitelist_deploy_keys** | Option<**bool**> | | [optional] +**push_whitelist_teams** | Option<**Vec**> | | [optional] +**push_whitelist_usernames** | Option<**Vec**> | | [optional] +**require_signed_commits** | Option<**bool**> | | [optional] +**required_approvals** | Option<**i64**> | | [optional] +**rule_name** | Option<**String**> | | [optional] +**status_check_contexts** | Option<**Vec**> | | [optional] +**unprotected_file_patterns** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ChangeFileOperation.md b/forgejo-openapi/docs/ChangeFileOperation.md new file mode 100644 index 0000000..e960e92 --- /dev/null +++ b/forgejo-openapi/docs/ChangeFileOperation.md @@ -0,0 +1,15 @@ +# ChangeFileOperation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | Option<**String**> | new or updated file content, must be base64 encoded | [optional] +**from_path** | Option<**String**> | old path of the file to move | [optional] +**operation** | **Operation** | indicates what to do with the file (enum: create, update, delete) | +**path** | **String** | path to the existing or new file | +**sha** | Option<**String**> | sha is the SHA for the file that already exists, required for update or delete | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ChangeFilesOptions.md b/forgejo-openapi/docs/ChangeFilesOptions.md new file mode 100644 index 0000000..afee795 --- /dev/null +++ b/forgejo-openapi/docs/ChangeFilesOptions.md @@ -0,0 +1,18 @@ +# ChangeFilesOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | Option<[**models::Identity**](Identity.md)> | | [optional] +**branch** | Option<**String**> | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | Option<[**models::Identity**](Identity.md)> | | [optional] +**dates** | Option<[**models::CommitDateOptions**](CommitDateOptions.md)> | | [optional] +**files** | [**Vec**](ChangeFileOperation.md) | list of file operations | +**message** | Option<**String**> | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**new_branch** | Option<**String**> | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**signoff** | Option<**bool**> | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ChangedFile.md b/forgejo-openapi/docs/ChangedFile.md new file mode 100644 index 0000000..680133b --- /dev/null +++ b/forgejo-openapi/docs/ChangedFile.md @@ -0,0 +1,19 @@ +# ChangedFile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additions** | Option<**i64**> | | [optional] +**changes** | Option<**i64**> | | [optional] +**contents_url** | Option<**String**> | | [optional] +**deletions** | Option<**i64**> | | [optional] +**filename** | Option<**String**> | | [optional] +**html_url** | Option<**String**> | | [optional] +**previous_filename** | Option<**String**> | | [optional] +**raw_url** | Option<**String**> | | [optional] +**status** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CombinedStatus.md b/forgejo-openapi/docs/CombinedStatus.md new file mode 100644 index 0000000..5adaf8f --- /dev/null +++ b/forgejo-openapi/docs/CombinedStatus.md @@ -0,0 +1,17 @@ +# CombinedStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit_url** | Option<**String**> | | [optional] +**repository** | Option<[**models::Repository**](Repository.md)> | | [optional] +**sha** | Option<**String**> | | [optional] +**state** | Option<**String**> | CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" | [optional] +**statuses** | Option<[**Vec**](CommitStatus.md)> | | [optional] +**total_count** | Option<**i64**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Comment.md b/forgejo-openapi/docs/Comment.md new file mode 100644 index 0000000..fcf0484 --- /dev/null +++ b/forgejo-openapi/docs/Comment.md @@ -0,0 +1,21 @@ +# Comment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets** | Option<[**Vec**](Attachment.md)> | | [optional] +**body** | Option<**String**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**html_url** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**issue_url** | Option<**String**> | | [optional] +**original_author** | Option<**String**> | | [optional] +**original_author_id** | Option<**i64**> | | [optional] +**pull_request_url** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**user** | Option<[**models::User**](User.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Commit.md b/forgejo-openapi/docs/Commit.md new file mode 100644 index 0000000..6bc6fd8 --- /dev/null +++ b/forgejo-openapi/docs/Commit.md @@ -0,0 +1,20 @@ +# Commit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | Option<[**models::User**](User.md)> | | [optional] +**commit** | Option<[**models::RepoCommit**](RepoCommit.md)> | | [optional] +**committer** | Option<[**models::User**](User.md)> | | [optional] +**created** | Option<**String**> | | [optional] +**files** | Option<[**Vec**](CommitAffectedFiles.md)> | | [optional] +**html_url** | Option<**String**> | | [optional] +**parents** | Option<[**Vec**](CommitMeta.md)> | | [optional] +**sha** | Option<**String**> | | [optional] +**stats** | Option<[**models::CommitStats**](CommitStats.md)> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CommitAffectedFiles.md b/forgejo-openapi/docs/CommitAffectedFiles.md new file mode 100644 index 0000000..04ca21e --- /dev/null +++ b/forgejo-openapi/docs/CommitAffectedFiles.md @@ -0,0 +1,12 @@ +# CommitAffectedFiles + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | Option<**String**> | | [optional] +**status** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CommitDateOptions.md b/forgejo-openapi/docs/CommitDateOptions.md new file mode 100644 index 0000000..b118f48 --- /dev/null +++ b/forgejo-openapi/docs/CommitDateOptions.md @@ -0,0 +1,12 @@ +# CommitDateOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | Option<**String**> | | [optional] +**committer** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CommitMeta.md b/forgejo-openapi/docs/CommitMeta.md new file mode 100644 index 0000000..e026016 --- /dev/null +++ b/forgejo-openapi/docs/CommitMeta.md @@ -0,0 +1,13 @@ +# CommitMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | Option<**String**> | | [optional] +**sha** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CommitStats.md b/forgejo-openapi/docs/CommitStats.md new file mode 100644 index 0000000..1ebf9e2 --- /dev/null +++ b/forgejo-openapi/docs/CommitStats.md @@ -0,0 +1,13 @@ +# CommitStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additions** | Option<**i64**> | | [optional] +**deletions** | Option<**i64**> | | [optional] +**total** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CommitStatus.md b/forgejo-openapi/docs/CommitStatus.md new file mode 100644 index 0000000..e78b65b --- /dev/null +++ b/forgejo-openapi/docs/CommitStatus.md @@ -0,0 +1,19 @@ +# CommitStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | Option<**String**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**creator** | Option<[**models::User**](User.md)> | | [optional] +**description** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**status** | Option<**String**> | CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" | [optional] +**target_url** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CommitUser.md b/forgejo-openapi/docs/CommitUser.md new file mode 100644 index 0000000..cafe69d --- /dev/null +++ b/forgejo-openapi/docs/CommitUser.md @@ -0,0 +1,13 @@ +# CommitUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Compare.md b/forgejo-openapi/docs/Compare.md new file mode 100644 index 0000000..3b3618f --- /dev/null +++ b/forgejo-openapi/docs/Compare.md @@ -0,0 +1,13 @@ +# Compare + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commits** | Option<[**Vec**](Commit.md)> | | [optional] +**files** | Option<[**Vec**](CommitAffectedFiles.md)> | | [optional] +**total_commits** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ContentsResponse.md b/forgejo-openapi/docs/ContentsResponse.md new file mode 100644 index 0000000..6fe7047 --- /dev/null +++ b/forgejo-openapi/docs/ContentsResponse.md @@ -0,0 +1,26 @@ +# ContentsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | Option<[**models::FileLinksResponse**](FileLinksResponse.md)> | | [optional] +**content** | Option<**String**> | `content` is populated when `type` is `file`, otherwise null | [optional] +**download_url** | Option<**String**> | | [optional] +**encoding** | Option<**String**> | `encoding` is populated when `type` is `file`, otherwise null | [optional] +**git_url** | Option<**String**> | | [optional] +**html_url** | Option<**String**> | | [optional] +**last_commit_sha** | Option<**String**> | | [optional] +**last_commit_when** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**path** | Option<**String**> | | [optional] +**sha** | Option<**String**> | | [optional] +**size** | Option<**i64**> | | [optional] +**submodule_git_url** | Option<**String**> | `submodule_git_url` is populated when `type` is `submodule`, otherwise null | [optional] +**target** | Option<**String**> | `target` is populated when `type` is `symlink`, otherwise null | [optional] +**r#type** | Option<**String**> | `type` will be `file`, `dir`, `symlink`, or `submodule` | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateAccessTokenOption.md b/forgejo-openapi/docs/CreateAccessTokenOption.md new file mode 100644 index 0000000..604b7d9 --- /dev/null +++ b/forgejo-openapi/docs/CreateAccessTokenOption.md @@ -0,0 +1,12 @@ +# CreateAccessTokenOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**scopes** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateBranchProtectionOption.md b/forgejo-openapi/docs/CreateBranchProtectionOption.md new file mode 100644 index 0000000..44f565e --- /dev/null +++ b/forgejo-openapi/docs/CreateBranchProtectionOption.md @@ -0,0 +1,35 @@ +# CreateBranchProtectionOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apply_to_admins** | Option<**bool**> | | [optional] +**approvals_whitelist_teams** | Option<**Vec**> | | [optional] +**approvals_whitelist_username** | Option<**Vec**> | | [optional] +**block_on_official_review_requests** | Option<**bool**> | | [optional] +**block_on_outdated_branch** | Option<**bool**> | | [optional] +**block_on_rejected_reviews** | Option<**bool**> | | [optional] +**branch_name** | Option<**String**> | Deprecated: true | [optional] +**dismiss_stale_approvals** | Option<**bool**> | | [optional] +**enable_approvals_whitelist** | Option<**bool**> | | [optional] +**enable_merge_whitelist** | Option<**bool**> | | [optional] +**enable_push** | Option<**bool**> | | [optional] +**enable_push_whitelist** | Option<**bool**> | | [optional] +**enable_status_check** | Option<**bool**> | | [optional] +**ignore_stale_approvals** | Option<**bool**> | | [optional] +**merge_whitelist_teams** | Option<**Vec**> | | [optional] +**merge_whitelist_usernames** | Option<**Vec**> | | [optional] +**protected_file_patterns** | Option<**String**> | | [optional] +**push_whitelist_deploy_keys** | Option<**bool**> | | [optional] +**push_whitelist_teams** | Option<**Vec**> | | [optional] +**push_whitelist_usernames** | Option<**Vec**> | | [optional] +**require_signed_commits** | Option<**bool**> | | [optional] +**required_approvals** | Option<**i64**> | | [optional] +**rule_name** | Option<**String**> | | [optional] +**status_check_contexts** | Option<**Vec**> | | [optional] +**unprotected_file_patterns** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateBranchRepoOption.md b/forgejo-openapi/docs/CreateBranchRepoOption.md new file mode 100644 index 0000000..d46da8e --- /dev/null +++ b/forgejo-openapi/docs/CreateBranchRepoOption.md @@ -0,0 +1,13 @@ +# CreateBranchRepoOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_branch_name** | **String** | Name of the branch to create | +**old_branch_name** | Option<**String**> | Deprecated: true Name of the old branch to create from | [optional] +**old_ref_name** | Option<**String**> | Name of the old branch/tag/commit to create from | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateEmailOption.md b/forgejo-openapi/docs/CreateEmailOption.md new file mode 100644 index 0000000..1224abf --- /dev/null +++ b/forgejo-openapi/docs/CreateEmailOption.md @@ -0,0 +1,11 @@ +# CreateEmailOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emails** | Option<**Vec**> | email addresses to add | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateFileOptions.md b/forgejo-openapi/docs/CreateFileOptions.md new file mode 100644 index 0000000..ff20b70 --- /dev/null +++ b/forgejo-openapi/docs/CreateFileOptions.md @@ -0,0 +1,18 @@ +# CreateFileOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | Option<[**models::Identity**](Identity.md)> | | [optional] +**branch** | Option<**String**> | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | Option<[**models::Identity**](Identity.md)> | | [optional] +**content** | **String** | content must be base64 encoded | +**dates** | Option<[**models::CommitDateOptions**](CommitDateOptions.md)> | | [optional] +**message** | Option<**String**> | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**new_branch** | Option<**String**> | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**signoff** | Option<**bool**> | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateForkOption.md b/forgejo-openapi/docs/CreateForkOption.md new file mode 100644 index 0000000..f24a7cc --- /dev/null +++ b/forgejo-openapi/docs/CreateForkOption.md @@ -0,0 +1,12 @@ +# CreateForkOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | name of the forked repository | [optional] +**organization** | Option<**String**> | organization name, if forking into an organization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateGpgKeyOption.md b/forgejo-openapi/docs/CreateGpgKeyOption.md new file mode 100644 index 0000000..a96e002 --- /dev/null +++ b/forgejo-openapi/docs/CreateGpgKeyOption.md @@ -0,0 +1,12 @@ +# CreateGpgKeyOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**armored_public_key** | **String** | An armored GPG key to add | +**armored_signature** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateHookOption.md b/forgejo-openapi/docs/CreateHookOption.md new file mode 100644 index 0000000..9c0e765 --- /dev/null +++ b/forgejo-openapi/docs/CreateHookOption.md @@ -0,0 +1,16 @@ +# CreateHookOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | Option<**bool**> | | [optional][default to false] +**authorization_header** | Option<**String**> | | [optional] +**branch_filter** | Option<**String**> | | [optional] +**config** | **std::collections::HashMap** | CreateHookOptionConfig has all config options in it required are \"content_type\" and \"url\" Required | +**events** | Option<**Vec**> | | [optional] +**r#type** | **Type** | (enum: forgejo, dingtalk, discord, gitea, gogs, msteams, slack, telegram, feishu, wechatwork, packagist) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateIssueCommentOption.md b/forgejo-openapi/docs/CreateIssueCommentOption.md new file mode 100644 index 0000000..5e00325 --- /dev/null +++ b/forgejo-openapi/docs/CreateIssueCommentOption.md @@ -0,0 +1,12 @@ +# CreateIssueCommentOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **String** | | +**updated_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateIssueOption.md b/forgejo-openapi/docs/CreateIssueOption.md new file mode 100644 index 0000000..08e71d6 --- /dev/null +++ b/forgejo-openapi/docs/CreateIssueOption.md @@ -0,0 +1,19 @@ +# CreateIssueOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | Option<**String**> | deprecated | [optional] +**assignees** | Option<**Vec**> | | [optional] +**body** | Option<**String**> | | [optional] +**closed** | Option<**bool**> | | [optional] +**due_date** | Option<**String**> | | [optional] +**labels** | Option<**Vec**> | list of label ids | [optional] +**milestone** | Option<**i64**> | milestone id | [optional] +**r#ref** | Option<**String**> | | [optional] +**title** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateKeyOption.md b/forgejo-openapi/docs/CreateKeyOption.md new file mode 100644 index 0000000..cdab8a1 --- /dev/null +++ b/forgejo-openapi/docs/CreateKeyOption.md @@ -0,0 +1,13 @@ +# CreateKeyOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **String** | An armored SSH key to add | +**read_only** | Option<**bool**> | Describe if the key has only read access or read/write | [optional] +**title** | **String** | Title of the key to add | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateLabelOption.md b/forgejo-openapi/docs/CreateLabelOption.md new file mode 100644 index 0000000..4db4045 --- /dev/null +++ b/forgejo-openapi/docs/CreateLabelOption.md @@ -0,0 +1,15 @@ +# CreateLabelOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **String** | | +**description** | Option<**String**> | | [optional] +**exclusive** | Option<**bool**> | | [optional] +**is_archived** | Option<**bool**> | | [optional] +**name** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateMilestoneOption.md b/forgejo-openapi/docs/CreateMilestoneOption.md new file mode 100644 index 0000000..bd356db --- /dev/null +++ b/forgejo-openapi/docs/CreateMilestoneOption.md @@ -0,0 +1,14 @@ +# CreateMilestoneOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | Option<**String**> | | [optional] +**due_on** | Option<**String**> | | [optional] +**state** | Option<**State**> | (enum: open, closed) | [optional] +**title** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateOAuth2ApplicationOptions.md b/forgejo-openapi/docs/CreateOAuth2ApplicationOptions.md new file mode 100644 index 0000000..da5608c --- /dev/null +++ b/forgejo-openapi/docs/CreateOAuth2ApplicationOptions.md @@ -0,0 +1,13 @@ +# CreateOAuth2ApplicationOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**confidential_client** | Option<**bool**> | | [optional] +**name** | Option<**String**> | | [optional] +**redirect_uris** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateOrUpdateSecretOption.md b/forgejo-openapi/docs/CreateOrUpdateSecretOption.md new file mode 100644 index 0000000..0bebb3d --- /dev/null +++ b/forgejo-openapi/docs/CreateOrUpdateSecretOption.md @@ -0,0 +1,11 @@ +# CreateOrUpdateSecretOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **String** | Data of the secret to update | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateOrgOption.md b/forgejo-openapi/docs/CreateOrgOption.md new file mode 100644 index 0000000..d398d89 --- /dev/null +++ b/forgejo-openapi/docs/CreateOrgOption.md @@ -0,0 +1,18 @@ +# CreateOrgOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**full_name** | Option<**String**> | | [optional] +**location** | Option<**String**> | | [optional] +**repo_admin_change_team_access** | Option<**bool**> | | [optional] +**username** | **String** | | +**visibility** | Option<**Visibility**> | possible values are `public` (default), `limited` or `private` (enum: public, limited, private) | [optional] +**website** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreatePullRequestOption.md b/forgejo-openapi/docs/CreatePullRequestOption.md new file mode 100644 index 0000000..1028806 --- /dev/null +++ b/forgejo-openapi/docs/CreatePullRequestOption.md @@ -0,0 +1,19 @@ +# CreatePullRequestOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | Option<**String**> | | [optional] +**assignees** | Option<**Vec**> | | [optional] +**base** | Option<**String**> | | [optional] +**body** | Option<**String**> | | [optional] +**due_date** | Option<**String**> | | [optional] +**head** | Option<**String**> | | [optional] +**labels** | Option<**Vec**> | | [optional] +**milestone** | Option<**i64**> | | [optional] +**title** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreatePullReviewComment.md b/forgejo-openapi/docs/CreatePullReviewComment.md new file mode 100644 index 0000000..62985a9 --- /dev/null +++ b/forgejo-openapi/docs/CreatePullReviewComment.md @@ -0,0 +1,14 @@ +# CreatePullReviewComment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | Option<**String**> | | [optional] +**new_position** | Option<**i64**> | if comment to new file line or 0 | [optional] +**old_position** | Option<**i64**> | if comment to old file line or 0 | [optional] +**path** | Option<**String**> | the tree path | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreatePullReviewOptions.md b/forgejo-openapi/docs/CreatePullReviewOptions.md new file mode 100644 index 0000000..7e3331b --- /dev/null +++ b/forgejo-openapi/docs/CreatePullReviewOptions.md @@ -0,0 +1,14 @@ +# CreatePullReviewOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | Option<**String**> | | [optional] +**comments** | Option<[**Vec**](CreatePullReviewComment.md)> | | [optional] +**commit_id** | Option<**String**> | | [optional] +**event** | Option<**String**> | ReviewStateType review state type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreatePushMirrorOption.md b/forgejo-openapi/docs/CreatePushMirrorOption.md new file mode 100644 index 0000000..a0baa9f --- /dev/null +++ b/forgejo-openapi/docs/CreatePushMirrorOption.md @@ -0,0 +1,17 @@ +# CreatePushMirrorOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**branch_filter** | Option<**String**> | | [optional] +**interval** | Option<**String**> | | [optional] +**remote_address** | Option<**String**> | | [optional] +**remote_password** | Option<**String**> | | [optional] +**remote_username** | Option<**String**> | | [optional] +**sync_on_commit** | Option<**bool**> | | [optional] +**use_ssh** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateQuotaGroupOptions.md b/forgejo-openapi/docs/CreateQuotaGroupOptions.md new file mode 100644 index 0000000..4a5abe5 --- /dev/null +++ b/forgejo-openapi/docs/CreateQuotaGroupOptions.md @@ -0,0 +1,12 @@ +# CreateQuotaGroupOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | Name of the quota group to create | [optional] +**rules** | Option<[**Vec**](CreateQuotaRuleOptions.md)> | Rules to add to the newly created group. If a rule does not exist, it will be created. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateQuotaRuleOptions.md b/forgejo-openapi/docs/CreateQuotaRuleOptions.md new file mode 100644 index 0000000..167b2f1 --- /dev/null +++ b/forgejo-openapi/docs/CreateQuotaRuleOptions.md @@ -0,0 +1,13 @@ +# CreateQuotaRuleOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | Option<**i64**> | The limit set by the rule | [optional] +**name** | Option<**String**> | Name of the rule to create | [optional] +**subjects** | Option<**Vec**> | The subjects affected by the rule | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateReleaseOption.md b/forgejo-openapi/docs/CreateReleaseOption.md new file mode 100644 index 0000000..fae07ab --- /dev/null +++ b/forgejo-openapi/docs/CreateReleaseOption.md @@ -0,0 +1,17 @@ +# CreateReleaseOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | Option<**String**> | | [optional] +**draft** | Option<**bool**> | | [optional] +**hide_archive_links** | Option<**bool**> | | [optional] +**name** | Option<**String**> | | [optional] +**prerelease** | Option<**bool**> | | [optional] +**tag_name** | **String** | | +**target_commitish** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateRepoOption.md b/forgejo-openapi/docs/CreateRepoOption.md new file mode 100644 index 0000000..09763cc --- /dev/null +++ b/forgejo-openapi/docs/CreateRepoOption.md @@ -0,0 +1,22 @@ +# CreateRepoOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auto_init** | Option<**bool**> | Whether the repository should be auto-initialized? | [optional] +**default_branch** | Option<**String**> | DefaultBranch of the repository (used when initializes and in template) | [optional] +**description** | Option<**String**> | Description of the repository to create | [optional] +**gitignores** | Option<**String**> | Gitignores to use | [optional] +**issue_labels** | Option<**String**> | Label-Set to use | [optional] +**license** | Option<**String**> | License to use | [optional] +**name** | **String** | Name of the repository to create | +**object_format_name** | Option<**ObjectFormatName**> | ObjectFormatName of the underlying git repository (enum: sha1, sha256) | [optional] +**private** | Option<**bool**> | Whether the repository is private | [optional] +**readme** | Option<**String**> | Readme of the repository to create | [optional] +**template** | Option<**bool**> | Whether the repository is template | [optional] +**trust_model** | Option<**TrustModel**> | TrustModel of the repository (enum: default, collaborator, committer, collaboratorcommitter) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateStatusOption.md b/forgejo-openapi/docs/CreateStatusOption.md new file mode 100644 index 0000000..81cad3a --- /dev/null +++ b/forgejo-openapi/docs/CreateStatusOption.md @@ -0,0 +1,14 @@ +# CreateStatusOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**state** | Option<**String**> | CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" | [optional] +**target_url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateTagOption.md b/forgejo-openapi/docs/CreateTagOption.md new file mode 100644 index 0000000..475f578 --- /dev/null +++ b/forgejo-openapi/docs/CreateTagOption.md @@ -0,0 +1,13 @@ +# CreateTagOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | Option<**String**> | | [optional] +**tag_name** | **String** | | +**target** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateTagProtectionOption.md b/forgejo-openapi/docs/CreateTagProtectionOption.md new file mode 100644 index 0000000..847480a --- /dev/null +++ b/forgejo-openapi/docs/CreateTagProtectionOption.md @@ -0,0 +1,13 @@ +# CreateTagProtectionOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name_pattern** | Option<**String**> | | [optional] +**whitelist_teams** | Option<**Vec**> | | [optional] +**whitelist_usernames** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateTeamOption.md b/forgejo-openapi/docs/CreateTeamOption.md new file mode 100644 index 0000000..535c009 --- /dev/null +++ b/forgejo-openapi/docs/CreateTeamOption.md @@ -0,0 +1,17 @@ +# CreateTeamOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_create_org_repo** | Option<**bool**> | | [optional] +**description** | Option<**String**> | | [optional] +**includes_all_repositories** | Option<**bool**> | | [optional] +**name** | **String** | | +**permission** | Option<**Permission**> | (enum: read, write, admin) | [optional] +**units** | Option<**Vec**> | | [optional] +**units_map** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateUserOption.md b/forgejo-openapi/docs/CreateUserOption.md new file mode 100644 index 0000000..56b0d9d --- /dev/null +++ b/forgejo-openapi/docs/CreateUserOption.md @@ -0,0 +1,21 @@ +# CreateUserOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | Option<**String**> | For explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to \"now\". | [optional] +**email** | **String** | | +**full_name** | Option<**String**> | | [optional] +**login_name** | Option<**String**> | | [optional] +**must_change_password** | Option<**bool**> | | [optional] +**password** | Option<**String**> | | [optional] +**restricted** | Option<**bool**> | | [optional] +**send_notify** | Option<**bool**> | | [optional] +**source_id** | Option<**i64**> | | [optional] +**username** | **String** | | +**visibility** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateVariableOption.md b/forgejo-openapi/docs/CreateVariableOption.md new file mode 100644 index 0000000..efce49f --- /dev/null +++ b/forgejo-openapi/docs/CreateVariableOption.md @@ -0,0 +1,11 @@ +# CreateVariableOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **String** | Value of the variable to create | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/CreateWikiPageOptions.md b/forgejo-openapi/docs/CreateWikiPageOptions.md new file mode 100644 index 0000000..3b90c8d --- /dev/null +++ b/forgejo-openapi/docs/CreateWikiPageOptions.md @@ -0,0 +1,13 @@ +# CreateWikiPageOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content_base64** | Option<**String**> | content must be base64 encoded | [optional] +**message** | Option<**String**> | optional commit message summarizing the change | [optional] +**title** | Option<**String**> | page title. leave empty to keep unchanged | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Cron.md b/forgejo-openapi/docs/Cron.md new file mode 100644 index 0000000..5fc02c3 --- /dev/null +++ b/forgejo-openapi/docs/Cron.md @@ -0,0 +1,15 @@ +# Cron + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exec_times** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] +**next** | Option<**String**> | | [optional] +**prev** | Option<**String**> | | [optional] +**schedule** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/DeleteEmailOption.md b/forgejo-openapi/docs/DeleteEmailOption.md new file mode 100644 index 0000000..0c15e6e --- /dev/null +++ b/forgejo-openapi/docs/DeleteEmailOption.md @@ -0,0 +1,11 @@ +# DeleteEmailOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emails** | Option<**Vec**> | email addresses to delete | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/DeleteFileOptions.md b/forgejo-openapi/docs/DeleteFileOptions.md new file mode 100644 index 0000000..c17bdc5 --- /dev/null +++ b/forgejo-openapi/docs/DeleteFileOptions.md @@ -0,0 +1,18 @@ +# DeleteFileOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | Option<[**models::Identity**](Identity.md)> | | [optional] +**branch** | Option<**String**> | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | Option<[**models::Identity**](Identity.md)> | | [optional] +**dates** | Option<[**models::CommitDateOptions**](CommitDateOptions.md)> | | [optional] +**message** | Option<**String**> | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**new_branch** | Option<**String**> | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**sha** | **String** | sha is the SHA for the file that already exists | +**signoff** | Option<**bool**> | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/DeleteLabelsOption.md b/forgejo-openapi/docs/DeleteLabelsOption.md new file mode 100644 index 0000000..04a15b7 --- /dev/null +++ b/forgejo-openapi/docs/DeleteLabelsOption.md @@ -0,0 +1,11 @@ +# DeleteLabelsOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**updated_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/DeployKey.md b/forgejo-openapi/docs/DeployKey.md new file mode 100644 index 0000000..8167696 --- /dev/null +++ b/forgejo-openapi/docs/DeployKey.md @@ -0,0 +1,19 @@ +# DeployKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | Option<**String**> | | [optional] +**fingerprint** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**key** | Option<**String**> | | [optional] +**key_id** | Option<**i64**> | | [optional] +**read_only** | Option<**bool**> | | [optional] +**repository** | Option<[**models::Repository**](Repository.md)> | | [optional] +**title** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/DismissPullReviewOptions.md b/forgejo-openapi/docs/DismissPullReviewOptions.md new file mode 100644 index 0000000..58cbdb7 --- /dev/null +++ b/forgejo-openapi/docs/DismissPullReviewOptions.md @@ -0,0 +1,12 @@ +# DismissPullReviewOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | Option<**String**> | | [optional] +**priors** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/DispatchWorkflowOption.md b/forgejo-openapi/docs/DispatchWorkflowOption.md new file mode 100644 index 0000000..dd01ac6 --- /dev/null +++ b/forgejo-openapi/docs/DispatchWorkflowOption.md @@ -0,0 +1,13 @@ +# DispatchWorkflowOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inputs** | Option<**std::collections::HashMap**> | Input keys and values configured in the workflow file. | [optional] +**r#ref** | **String** | Git reference for the workflow | +**return_run_info** | Option<**bool**> | Flag to return the run info | [optional][default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/DispatchWorkflowRun.md b/forgejo-openapi/docs/DispatchWorkflowRun.md new file mode 100644 index 0000000..4fc758b --- /dev/null +++ b/forgejo-openapi/docs/DispatchWorkflowRun.md @@ -0,0 +1,13 @@ +# DispatchWorkflowRun + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | the workflow run id | [optional] +**jobs** | Option<**Vec**> | the jobs name | [optional] +**run_number** | Option<**i64**> | a unique number for each run of a repository | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditAttachmentOptions.md b/forgejo-openapi/docs/EditAttachmentOptions.md new file mode 100644 index 0000000..14b5972 --- /dev/null +++ b/forgejo-openapi/docs/EditAttachmentOptions.md @@ -0,0 +1,12 @@ +# EditAttachmentOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**browser_download_url** | Option<**String**> | (Can only be set if existing attachment is of external type) | [optional] +**name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditBranchProtectionOption.md b/forgejo-openapi/docs/EditBranchProtectionOption.md new file mode 100644 index 0000000..65edf57 --- /dev/null +++ b/forgejo-openapi/docs/EditBranchProtectionOption.md @@ -0,0 +1,33 @@ +# EditBranchProtectionOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apply_to_admins** | Option<**bool**> | | [optional] +**approvals_whitelist_teams** | Option<**Vec**> | | [optional] +**approvals_whitelist_username** | Option<**Vec**> | | [optional] +**block_on_official_review_requests** | Option<**bool**> | | [optional] +**block_on_outdated_branch** | Option<**bool**> | | [optional] +**block_on_rejected_reviews** | Option<**bool**> | | [optional] +**dismiss_stale_approvals** | Option<**bool**> | | [optional] +**enable_approvals_whitelist** | Option<**bool**> | | [optional] +**enable_merge_whitelist** | Option<**bool**> | | [optional] +**enable_push** | Option<**bool**> | | [optional] +**enable_push_whitelist** | Option<**bool**> | | [optional] +**enable_status_check** | Option<**bool**> | | [optional] +**ignore_stale_approvals** | Option<**bool**> | | [optional] +**merge_whitelist_teams** | Option<**Vec**> | | [optional] +**merge_whitelist_usernames** | Option<**Vec**> | | [optional] +**protected_file_patterns** | Option<**String**> | | [optional] +**push_whitelist_deploy_keys** | Option<**bool**> | | [optional] +**push_whitelist_teams** | Option<**Vec**> | | [optional] +**push_whitelist_usernames** | Option<**Vec**> | | [optional] +**require_signed_commits** | Option<**bool**> | | [optional] +**required_approvals** | Option<**i64**> | | [optional] +**status_check_contexts** | Option<**Vec**> | | [optional] +**unprotected_file_patterns** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditDeadlineOption.md b/forgejo-openapi/docs/EditDeadlineOption.md new file mode 100644 index 0000000..2924880 --- /dev/null +++ b/forgejo-openapi/docs/EditDeadlineOption.md @@ -0,0 +1,11 @@ +# EditDeadlineOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**due_date** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditGitHookOption.md b/forgejo-openapi/docs/EditGitHookOption.md new file mode 100644 index 0000000..01bd2a8 --- /dev/null +++ b/forgejo-openapi/docs/EditGitHookOption.md @@ -0,0 +1,11 @@ +# EditGitHookOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditHookOption.md b/forgejo-openapi/docs/EditHookOption.md new file mode 100644 index 0000000..f62d9ce --- /dev/null +++ b/forgejo-openapi/docs/EditHookOption.md @@ -0,0 +1,15 @@ +# EditHookOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | Option<**bool**> | | [optional] +**authorization_header** | Option<**String**> | | [optional] +**branch_filter** | Option<**String**> | | [optional] +**config** | Option<**std::collections::HashMap**> | | [optional] +**events** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditIssueCommentOption.md b/forgejo-openapi/docs/EditIssueCommentOption.md new file mode 100644 index 0000000..05f5501 --- /dev/null +++ b/forgejo-openapi/docs/EditIssueCommentOption.md @@ -0,0 +1,12 @@ +# EditIssueCommentOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **String** | | +**updated_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditIssueOption.md b/forgejo-openapi/docs/EditIssueOption.md new file mode 100644 index 0000000..a08b665 --- /dev/null +++ b/forgejo-openapi/docs/EditIssueOption.md @@ -0,0 +1,20 @@ +# EditIssueOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | Option<**String**> | deprecated | [optional] +**assignees** | Option<**Vec**> | | [optional] +**body** | Option<**String**> | | [optional] +**due_date** | Option<**String**> | | [optional] +**milestone** | Option<**i64**> | | [optional] +**r#ref** | Option<**String**> | | [optional] +**state** | Option<**String**> | | [optional] +**title** | Option<**String**> | | [optional] +**unset_due_date** | Option<**bool**> | | [optional] +**updated_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditLabelOption.md b/forgejo-openapi/docs/EditLabelOption.md new file mode 100644 index 0000000..6385abe --- /dev/null +++ b/forgejo-openapi/docs/EditLabelOption.md @@ -0,0 +1,15 @@ +# EditLabelOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**exclusive** | Option<**bool**> | | [optional] +**is_archived** | Option<**bool**> | | [optional] +**name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditMilestoneOption.md b/forgejo-openapi/docs/EditMilestoneOption.md new file mode 100644 index 0000000..e266c1c --- /dev/null +++ b/forgejo-openapi/docs/EditMilestoneOption.md @@ -0,0 +1,14 @@ +# EditMilestoneOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | Option<**String**> | | [optional] +**due_on** | Option<**String**> | | [optional] +**state** | Option<**String**> | | [optional] +**title** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditOrgOption.md b/forgejo-openapi/docs/EditOrgOption.md new file mode 100644 index 0000000..e97f5be --- /dev/null +++ b/forgejo-openapi/docs/EditOrgOption.md @@ -0,0 +1,17 @@ +# EditOrgOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**full_name** | Option<**String**> | | [optional] +**location** | Option<**String**> | | [optional] +**repo_admin_change_team_access** | Option<**bool**> | | [optional] +**visibility** | Option<**Visibility**> | possible values are `public`, `limited` or `private` (enum: public, limited, private) | [optional] +**website** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditPullRequestOption.md b/forgejo-openapi/docs/EditPullRequestOption.md new file mode 100644 index 0000000..fe31231 --- /dev/null +++ b/forgejo-openapi/docs/EditPullRequestOption.md @@ -0,0 +1,21 @@ +# EditPullRequestOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_maintainer_edit** | Option<**bool**> | | [optional] +**assignee** | Option<**String**> | | [optional] +**assignees** | Option<**Vec**> | | [optional] +**base** | Option<**String**> | | [optional] +**body** | Option<**String**> | | [optional] +**due_date** | Option<**String**> | | [optional] +**labels** | Option<**Vec**> | | [optional] +**milestone** | Option<**i64**> | | [optional] +**state** | Option<**String**> | | [optional] +**title** | Option<**String**> | | [optional] +**unset_due_date** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditQuotaRuleOptions.md b/forgejo-openapi/docs/EditQuotaRuleOptions.md new file mode 100644 index 0000000..5cb1dfa --- /dev/null +++ b/forgejo-openapi/docs/EditQuotaRuleOptions.md @@ -0,0 +1,12 @@ +# EditQuotaRuleOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | Option<**i64**> | The limit set by the rule | [optional] +**subjects** | Option<**Vec**> | The subjects affected by the rule | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditReactionOption.md b/forgejo-openapi/docs/EditReactionOption.md new file mode 100644 index 0000000..6f01410 --- /dev/null +++ b/forgejo-openapi/docs/EditReactionOption.md @@ -0,0 +1,11 @@ +# EditReactionOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditReleaseOption.md b/forgejo-openapi/docs/EditReleaseOption.md new file mode 100644 index 0000000..adbc849 --- /dev/null +++ b/forgejo-openapi/docs/EditReleaseOption.md @@ -0,0 +1,17 @@ +# EditReleaseOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | Option<**String**> | | [optional] +**draft** | Option<**bool**> | | [optional] +**hide_archive_links** | Option<**bool**> | | [optional] +**name** | Option<**String**> | | [optional] +**prerelease** | Option<**bool**> | | [optional] +**tag_name** | Option<**String**> | | [optional] +**target_commitish** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditRepoOption.md b/forgejo-openapi/docs/EditRepoOption.md new file mode 100644 index 0000000..8291e2c --- /dev/null +++ b/forgejo-openapi/docs/EditRepoOption.md @@ -0,0 +1,44 @@ +# EditRepoOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_fast_forward_only_merge** | Option<**bool**> | either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging. | [optional] +**allow_manual_merge** | Option<**bool**> | either `true` to allow mark pr as merged manually, or `false` to prevent it. | [optional] +**allow_merge_commits** | Option<**bool**> | either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. | [optional] +**allow_rebase** | Option<**bool**> | either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. | [optional] +**allow_rebase_explicit** | Option<**bool**> | either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. | [optional] +**allow_rebase_update** | Option<**bool**> | either `true` to allow updating pull request branch by rebase, or `false` to prevent it. | [optional] +**allow_squash_merge** | Option<**bool**> | either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. | [optional] +**archived** | Option<**bool**> | set to `true` to archive this repository. | [optional] +**autodetect_manual_merge** | Option<**bool**> | either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. | [optional] +**default_allow_maintainer_edit** | Option<**bool**> | set to `true` to allow edits from maintainers by default | [optional] +**default_branch** | Option<**String**> | sets the default branch for this repository. | [optional] +**default_delete_branch_after_merge** | Option<**bool**> | set to `true` to delete pr branch after merge by default | [optional] +**default_merge_style** | Option<**String**> | set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", \"fast-forward-only\", \"manually-merged\", or \"rebase-update-only\". | [optional] +**default_update_style** | Option<**String**> | set to a update style to be used by this repository: \"rebase\" or \"merge\" | [optional] +**description** | Option<**String**> | a short description of the repository. | [optional] +**enable_prune** | Option<**bool**> | enable prune - remove obsolete remote-tracking references when mirroring | [optional] +**external_tracker** | Option<[**models::ExternalTracker**](ExternalTracker.md)> | | [optional] +**external_wiki** | Option<[**models::ExternalWiki**](ExternalWiki.md)> | | [optional] +**globally_editable_wiki** | Option<**bool**> | set the globally editable state of the wiki | [optional] +**has_actions** | Option<**bool**> | either `true` to enable actions unit, or `false` to disable them. | [optional] +**has_issues** | Option<**bool**> | either `true` to enable issues for this repository or `false` to disable them. | [optional] +**has_packages** | Option<**bool**> | either `true` to enable packages unit, or `false` to disable them. | [optional] +**has_projects** | Option<**bool**> | either `true` to enable project unit, or `false` to disable them. | [optional] +**has_pull_requests** | Option<**bool**> | either `true` to allow pull requests, or `false` to prevent pull request. | [optional] +**has_releases** | Option<**bool**> | either `true` to enable releases unit, or `false` to disable them. | [optional] +**has_wiki** | Option<**bool**> | either `true` to enable the wiki for this repository or `false` to disable it. | [optional] +**ignore_whitespace_conflicts** | Option<**bool**> | either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. | [optional] +**internal_tracker** | Option<[**models::InternalTracker**](InternalTracker.md)> | | [optional] +**mirror_interval** | Option<**String**> | set to a string like `8h30m0s` to set the mirror interval time | [optional] +**name** | Option<**String**> | name of the repository | [optional] +**private** | Option<**bool**> | either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. | [optional] +**template** | Option<**bool**> | either `true` to make this repository a template or `false` to make it a normal repository | [optional] +**website** | Option<**String**> | a URL with more information about the repository. | [optional] +**wiki_branch** | Option<**String**> | sets the branch used for this repository's wiki. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditTagProtectionOption.md b/forgejo-openapi/docs/EditTagProtectionOption.md new file mode 100644 index 0000000..906ac9a --- /dev/null +++ b/forgejo-openapi/docs/EditTagProtectionOption.md @@ -0,0 +1,13 @@ +# EditTagProtectionOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name_pattern** | Option<**String**> | | [optional] +**whitelist_teams** | Option<**Vec**> | | [optional] +**whitelist_usernames** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditTeamOption.md b/forgejo-openapi/docs/EditTeamOption.md new file mode 100644 index 0000000..cacb70d --- /dev/null +++ b/forgejo-openapi/docs/EditTeamOption.md @@ -0,0 +1,17 @@ +# EditTeamOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_create_org_repo** | Option<**bool**> | | [optional] +**description** | Option<**String**> | | [optional] +**includes_all_repositories** | Option<**bool**> | | [optional] +**name** | **String** | | +**permission** | Option<**Permission**> | (enum: read, write, admin) | [optional] +**units** | Option<**Vec**> | | [optional] +**units_map** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/EditUserOption.md b/forgejo-openapi/docs/EditUserOption.md new file mode 100644 index 0000000..fec62cb --- /dev/null +++ b/forgejo-openapi/docs/EditUserOption.md @@ -0,0 +1,30 @@ +# EditUserOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | Option<**bool**> | | [optional] +**admin** | Option<**bool**> | | [optional] +**allow_create_organization** | Option<**bool**> | | [optional] +**allow_git_hook** | Option<**bool**> | | [optional] +**allow_import_local** | Option<**bool**> | | [optional] +**description** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**full_name** | Option<**String**> | | [optional] +**hide_email** | Option<**bool**> | | [optional] +**location** | Option<**String**> | | [optional] +**login_name** | Option<**String**> | | [optional] +**max_repo_creation** | Option<**i64**> | | [optional] +**must_change_password** | Option<**bool**> | | [optional] +**password** | Option<**String**> | | [optional] +**prohibit_login** | Option<**bool**> | | [optional] +**pronouns** | Option<**String**> | | [optional] +**restricted** | Option<**bool**> | | [optional] +**source_id** | Option<**i64**> | | [optional] +**visibility** | Option<**String**> | | [optional] +**website** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Email.md b/forgejo-openapi/docs/Email.md new file mode 100644 index 0000000..0b0d7f7 --- /dev/null +++ b/forgejo-openapi/docs/Email.md @@ -0,0 +1,15 @@ +# Email + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | Option<**String**> | | [optional] +**primary** | Option<**bool**> | | [optional] +**user_id** | Option<**i64**> | | [optional] +**username** | Option<**String**> | | [optional] +**verified** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ExternalTracker.md b/forgejo-openapi/docs/ExternalTracker.md new file mode 100644 index 0000000..11ba791 --- /dev/null +++ b/forgejo-openapi/docs/ExternalTracker.md @@ -0,0 +1,14 @@ +# ExternalTracker + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**external_tracker_format** | Option<**String**> | External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. | [optional] +**external_tracker_regexp_pattern** | Option<**String**> | External Issue Tracker issue regular expression | [optional] +**external_tracker_style** | Option<**String**> | External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` | [optional] +**external_tracker_url** | Option<**String**> | URL of external issue tracker. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ExternalWiki.md b/forgejo-openapi/docs/ExternalWiki.md new file mode 100644 index 0000000..73c0abd --- /dev/null +++ b/forgejo-openapi/docs/ExternalWiki.md @@ -0,0 +1,11 @@ +# ExternalWiki + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**external_wiki_url** | Option<**String**> | URL of external wiki. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/FileCommitResponse.md b/forgejo-openapi/docs/FileCommitResponse.md new file mode 100644 index 0000000..300ca9f --- /dev/null +++ b/forgejo-openapi/docs/FileCommitResponse.md @@ -0,0 +1,19 @@ +# FileCommitResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] +**committer** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] +**created** | Option<**String**> | | [optional] +**html_url** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [optional] +**parents** | Option<[**Vec**](CommitMeta.md)> | | [optional] +**sha** | Option<**String**> | | [optional] +**tree** | Option<[**models::CommitMeta**](CommitMeta.md)> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/FileDeleteResponse.md b/forgejo-openapi/docs/FileDeleteResponse.md new file mode 100644 index 0000000..ef7e876 --- /dev/null +++ b/forgejo-openapi/docs/FileDeleteResponse.md @@ -0,0 +1,13 @@ +# FileDeleteResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | Option<[**models::FileCommitResponse**](FileCommitResponse.md)> | | [optional] +**content** | Option<**serde_json::Value**> | | [optional] +**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/FileLinksResponse.md b/forgejo-openapi/docs/FileLinksResponse.md new file mode 100644 index 0000000..c6f1372 --- /dev/null +++ b/forgejo-openapi/docs/FileLinksResponse.md @@ -0,0 +1,13 @@ +# FileLinksResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**git** | Option<**String**> | | [optional] +**html** | Option<**String**> | | [optional] +**param_self** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/FileResponse.md b/forgejo-openapi/docs/FileResponse.md new file mode 100644 index 0000000..b9a0a3f --- /dev/null +++ b/forgejo-openapi/docs/FileResponse.md @@ -0,0 +1,13 @@ +# FileResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | Option<[**models::FileCommitResponse**](FileCommitResponse.md)> | | [optional] +**content** | Option<[**models::ContentsResponse**](ContentsResponse.md)> | | [optional] +**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/FilesResponse.md b/forgejo-openapi/docs/FilesResponse.md new file mode 100644 index 0000000..cd78f4a --- /dev/null +++ b/forgejo-openapi/docs/FilesResponse.md @@ -0,0 +1,13 @@ +# FilesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | Option<[**models::FileCommitResponse**](FileCommitResponse.md)> | | [optional] +**files** | Option<[**Vec**](ContentsResponse.md)> | | [optional] +**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GeneralApiSettings.md b/forgejo-openapi/docs/GeneralApiSettings.md new file mode 100644 index 0000000..70a12c7 --- /dev/null +++ b/forgejo-openapi/docs/GeneralApiSettings.md @@ -0,0 +1,14 @@ +# GeneralApiSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default_git_trees_per_page** | Option<**i64**> | | [optional] +**default_max_blob_size** | Option<**i64**> | | [optional] +**default_paging_num** | Option<**i64**> | | [optional] +**max_response_items** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GeneralAttachmentSettings.md b/forgejo-openapi/docs/GeneralAttachmentSettings.md new file mode 100644 index 0000000..3597dc2 --- /dev/null +++ b/forgejo-openapi/docs/GeneralAttachmentSettings.md @@ -0,0 +1,14 @@ +# GeneralAttachmentSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed_types** | Option<**String**> | | [optional] +**enabled** | Option<**bool**> | | [optional] +**max_files** | Option<**i64**> | | [optional] +**max_size** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GeneralRepoSettings.md b/forgejo-openapi/docs/GeneralRepoSettings.md new file mode 100644 index 0000000..7b36fcc --- /dev/null +++ b/forgejo-openapi/docs/GeneralRepoSettings.md @@ -0,0 +1,17 @@ +# GeneralRepoSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**forks_disabled** | Option<**bool**> | | [optional] +**http_git_disabled** | Option<**bool**> | | [optional] +**lfs_disabled** | Option<**bool**> | | [optional] +**migrations_disabled** | Option<**bool**> | | [optional] +**mirrors_disabled** | Option<**bool**> | | [optional] +**stars_disabled** | Option<**bool**> | | [optional] +**time_tracking_disabled** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GeneralUiSettings.md b/forgejo-openapi/docs/GeneralUiSettings.md new file mode 100644 index 0000000..bdec13d --- /dev/null +++ b/forgejo-openapi/docs/GeneralUiSettings.md @@ -0,0 +1,13 @@ +# GeneralUiSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed_reactions** | Option<**Vec**> | | [optional] +**custom_emojis** | Option<**Vec**> | | [optional] +**default_theme** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GenerateRepoOption.md b/forgejo-openapi/docs/GenerateRepoOption.md new file mode 100644 index 0000000..997d4ef --- /dev/null +++ b/forgejo-openapi/docs/GenerateRepoOption.md @@ -0,0 +1,22 @@ +# GenerateRepoOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avatar** | Option<**bool**> | include avatar of the template repo | [optional] +**default_branch** | Option<**String**> | Default branch of the new repository | [optional] +**description** | Option<**String**> | Description of the repository to create | [optional] +**git_content** | Option<**bool**> | include git content of default branch in template repo | [optional] +**git_hooks** | Option<**bool**> | include git hooks in template repo | [optional] +**labels** | Option<**bool**> | include labels in template repo | [optional] +**name** | **String** | Name of the repository to create | +**owner** | **String** | The organization or person who will own the new repository | +**private** | Option<**bool**> | Whether the repository is private | [optional] +**protected_branch** | Option<**bool**> | include protected branches in template repo | [optional] +**topics** | Option<**bool**> | include topics in template repo | [optional] +**webhooks** | Option<**bool**> | include webhooks in template repo | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GitBlob.md b/forgejo-openapi/docs/GitBlob.md new file mode 100644 index 0000000..8c8de9c --- /dev/null +++ b/forgejo-openapi/docs/GitBlob.md @@ -0,0 +1,15 @@ +# GitBlob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | Option<**String**> | | [optional] +**encoding** | Option<**String**> | | [optional] +**sha** | Option<**String**> | | [optional] +**size** | Option<**i64**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GitEntry.md b/forgejo-openapi/docs/GitEntry.md new file mode 100644 index 0000000..c0acd13 --- /dev/null +++ b/forgejo-openapi/docs/GitEntry.md @@ -0,0 +1,16 @@ +# GitEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | Option<**String**> | | [optional] +**path** | Option<**String**> | | [optional] +**sha** | Option<**String**> | | [optional] +**size** | Option<**i64**> | | [optional] +**r#type** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GitHook.md b/forgejo-openapi/docs/GitHook.md new file mode 100644 index 0000000..9d52a95 --- /dev/null +++ b/forgejo-openapi/docs/GitHook.md @@ -0,0 +1,13 @@ +# GitHook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | Option<**String**> | | [optional] +**is_active** | Option<**bool**> | | [optional] +**name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GitObject.md b/forgejo-openapi/docs/GitObject.md new file mode 100644 index 0000000..4ed7c79 --- /dev/null +++ b/forgejo-openapi/docs/GitObject.md @@ -0,0 +1,13 @@ +# GitObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha** | Option<**String**> | | [optional] +**r#type** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GitTreeResponse.md b/forgejo-openapi/docs/GitTreeResponse.md new file mode 100644 index 0000000..390705d --- /dev/null +++ b/forgejo-openapi/docs/GitTreeResponse.md @@ -0,0 +1,16 @@ +# GitTreeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | Option<**i64**> | | [optional] +**sha** | Option<**String**> | | [optional] +**total_count** | Option<**i64**> | | [optional] +**tree** | Option<[**Vec**](GitEntry.md)> | | [optional] +**truncated** | Option<**bool**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GitignoreTemplateInfo.md b/forgejo-openapi/docs/GitignoreTemplateInfo.md new file mode 100644 index 0000000..67edca5 --- /dev/null +++ b/forgejo-openapi/docs/GitignoreTemplateInfo.md @@ -0,0 +1,12 @@ +# GitignoreTemplateInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | | [optional] +**source** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GpgKey.md b/forgejo-openapi/docs/GpgKey.md new file mode 100644 index 0000000..608c7b4 --- /dev/null +++ b/forgejo-openapi/docs/GpgKey.md @@ -0,0 +1,23 @@ +# GpgKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_certify** | Option<**bool**> | | [optional] +**can_encrypt_comms** | Option<**bool**> | | [optional] +**can_encrypt_storage** | Option<**bool**> | | [optional] +**can_sign** | Option<**bool**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**emails** | Option<[**Vec**](GPGKeyEmail.md)> | | [optional] +**expires_at** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**key_id** | Option<**String**> | | [optional] +**primary_key_id** | Option<**String**> | | [optional] +**public_key** | Option<**String**> | | [optional] +**subkeys** | Option<[**Vec**](GPGKey.md)> | | [optional] +**verified** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/GpgKeyEmail.md b/forgejo-openapi/docs/GpgKeyEmail.md new file mode 100644 index 0000000..191cd58 --- /dev/null +++ b/forgejo-openapi/docs/GpgKeyEmail.md @@ -0,0 +1,12 @@ +# GpgKeyEmail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | Option<**String**> | | [optional] +**verified** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Hook.md b/forgejo-openapi/docs/Hook.md new file mode 100644 index 0000000..f74a62d --- /dev/null +++ b/forgejo-openapi/docs/Hook.md @@ -0,0 +1,22 @@ +# Hook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | Option<**bool**> | | [optional] +**authorization_header** | Option<**String**> | | [optional] +**branch_filter** | Option<**String**> | | [optional] +**config** | Option<**std::collections::HashMap**> | Deprecated: use Metadata instead | [optional] +**content_type** | Option<**String**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**events** | Option<**Vec**> | | [optional] +**id** | Option<**i64**> | | [optional] +**metadata** | Option<**serde_json::Value**> | | [optional] +**r#type** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Identity.md b/forgejo-openapi/docs/Identity.md new file mode 100644 index 0000000..3f1e0a2 --- /dev/null +++ b/forgejo-openapi/docs/Identity.md @@ -0,0 +1,12 @@ +# Identity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/InternalTracker.md b/forgejo-openapi/docs/InternalTracker.md new file mode 100644 index 0000000..6daf626 --- /dev/null +++ b/forgejo-openapi/docs/InternalTracker.md @@ -0,0 +1,13 @@ +# InternalTracker + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_only_contributors_to_track_time** | Option<**bool**> | Let only contributors track time (Built-in issue tracker) | [optional] +**enable_issue_dependencies** | Option<**bool**> | Enable dependencies for issues and pull requests (Built-in issue tracker) | [optional] +**enable_time_tracker** | Option<**bool**> | Enable time tracking (Built-in issue tracker) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Issue.md b/forgejo-openapi/docs/Issue.md new file mode 100644 index 0000000..da68428 --- /dev/null +++ b/forgejo-openapi/docs/Issue.md @@ -0,0 +1,35 @@ +# Issue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets** | Option<[**Vec**](Attachment.md)> | | [optional] +**assignee** | Option<[**models::User**](User.md)> | | [optional] +**assignees** | Option<[**Vec**](User.md)> | | [optional] +**body** | Option<**String**> | | [optional] +**closed_at** | Option<**String**> | | [optional] +**comments** | Option<**i64**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**due_date** | Option<**String**> | | [optional] +**html_url** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**is_locked** | Option<**bool**> | | [optional] +**labels** | Option<[**Vec**](Label.md)> | | [optional] +**milestone** | Option<[**models::Milestone**](Milestone.md)> | | [optional] +**number** | Option<**i64**> | | [optional] +**original_author** | Option<**String**> | | [optional] +**original_author_id** | Option<**i64**> | | [optional] +**pin_order** | Option<**i64**> | | [optional] +**pull_request** | Option<[**models::PullRequestMeta**](PullRequestMeta.md)> | | [optional] +**r#ref** | Option<**String**> | | [optional] +**repository** | Option<[**models::RepositoryMeta**](RepositoryMeta.md)> | | [optional] +**state** | Option<**String**> | StateType issue state type | [optional] +**title** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] +**user** | Option<[**models::User**](User.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/IssueApi.md b/forgejo-openapi/docs/IssueApi.md new file mode 100644 index 0000000..fc6ad35 --- /dev/null +++ b/forgejo-openapi/docs/IssueApi.md @@ -0,0 +1,2180 @@ +# \IssueApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**issue_add_label**](IssueApi.md#issue_add_label) | **POST** /repos/{owner}/{repo}/issues/{index}/labels | Add a label to an issue +[**issue_add_subscription**](IssueApi.md#issue_add_subscription) | **PUT** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Subscribe user to issue +[**issue_add_time**](IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{index}/times | Add tracked time to a issue +[**issue_check_subscription**](IssueApi.md#issue_check_subscription) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions/check | Check if user is subscribed to an issue +[**issue_clear_labels**](IssueApi.md#issue_clear_labels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue +[**issue_create_comment**](IssueApi.md#issue_create_comment) | **POST** /repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue +[**issue_create_issue**](IssueApi.md#issue_create_issue) | **POST** /repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored. +[**issue_create_issue_attachment**](IssueApi.md#issue_create_issue_attachment) | **POST** /repos/{owner}/{repo}/issues/{index}/assets | Create an issue attachment +[**issue_create_issue_blocking**](IssueApi.md#issue_create_issue_blocking) | **POST** /repos/{owner}/{repo}/issues/{index}/blocks | Block the issue given in the body by the issue in path +[**issue_create_issue_comment_attachment**](IssueApi.md#issue_create_issue_comment_attachment) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/assets | Create a comment attachment +[**issue_create_issue_dependencies**](IssueApi.md#issue_create_issue_dependencies) | **POST** /repos/{owner}/{repo}/issues/{index}/dependencies | Make the issue in the url depend on the issue in the form. +[**issue_create_label**](IssueApi.md#issue_create_label) | **POST** /repos/{owner}/{repo}/labels | Create a label +[**issue_create_milestone**](IssueApi.md#issue_create_milestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone +[**issue_delete**](IssueApi.md#issue_delete) | **DELETE** /repos/{owner}/{repo}/issues/{index} | Delete an issue +[**issue_delete_comment**](IssueApi.md#issue_delete_comment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment +[**issue_delete_comment_deprecated**](IssueApi.md#issue_delete_comment_deprecated) | **DELETE** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Delete a comment +[**issue_delete_comment_reaction**](IssueApi.md#issue_delete_comment_reaction) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Remove a reaction from a comment of an issue +[**issue_delete_issue_attachment**](IssueApi.md#issue_delete_issue_attachment) | **DELETE** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Delete an issue attachment +[**issue_delete_issue_comment_attachment**](IssueApi.md#issue_delete_issue_comment_attachment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Delete a comment attachment +[**issue_delete_issue_reaction**](IssueApi.md#issue_delete_issue_reaction) | **DELETE** /repos/{owner}/{repo}/issues/{index}/reactions | Remove a reaction from an issue +[**issue_delete_label**](IssueApi.md#issue_delete_label) | **DELETE** /repos/{owner}/{repo}/labels/{id} | Delete a label +[**issue_delete_milestone**](IssueApi.md#issue_delete_milestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone +[**issue_delete_stop_watch**](IssueApi.md#issue_delete_stop_watch) | **DELETE** /repos/{owner}/{repo}/issues/{index}/stopwatch/delete | Delete an issue's existing stopwatch. +[**issue_delete_subscription**](IssueApi.md#issue_delete_subscription) | **DELETE** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Unsubscribe user from issue +[**issue_delete_time**](IssueApi.md#issue_delete_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times/{id} | Delete specific tracked time +[**issue_edit_comment**](IssueApi.md#issue_edit_comment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id} | Edit a comment +[**issue_edit_comment_deprecated**](IssueApi.md#issue_edit_comment_deprecated) | **PATCH** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment +[**issue_edit_issue**](IssueApi.md#issue_edit_issue) | **PATCH** /repos/{owner}/{repo}/issues/{index} | Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. +[**issue_edit_issue_attachment**](IssueApi.md#issue_edit_issue_attachment) | **PATCH** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Edit an issue attachment +[**issue_edit_issue_comment_attachment**](IssueApi.md#issue_edit_issue_comment_attachment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Edit a comment attachment +[**issue_edit_issue_deadline**](IssueApi.md#issue_edit_issue_deadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. +[**issue_edit_label**](IssueApi.md#issue_edit_label) | **PATCH** /repos/{owner}/{repo}/labels/{id} | Update a label +[**issue_edit_milestone**](IssueApi.md#issue_edit_milestone) | **PATCH** /repos/{owner}/{repo}/milestones/{id} | Update a milestone +[**issue_get_comment**](IssueApi.md#issue_get_comment) | **GET** /repos/{owner}/{repo}/issues/comments/{id} | Get a comment +[**issue_get_comment_reactions**](IssueApi.md#issue_get_comment_reactions) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Get a list of reactions from a comment of an issue +[**issue_get_comments**](IssueApi.md#issue_get_comments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue +[**issue_get_comments_and_timeline**](IssueApi.md#issue_get_comments_and_timeline) | **GET** /repos/{owner}/{repo}/issues/{index}/timeline | List all comments and events on an issue +[**issue_get_issue**](IssueApi.md#issue_get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get an issue +[**issue_get_issue_attachment**](IssueApi.md#issue_get_issue_attachment) | **GET** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Get an issue attachment +[**issue_get_issue_comment_attachment**](IssueApi.md#issue_get_issue_comment_attachment) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Get a comment attachment +[**issue_get_issue_reactions**](IssueApi.md#issue_get_issue_reactions) | **GET** /repos/{owner}/{repo}/issues/{index}/reactions | Get a list reactions of an issue +[**issue_get_label**](IssueApi.md#issue_get_label) | **GET** /repos/{owner}/{repo}/labels/{id} | Get a single label +[**issue_get_labels**](IssueApi.md#issue_get_labels) | **GET** /repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels +[**issue_get_milestone**](IssueApi.md#issue_get_milestone) | **GET** /repos/{owner}/{repo}/milestones/{id} | Get a milestone +[**issue_get_milestones_list**](IssueApi.md#issue_get_milestones_list) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones +[**issue_get_repo_comments**](IssueApi.md#issue_get_repo_comments) | **GET** /repos/{owner}/{repo}/issues/comments | List all comments in a repository +[**issue_list_blocks**](IssueApi.md#issue_list_blocks) | **GET** /repos/{owner}/{repo}/issues/{index}/blocks | List issues that are blocked by this issue +[**issue_list_issue_attachments**](IssueApi.md#issue_list_issue_attachments) | **GET** /repos/{owner}/{repo}/issues/{index}/assets | List issue's attachments +[**issue_list_issue_comment_attachments**](IssueApi.md#issue_list_issue_comment_attachments) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets | List comment's attachments +[**issue_list_issue_dependencies**](IssueApi.md#issue_list_issue_dependencies) | **GET** /repos/{owner}/{repo}/issues/{index}/dependencies | List an issue's dependencies, i.e all issues that block this issue. +[**issue_list_issues**](IssueApi.md#issue_list_issues) | **GET** /repos/{owner}/{repo}/issues | List a repository's issues +[**issue_list_labels**](IssueApi.md#issue_list_labels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels +[**issue_post_comment_reaction**](IssueApi.md#issue_post_comment_reaction) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Add a reaction to a comment of an issue +[**issue_post_issue_reaction**](IssueApi.md#issue_post_issue_reaction) | **POST** /repos/{owner}/{repo}/issues/{index}/reactions | Add a reaction to an issue +[**issue_remove_issue_blocking**](IssueApi.md#issue_remove_issue_blocking) | **DELETE** /repos/{owner}/{repo}/issues/{index}/blocks | Unblock the issue given in the body by the issue in path +[**issue_remove_issue_dependencies**](IssueApi.md#issue_remove_issue_dependencies) | **DELETE** /repos/{owner}/{repo}/issues/{index}/dependencies | Remove an issue dependency +[**issue_remove_label**](IssueApi.md#issue_remove_label) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{identifier} | Remove a label from an issue +[**issue_replace_labels**](IssueApi.md#issue_replace_labels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels +[**issue_reset_time**](IssueApi.md#issue_reset_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times | Reset a tracked time of an issue +[**issue_search_issues**](IssueApi.md#issue_search_issues) | **GET** /repos/issues/search | Search for issues across the repositories that the user has access to +[**issue_start_stop_watch**](IssueApi.md#issue_start_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue. +[**issue_stop_stop_watch**](IssueApi.md#issue_stop_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. +[**issue_subscriptions**](IssueApi.md#issue_subscriptions) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions | Get users who subscribed on an issue. +[**issue_tracked_times**](IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{index}/times | List an issue's tracked times +[**move_issue_pin**](IssueApi.md#move_issue_pin) | **PATCH** /repos/{owner}/{repo}/issues/{index}/pin/{position} | Moves the Pin to the given Position +[**pin_issue**](IssueApi.md#pin_issue) | **POST** /repos/{owner}/{repo}/issues/{index}/pin | Pin an Issue +[**unpin_issue**](IssueApi.md#unpin_issue) | **DELETE** /repos/{owner}/{repo}/issues/{index}/pin | Unpin an Issue + + + +## issue_add_label + +> Vec issue_add_label(owner, repo, index, body) +Add a label to an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**body** | Option<[**IssueLabelsOption**](IssueLabelsOption.md)> | | | + +### Return type + +[**Vec**](Label.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_add_subscription + +> issue_add_subscription(owner, repo, index, user) +Subscribe user to issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**user** | **String** | user to subscribe | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_add_time + +> models::TrackedTime issue_add_time(owner, repo, index, body) +Add tracked time to a issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**body** | Option<[**AddTimeOption**](AddTimeOption.md)> | | | + +### Return type + +[**models::TrackedTime**](TrackedTime.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_check_subscription + +> models::WatchInfo issue_check_subscription(owner, repo, index) +Check if user is subscribed to an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | + +### Return type + +[**models::WatchInfo**](WatchInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_clear_labels + +> issue_clear_labels(owner, repo, index, body) +Remove all labels from an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**body** | Option<[**DeleteLabelsOption**](DeleteLabelsOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_create_comment + +> models::Comment issue_create_comment(owner, repo, index, body) +Add a comment to an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**body** | Option<[**CreateIssueCommentOption**](CreateIssueCommentOption.md)> | | | + +### Return type + +[**models::Comment**](Comment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_create_issue + +> models::Issue issue_create_issue(owner, repo, body) +Create an issue. If using deadline only the date will be taken into account, and time of day ignored. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreateIssueOption**](CreateIssueOption.md)> | | | + +### Return type + +[**models::Issue**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_create_issue_attachment + +> models::Attachment issue_create_issue_attachment(owner, repo, index, attachment, name, updated_at) +Create an issue attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**attachment** | **std::path::PathBuf** | attachment to upload | [required] | +**name** | Option<**String**> | name of the attachment | | +**updated_at** | Option<**String**> | time of the attachment's creation. This is a timestamp in RFC 3339 format | | + +### Return type + +[**models::Attachment**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_create_issue_blocking + +> models::Issue issue_create_issue_blocking(owner, repo, index, body) +Block the issue given in the body by the issue in path + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**body** | Option<[**IssueMeta**](IssueMeta.md)> | | | + +### Return type + +[**models::Issue**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_create_issue_comment_attachment + +> models::Attachment issue_create_issue_comment_attachment(owner, repo, id, attachment, name, updated_at) +Create a comment attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the comment | [required] | +**attachment** | **std::path::PathBuf** | attachment to upload | [required] | +**name** | Option<**String**> | name of the attachment | | +**updated_at** | Option<**String**> | time of the attachment's creation. This is a timestamp in RFC 3339 format | | + +### Return type + +[**models::Attachment**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_create_issue_dependencies + +> models::Issue issue_create_issue_dependencies(owner, repo, index, body) +Make the issue in the url depend on the issue in the form. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**body** | Option<[**IssueMeta**](IssueMeta.md)> | | | + +### Return type + +[**models::Issue**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_create_label + +> models::Label issue_create_label(owner, repo, body) +Create a label + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreateLabelOption**](CreateLabelOption.md)> | | | + +### Return type + +[**models::Label**](Label.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_create_milestone + +> models::Milestone issue_create_milestone(owner, repo, body) +Create a milestone + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreateMilestoneOption**](CreateMilestoneOption.md)> | | | + +### Return type + +[**models::Milestone**](Milestone.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete + +> issue_delete(owner, repo, index) +Delete an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of issue to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete_comment + +> issue_delete_comment(owner, repo, id) +Delete a comment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of comment to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete_comment_deprecated + +> issue_delete_comment_deprecated(owner, repo, index, id) +Delete a comment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i32** | this parameter is ignored | [required] | +**id** | **i64** | id of comment to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete_comment_reaction + +> issue_delete_comment_reaction(owner, repo, id, content) +Remove a reaction from a comment of an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the comment to edit | [required] | +**content** | Option<[**EditReactionOption**](EditReactionOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete_issue_attachment + +> issue_delete_issue_attachment(owner, repo, index, attachment_id) +Delete an issue attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**attachment_id** | **i64** | id of the attachment to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete_issue_comment_attachment + +> issue_delete_issue_comment_attachment(owner, repo, id, attachment_id) +Delete a comment attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the comment | [required] | +**attachment_id** | **i64** | id of the attachment to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete_issue_reaction + +> issue_delete_issue_reaction(owner, repo, index, content) +Remove a reaction from an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**content** | Option<[**EditReactionOption**](EditReactionOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete_label + +> issue_delete_label(owner, repo, id) +Delete a label + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the label to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete_milestone + +> issue_delete_milestone(owner, repo, id) +Delete a milestone + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | the milestone to delete, identified by ID and if not available by name | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete_stop_watch + +> issue_delete_stop_watch(owner, repo, index) +Delete an issue's existing stopwatch. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue to stop the stopwatch on | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete_subscription + +> issue_delete_subscription(owner, repo, index, user) +Unsubscribe user from issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**user** | **String** | user witch unsubscribe | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_delete_time + +> issue_delete_time(owner, repo, index, id) +Delete specific tracked time + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**id** | **i64** | id of time to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_edit_comment + +> models::Comment issue_edit_comment(owner, repo, id, body) +Edit a comment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the comment to edit | [required] | +**body** | Option<[**EditIssueCommentOption**](EditIssueCommentOption.md)> | | | + +### Return type + +[**models::Comment**](Comment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_edit_comment_deprecated + +> models::Comment issue_edit_comment_deprecated(owner, repo, index, id, body) +Edit a comment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i32** | this parameter is ignored | [required] | +**id** | **i64** | id of the comment to edit | [required] | +**body** | Option<[**EditIssueCommentOption**](EditIssueCommentOption.md)> | | | + +### Return type + +[**models::Comment**](Comment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_edit_issue + +> models::Issue issue_edit_issue(owner, repo, index, body) +Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue to edit | [required] | +**body** | Option<[**EditIssueOption**](EditIssueOption.md)> | | | + +### Return type + +[**models::Issue**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_edit_issue_attachment + +> models::Attachment issue_edit_issue_attachment(owner, repo, index, attachment_id, body) +Edit an issue attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**attachment_id** | **i64** | id of the attachment to edit | [required] | +**body** | Option<[**EditAttachmentOptions**](EditAttachmentOptions.md)> | | | + +### Return type + +[**models::Attachment**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_edit_issue_comment_attachment + +> models::Attachment issue_edit_issue_comment_attachment(owner, repo, id, attachment_id, body) +Edit a comment attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the comment | [required] | +**attachment_id** | **i64** | id of the attachment to edit | [required] | +**body** | Option<[**EditAttachmentOptions**](EditAttachmentOptions.md)> | | | + +### Return type + +[**models::Attachment**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_edit_issue_deadline + +> models::IssueDeadline issue_edit_issue_deadline(owner, repo, index, body) +Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue to create or update a deadline on | [required] | +**body** | Option<[**EditDeadlineOption**](EditDeadlineOption.md)> | | | + +### Return type + +[**models::IssueDeadline**](IssueDeadline.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_edit_label + +> models::Label issue_edit_label(owner, repo, id, body) +Update a label + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the label to edit | [required] | +**body** | Option<[**EditLabelOption**](EditLabelOption.md)> | | | + +### Return type + +[**models::Label**](Label.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_edit_milestone + +> models::Milestone issue_edit_milestone(owner, repo, id, body) +Update a milestone + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | the milestone to edit, identified by ID and if not available by name | [required] | +**body** | Option<[**EditMilestoneOption**](EditMilestoneOption.md)> | | | + +### Return type + +[**models::Milestone**](Milestone.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_comment + +> models::Comment issue_get_comment(owner, repo, id) +Get a comment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the comment | [required] | + +### Return type + +[**models::Comment**](Comment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_comment_reactions + +> Vec issue_get_comment_reactions(owner, repo, id) +Get a list of reactions from a comment of an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the comment to edit | [required] | + +### Return type + +[**Vec**](Reaction.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_comments + +> Vec issue_get_comments(owner, repo, index, since, before) +List all comments on an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**since** | Option<**String**> | if provided, only comments updated since the specified time are returned. | | +**before** | Option<**String**> | if provided, only comments updated before the provided time are returned. | | + +### Return type + +[**Vec**](Comment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_comments_and_timeline + +> Vec issue_get_comments_and_timeline(owner, repo, index, since, page, limit, before) +List all comments and events on an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**since** | Option<**String**> | if provided, only comments updated since the specified time are returned. | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | +**before** | Option<**String**> | if provided, only comments updated before the provided time are returned. | | + +### Return type + +[**Vec**](TimelineComment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_issue + +> models::Issue issue_get_issue(owner, repo, index) +Get an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue to get | [required] | + +### Return type + +[**models::Issue**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_issue_attachment + +> models::Attachment issue_get_issue_attachment(owner, repo, index, attachment_id) +Get an issue attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**attachment_id** | **i64** | id of the attachment to get | [required] | + +### Return type + +[**models::Attachment**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_issue_comment_attachment + +> models::Attachment issue_get_issue_comment_attachment(owner, repo, id, attachment_id) +Get a comment attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the comment | [required] | +**attachment_id** | **i64** | id of the attachment to get | [required] | + +### Return type + +[**models::Attachment**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_issue_reactions + +> Vec issue_get_issue_reactions(owner, repo, index, page, limit) +Get a list reactions of an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Reaction.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_label + +> models::Label issue_get_label(owner, repo, id) +Get a single label + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the label to get | [required] | + +### Return type + +[**models::Label**](Label.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_labels + +> Vec issue_get_labels(owner, repo, index) +Get an issue's labels + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | + +### Return type + +[**Vec**](Label.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_milestone + +> models::Milestone issue_get_milestone(owner, repo, id) +Get a milestone + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | the milestone to get, identified by ID and if not available by name | [required] | + +### Return type + +[**models::Milestone**](Milestone.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_milestones_list + +> Vec issue_get_milestones_list(owner, repo, state, name, page, limit) +Get all of a repository's opened milestones + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**state** | Option<**String**> | Milestone state, Recognized values are open, closed and all. Defaults to \"open\" | | +**name** | Option<**String**> | filter by milestone name | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Milestone.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_get_repo_comments + +> Vec issue_get_repo_comments(owner, repo, since, before, page, limit) +List all comments in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**since** | Option<**String**> | if provided, only comments updated since the provided time are returned. | | +**before** | Option<**String**> | if provided, only comments updated before the provided time are returned. | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Comment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_list_blocks + +> Vec issue_list_blocks(owner, repo, index, page, limit) +List issues that are blocked by this issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_list_issue_attachments + +> Vec issue_list_issue_attachments(owner, repo, index) +List issue's attachments + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | + +### Return type + +[**Vec**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_list_issue_comment_attachments + +> Vec issue_list_issue_comment_attachments(owner, repo, id) +List comment's attachments + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the comment | [required] | + +### Return type + +[**Vec**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_list_issue_dependencies + +> Vec issue_list_issue_dependencies(owner, repo, index, page, limit) +List an issue's dependencies, i.e all issues that block this issue. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_list_issues + +> Vec issue_list_issues(owner, repo, state, labels, q, r#type, milestones, since, before, created_by, assigned_by, mentioned_by, page, limit, sort) +List a repository's issues + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**state** | Option<**String**> | whether issue is open or closed | | +**labels** | Option<**String**> | comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded | | +**q** | Option<**String**> | search string | | +**r#type** | Option<**String**> | filter by type (issues / pulls) if set | | +**milestones** | Option<**String**> | 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 | | +**since** | Option<**String**> | Only show items updated after the given time. This is a timestamp in RFC 3339 format | | +**before** | Option<**String**> | Only show items updated before the given time. This is a timestamp in RFC 3339 format | | +**created_by** | Option<**String**> | Only show items which were created by the given user | | +**assigned_by** | Option<**String**> | Only show items for which the given user is assigned | | +**mentioned_by** | Option<**String**> | Only show items in which the given user was mentioned | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | +**sort** | Option<**String**> | Type of sort | |[default to latest] + +### Return type + +[**Vec**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_list_labels + +> Vec issue_list_labels(owner, repo, sort, page, limit) +Get all of a repository's labels + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sort** | Option<**String**> | Specifies the sorting method: mostissues, leastissues, or reversealphabetically. | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Label.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_post_comment_reaction + +> models::Reaction issue_post_comment_reaction(owner, repo, id, content) +Add a reaction to a comment of an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the comment to edit | [required] | +**content** | Option<[**EditReactionOption**](EditReactionOption.md)> | | | + +### Return type + +[**models::Reaction**](Reaction.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_post_issue_reaction + +> models::Reaction issue_post_issue_reaction(owner, repo, index, content) +Add a reaction to an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**content** | Option<[**EditReactionOption**](EditReactionOption.md)> | | | + +### Return type + +[**models::Reaction**](Reaction.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_remove_issue_blocking + +> models::Issue issue_remove_issue_blocking(owner, repo, index, body) +Unblock the issue given in the body by the issue in path + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**body** | Option<[**IssueMeta**](IssueMeta.md)> | | | + +### Return type + +[**models::Issue**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_remove_issue_dependencies + +> models::Issue issue_remove_issue_dependencies(owner, repo, index, body) +Remove an issue dependency + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**body** | Option<[**IssueMeta**](IssueMeta.md)> | | | + +### Return type + +[**models::Issue**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_remove_label + +> issue_remove_label(owner, repo, index, identifier, body) +Remove a label from an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**identifier** | **String** | name or id of the label to remove | [required] | +**body** | Option<[**DeleteLabelsOption**](DeleteLabelsOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_replace_labels + +> Vec issue_replace_labels(owner, repo, index, body) +Replace an issue's labels + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**body** | Option<[**IssueLabelsOption**](IssueLabelsOption.md)> | | | + +### Return type + +[**Vec**](Label.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_reset_time + +> issue_reset_time(owner, repo, index) +Reset a tracked time of an issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue to add tracked time to | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_search_issues + +> Vec issue_search_issues(state, labels, milestones, q, priority_repo_id, r#type, since, before, assigned, created, mentioned, review_requested, reviewed, owner, team, page, limit, sort) +Search for issues across the repositories that the user has access to + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**state** | Option<**String**> | State of the issue | |[default to open] +**labels** | Option<**String**> | Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded. | | +**milestones** | Option<**String**> | Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded. | | +**q** | Option<**String**> | Search string | | +**priority_repo_id** | Option<**i64**> | Repository ID to prioritize in the results | | +**r#type** | Option<**String**> | Filter by issue type | | +**since** | Option<**String**> | Only show issues updated after the given time (RFC 3339 format) | | +**before** | Option<**String**> | Only show issues updated before the given time (RFC 3339 format) | | +**assigned** | Option<**bool**> | Filter issues or pulls assigned to the authenticated user | |[default to false] +**created** | Option<**bool**> | Filter issues or pulls created by the authenticated user | |[default to false] +**mentioned** | Option<**bool**> | Filter issues or pulls mentioning the authenticated user | |[default to false] +**review_requested** | Option<**bool**> | Filter pull requests where the authenticated user's review was requested | |[default to false] +**reviewed** | Option<**bool**> | Filter pull requests reviewed by the authenticated user | |[default to false] +**owner** | Option<**String**> | Filter by repository owner | | +**team** | Option<**String**> | Filter by team (requires organization owner parameter) | | +**page** | Option<**i32**> | Page number of results to return (1-based) | |[default to 1] +**limit** | Option<**i32**> | Number of items per page | | +**sort** | Option<**String**> | Type of sort | |[default to latest] + +### Return type + +[**Vec**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_start_stop_watch + +> issue_start_stop_watch(owner, repo, index) +Start stopwatch on an issue. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue to create the stopwatch on | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_stop_stop_watch + +> issue_stop_stop_watch(owner, repo, index) +Stop an issue's existing stopwatch. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue to stop the stopwatch on | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_subscriptions + +> Vec issue_subscriptions(owner, repo, index, page, limit) +Get users who subscribed on an issue. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## issue_tracked_times + +> Vec issue_tracked_times(owner, repo, index, user, since, before, page, limit) +List an issue's tracked times + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the issue | [required] | +**user** | Option<**String**> | optional filter by user (available for issue managers) | | +**since** | Option<**String**> | Only show times updated after the given time. This is a timestamp in RFC 3339 format | | +**before** | Option<**String**> | Only show times updated before the given time. This is a timestamp in RFC 3339 format | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](TrackedTime.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## move_issue_pin + +> move_issue_pin(owner, repo, index, position) +Moves the Pin to the given Position + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of issue | [required] | +**position** | **i64** | the new position | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## pin_issue + +> pin_issue(owner, repo, index) +Pin an Issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of issue to pin | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## unpin_issue + +> unpin_issue(owner, repo, index) +Unpin an Issue + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of issue to unpin | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/forgejo-openapi/docs/IssueConfig.md b/forgejo-openapi/docs/IssueConfig.md new file mode 100644 index 0000000..46d0409 --- /dev/null +++ b/forgejo-openapi/docs/IssueConfig.md @@ -0,0 +1,12 @@ +# IssueConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**blank_issues_enabled** | Option<**bool**> | | [optional] +**contact_links** | Option<[**Vec**](IssueConfigContactLink.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/IssueConfigContactLink.md b/forgejo-openapi/docs/IssueConfigContactLink.md new file mode 100644 index 0000000..358e60f --- /dev/null +++ b/forgejo-openapi/docs/IssueConfigContactLink.md @@ -0,0 +1,13 @@ +# IssueConfigContactLink + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**about** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/IssueConfigValidation.md b/forgejo-openapi/docs/IssueConfigValidation.md new file mode 100644 index 0000000..7156d30 --- /dev/null +++ b/forgejo-openapi/docs/IssueConfigValidation.md @@ -0,0 +1,12 @@ +# IssueConfigValidation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | Option<**String**> | | [optional] +**valid** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/IssueDeadline.md b/forgejo-openapi/docs/IssueDeadline.md new file mode 100644 index 0000000..94c4d91 --- /dev/null +++ b/forgejo-openapi/docs/IssueDeadline.md @@ -0,0 +1,11 @@ +# IssueDeadline + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**due_date** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/IssueFormField.md b/forgejo-openapi/docs/IssueFormField.md new file mode 100644 index 0000000..14da9ac --- /dev/null +++ b/forgejo-openapi/docs/IssueFormField.md @@ -0,0 +1,15 @@ +# IssueFormField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | Option<**std::collections::HashMap**> | | [optional] +**id** | Option<**String**> | | [optional] +**r#type** | Option<**String**> | | [optional] +**validations** | Option<**std::collections::HashMap**> | | [optional] +**visible** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/IssueLabelsOption.md b/forgejo-openapi/docs/IssueLabelsOption.md new file mode 100644 index 0000000..682fa54 --- /dev/null +++ b/forgejo-openapi/docs/IssueLabelsOption.md @@ -0,0 +1,12 @@ +# IssueLabelsOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | Option<**Vec**> | Labels can be a list of integers representing label IDs or a list of strings representing label names | [optional] +**updated_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/IssueMeta.md b/forgejo-openapi/docs/IssueMeta.md new file mode 100644 index 0000000..a5000bc --- /dev/null +++ b/forgejo-openapi/docs/IssueMeta.md @@ -0,0 +1,13 @@ +# IssueMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | Option<**i64**> | | [optional] +**owner** | Option<**String**> | | [optional] +**repo** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/IssueTemplate.md b/forgejo-openapi/docs/IssueTemplate.md new file mode 100644 index 0000000..34679d6 --- /dev/null +++ b/forgejo-openapi/docs/IssueTemplate.md @@ -0,0 +1,18 @@ +# IssueTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**about** | Option<**String**> | | [optional] +**body** | Option<[**Vec**](IssueFormField.md)> | | [optional] +**content** | Option<**String**> | | [optional] +**file_name** | Option<**String**> | | [optional] +**labels** | Option<**Vec**> | | [optional] +**name** | Option<**String**> | | [optional] +**r#ref** | Option<**String**> | | [optional] +**title** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Label.md b/forgejo-openapi/docs/Label.md new file mode 100644 index 0000000..a018dbb --- /dev/null +++ b/forgejo-openapi/docs/Label.md @@ -0,0 +1,17 @@ +# Label + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**exclusive** | Option<**bool**> | | [optional] +**id** | Option<**i64**> | | [optional] +**is_archived** | Option<**bool**> | | [optional] +**name** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/LabelTemplate.md b/forgejo-openapi/docs/LabelTemplate.md new file mode 100644 index 0000000..d0ded8d --- /dev/null +++ b/forgejo-openapi/docs/LabelTemplate.md @@ -0,0 +1,14 @@ +# LabelTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**exclusive** | Option<**bool**> | | [optional] +**name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/LicenseTemplateInfo.md b/forgejo-openapi/docs/LicenseTemplateInfo.md new file mode 100644 index 0000000..832dc8c --- /dev/null +++ b/forgejo-openapi/docs/LicenseTemplateInfo.md @@ -0,0 +1,15 @@ +# LicenseTemplateInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | Option<**String**> | | [optional] +**implementation** | Option<**String**> | | [optional] +**key** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/LicensesTemplateListEntry.md b/forgejo-openapi/docs/LicensesTemplateListEntry.md new file mode 100644 index 0000000..0a1a61a --- /dev/null +++ b/forgejo-openapi/docs/LicensesTemplateListEntry.md @@ -0,0 +1,13 @@ +# LicensesTemplateListEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ListActionRunResponse.md b/forgejo-openapi/docs/ListActionRunResponse.md new file mode 100644 index 0000000..b2b2760 --- /dev/null +++ b/forgejo-openapi/docs/ListActionRunResponse.md @@ -0,0 +1,12 @@ +# ListActionRunResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_count** | Option<**i64**> | | [optional] +**workflow_runs** | Option<[**Vec**](ActionRun.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/MarkdownOption.md b/forgejo-openapi/docs/MarkdownOption.md new file mode 100644 index 0000000..33f0218 --- /dev/null +++ b/forgejo-openapi/docs/MarkdownOption.md @@ -0,0 +1,14 @@ +# MarkdownOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | Option<**String**> | Context to render in: body | [optional] +**mode** | Option<**String**> | Mode to render (comment, gfm, markdown) in: body | [optional] +**text** | Option<**String**> | Text markdown to render in: body | [optional] +**wiki** | Option<**bool**> | Is it a wiki page ? in: body | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/MarkupOption.md b/forgejo-openapi/docs/MarkupOption.md new file mode 100644 index 0000000..ac15ef0 --- /dev/null +++ b/forgejo-openapi/docs/MarkupOption.md @@ -0,0 +1,16 @@ +# MarkupOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**branch_path** | Option<**String**> | The current branch path where the form gets posted in: body | [optional] +**context** | Option<**String**> | Context to render in: body | [optional] +**file_path** | Option<**String**> | File path for detecting extension in file mode in: body | [optional] +**mode** | Option<**String**> | Mode to render (comment, gfm, markdown, file) in: body | [optional] +**text** | Option<**String**> | Text markup to render in: body | [optional] +**wiki** | Option<**bool**> | Is it a wiki page ? in: body | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/MergePullRequestOption.md b/forgejo-openapi/docs/MergePullRequestOption.md new file mode 100644 index 0000000..1755f6b --- /dev/null +++ b/forgejo-openapi/docs/MergePullRequestOption.md @@ -0,0 +1,18 @@ +# MergePullRequestOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**r#do** | **Do** | (enum: merge, rebase, rebase-merge, squash, fast-forward-only, manually-merged) | +**merge_commit_id** | Option<**String**> | | [optional] +**merge_message_field** | Option<**String**> | | [optional] +**merge_title_field** | Option<**String**> | | [optional] +**delete_branch_after_merge** | Option<**bool**> | | [optional] +**force_merge** | Option<**bool**> | | [optional] +**head_commit_id** | Option<**String**> | | [optional] +**merge_when_checks_succeed** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/MigrateRepoOptions.md b/forgejo-openapi/docs/MigrateRepoOptions.md new file mode 100644 index 0000000..a6e38fa --- /dev/null +++ b/forgejo-openapi/docs/MigrateRepoOptions.md @@ -0,0 +1,30 @@ +# MigrateRepoOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_password** | Option<**String**> | | [optional] +**auth_token** | Option<**String**> | | [optional] +**auth_username** | Option<**String**> | | [optional] +**clone_addr** | **String** | | +**description** | Option<**String**> | | [optional] +**issues** | Option<**bool**> | | [optional] +**labels** | Option<**bool**> | | [optional] +**lfs** | Option<**bool**> | | [optional] +**lfs_endpoint** | Option<**String**> | | [optional] +**milestones** | Option<**bool**> | | [optional] +**mirror** | Option<**bool**> | | [optional] +**mirror_interval** | Option<**String**> | | [optional] +**private** | Option<**bool**> | | [optional] +**pull_requests** | Option<**bool**> | | [optional] +**releases** | Option<**bool**> | | [optional] +**repo_name** | **String** | | +**repo_owner** | Option<**String**> | Name of User or Organisation who will own Repo after migration | [optional] +**service** | Option<**Service**> | (enum: git, github, gitea, gitlab, gogs, onedev, gitbucket, codebase) | [optional] +**uid** | Option<**i64**> | deprecated (only for backwards compatibility) | [optional] +**wiki** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Milestone.md b/forgejo-openapi/docs/Milestone.md new file mode 100644 index 0000000..c92f404 --- /dev/null +++ b/forgejo-openapi/docs/Milestone.md @@ -0,0 +1,20 @@ +# Milestone + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**closed_at** | Option<**String**> | | [optional] +**closed_issues** | Option<**i64**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**due_on** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**open_issues** | Option<**i64**> | | [optional] +**state** | Option<**String**> | StateType issue state type | [optional] +**title** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/MiscellaneousApi.md b/forgejo-openapi/docs/MiscellaneousApi.md new file mode 100644 index 0000000..daf3d21 --- /dev/null +++ b/forgejo-openapi/docs/MiscellaneousApi.md @@ -0,0 +1,364 @@ +# \MiscellaneousApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_gitignore_template_info**](MiscellaneousApi.md#get_gitignore_template_info) | **GET** /gitignore/templates/{name} | Returns information about a gitignore template +[**get_label_template_info**](MiscellaneousApi.md#get_label_template_info) | **GET** /label/templates/{name} | Returns all labels in a template +[**get_license_template_info**](MiscellaneousApi.md#get_license_template_info) | **GET** /licenses/{name} | Returns information about a license template +[**get_node_info**](MiscellaneousApi.md#get_node_info) | **GET** /nodeinfo | Returns the nodeinfo of the Forgejo application +[**get_signing_key**](MiscellaneousApi.md#get_signing_key) | **GET** /signing-key.gpg | Get default signing-key.gpg +[**get_ssh_signing_key**](MiscellaneousApi.md#get_ssh_signing_key) | **GET** /signing-key.ssh | Get default signing-key.ssh +[**get_version**](MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the running application +[**list_gitignores_templates**](MiscellaneousApi.md#list_gitignores_templates) | **GET** /gitignore/templates | Returns a list of all gitignore templates +[**list_label_templates**](MiscellaneousApi.md#list_label_templates) | **GET** /label/templates | Returns a list of all label templates +[**list_license_templates**](MiscellaneousApi.md#list_license_templates) | **GET** /licenses | Returns a list of all license templates +[**render_markdown**](MiscellaneousApi.md#render_markdown) | **POST** /markdown | Render a markdown document as HTML +[**render_markdown_raw**](MiscellaneousApi.md#render_markdown_raw) | **POST** /markdown/raw | Render raw markdown as HTML +[**render_markup**](MiscellaneousApi.md#render_markup) | **POST** /markup | Render a markup document as HTML + + + +## get_gitignore_template_info + +> models::GitignoreTemplateInfo get_gitignore_template_info(name) +Returns information about a gitignore template + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**name** | **String** | name of the template | [required] | + +### Return type + +[**models::GitignoreTemplateInfo**](GitignoreTemplateInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_label_template_info + +> Vec get_label_template_info(name) +Returns all labels in a template + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**name** | **String** | name of the template | [required] | + +### Return type + +[**Vec**](LabelTemplate.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_license_template_info + +> models::LicenseTemplateInfo get_license_template_info(name) +Returns information about a license template + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**name** | **String** | name of the license | [required] | + +### Return type + +[**models::LicenseTemplateInfo**](LicenseTemplateInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_node_info + +> models::NodeInfo get_node_info() +Returns the nodeinfo of the Forgejo application + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::NodeInfo**](NodeInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_signing_key + +> String get_signing_key() +Get default signing-key.gpg + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_ssh_signing_key + +> String get_ssh_signing_key() +Get default signing-key.ssh + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_version + +> models::ServerVersion get_version() +Returns the version of the running application + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::ServerVersion**](ServerVersion.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_gitignores_templates + +> Vec list_gitignores_templates() +Returns a list of all gitignore templates + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**Vec** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_label_templates + +> Vec list_label_templates() +Returns a list of all label templates + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**Vec** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_license_templates + +> Vec list_license_templates() +Returns a list of all license templates + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Vec**](LicensesTemplateListEntry.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## render_markdown + +> String render_markdown(body) +Render a markdown document as HTML + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**MarkdownOption**](MarkdownOption.md)> | | | + +### Return type + +**String** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## render_markdown_raw + +> String render_markdown_raw(body) +Render raw markdown as HTML + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | **String** | Request body to render | [required] | + +### Return type + +**String** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: text/plain +- **Accept**: text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## render_markup + +> String render_markup(body) +Render a markup document as HTML + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**MarkupOption**](MarkupOption.md)> | | | + +### Return type + +**String** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/forgejo-openapi/docs/NewIssuePinsAllowed.md b/forgejo-openapi/docs/NewIssuePinsAllowed.md new file mode 100644 index 0000000..5145e76 --- /dev/null +++ b/forgejo-openapi/docs/NewIssuePinsAllowed.md @@ -0,0 +1,12 @@ +# NewIssuePinsAllowed + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**issues** | Option<**bool**> | | [optional] +**pull_requests** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/NodeInfo.md b/forgejo-openapi/docs/NodeInfo.md new file mode 100644 index 0000000..b86967f --- /dev/null +++ b/forgejo-openapi/docs/NodeInfo.md @@ -0,0 +1,17 @@ +# NodeInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | Option<**serde_json::Value**> | | [optional] +**open_registrations** | Option<**bool**> | | [optional] +**protocols** | Option<**Vec**> | | [optional] +**services** | Option<[**models::NodeInfoServices**](NodeInfoServices.md)> | | [optional] +**software** | Option<[**models::NodeInfoSoftware**](NodeInfoSoftware.md)> | | [optional] +**usage** | Option<[**models::NodeInfoUsage**](NodeInfoUsage.md)> | | [optional] +**version** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/NodeInfoServices.md b/forgejo-openapi/docs/NodeInfoServices.md new file mode 100644 index 0000000..1cde335 --- /dev/null +++ b/forgejo-openapi/docs/NodeInfoServices.md @@ -0,0 +1,12 @@ +# NodeInfoServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbound** | Option<**Vec**> | | [optional] +**outbound** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/NodeInfoSoftware.md b/forgejo-openapi/docs/NodeInfoSoftware.md new file mode 100644 index 0000000..0660bf8 --- /dev/null +++ b/forgejo-openapi/docs/NodeInfoSoftware.md @@ -0,0 +1,14 @@ +# NodeInfoSoftware + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**homepage** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**repository** | Option<**String**> | | [optional] +**version** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/NodeInfoUsage.md b/forgejo-openapi/docs/NodeInfoUsage.md new file mode 100644 index 0000000..a4246f7 --- /dev/null +++ b/forgejo-openapi/docs/NodeInfoUsage.md @@ -0,0 +1,13 @@ +# NodeInfoUsage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**local_comments** | Option<**i64**> | | [optional] +**local_posts** | Option<**i64**> | | [optional] +**users** | Option<[**models::NodeInfoUsageUsers**](NodeInfoUsageUsers.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/NodeInfoUsageUsers.md b/forgejo-openapi/docs/NodeInfoUsageUsers.md new file mode 100644 index 0000000..ee1808b --- /dev/null +++ b/forgejo-openapi/docs/NodeInfoUsageUsers.md @@ -0,0 +1,13 @@ +# NodeInfoUsageUsers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active_halfyear** | Option<**i64**> | | [optional] +**active_month** | Option<**i64**> | | [optional] +**total** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Note.md b/forgejo-openapi/docs/Note.md new file mode 100644 index 0000000..f32f313 --- /dev/null +++ b/forgejo-openapi/docs/Note.md @@ -0,0 +1,12 @@ +# Note + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | Option<[**models::Commit**](Commit.md)> | | [optional] +**message** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/NoteOptions.md b/forgejo-openapi/docs/NoteOptions.md new file mode 100644 index 0000000..65bfc39 --- /dev/null +++ b/forgejo-openapi/docs/NoteOptions.md @@ -0,0 +1,11 @@ +# NoteOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/NotificationApi.md b/forgejo-openapi/docs/NotificationApi.md new file mode 100644 index 0000000..3dd9c3e --- /dev/null +++ b/forgejo-openapi/docs/NotificationApi.md @@ -0,0 +1,231 @@ +# \NotificationApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**notify_get_list**](NotificationApi.md#notify_get_list) | **GET** /notifications | List users's notification threads +[**notify_get_repo_list**](NotificationApi.md#notify_get_repo_list) | **GET** /repos/{owner}/{repo}/notifications | List users's notification threads on a specific repo +[**notify_get_thread**](NotificationApi.md#notify_get_thread) | **GET** /notifications/threads/{id} | Get notification thread by ID +[**notify_new_available**](NotificationApi.md#notify_new_available) | **GET** /notifications/new | Check if unread notifications exist +[**notify_read_list**](NotificationApi.md#notify_read_list) | **PUT** /notifications | Mark notification threads as read, pinned or unread +[**notify_read_repo_list**](NotificationApi.md#notify_read_repo_list) | **PUT** /repos/{owner}/{repo}/notifications | Mark notification threads as read, pinned or unread on a specific repo +[**notify_read_thread**](NotificationApi.md#notify_read_thread) | **PATCH** /notifications/threads/{id} | Mark notification thread as read by ID + + + +## notify_get_list + +> Vec notify_get_list(all, status_types, subject_type, since, before, page, limit) +List users's notification threads + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**all** | Option<**bool**> | If true, show notifications marked as read. Default value is false | | +**status_types** | Option<[**Vec**](String.md)> | Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. | | +**subject_type** | Option<[**Vec**](String.md)> | filter notifications by subject type | | +**since** | Option<**String**> | Only show notifications updated after the given time. This is a timestamp in RFC 3339 format | | +**before** | Option<**String**> | Only show notifications updated before the given time. This is a timestamp in RFC 3339 format | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](NotificationThread.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## notify_get_repo_list + +> Vec notify_get_repo_list(owner, repo, all, status_types, subject_type, since, before, page, limit) +List users's notification threads on a specific repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**all** | Option<**bool**> | If true, show notifications marked as read. Default value is false | | +**status_types** | Option<[**Vec**](String.md)> | Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned | | +**subject_type** | Option<[**Vec**](String.md)> | filter notifications by subject type | | +**since** | Option<**String**> | Only show notifications updated after the given time. This is a timestamp in RFC 3339 format | | +**before** | Option<**String**> | Only show notifications updated before the given time. This is a timestamp in RFC 3339 format | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](NotificationThread.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## notify_get_thread + +> models::NotificationThread notify_get_thread(id) +Get notification thread by ID + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of notification thread | [required] | + +### Return type + +[**models::NotificationThread**](NotificationThread.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## notify_new_available + +> models::NotificationCount notify_new_available() +Check if unread notifications exist + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::NotificationCount**](NotificationCount.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## notify_read_list + +> Vec notify_read_list(last_read_at, all, status_types, to_status) +Mark notification threads as read, pinned or unread + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**last_read_at** | Option<**String**> | Describes the last point that notifications were checked. Anything updated since this time will not be updated. | | +**all** | Option<**bool**> | If true, mark all notifications on this repo. Default value is false | | +**status_types** | Option<[**Vec**](String.md)> | Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. | | +**to_status** | Option<**String**> | Status to mark notifications as, Defaults to read. | | + +### Return type + +[**Vec**](NotificationThread.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## notify_read_repo_list + +> Vec notify_read_repo_list(owner, repo, all, status_types, to_status, last_read_at) +Mark notification threads as read, pinned or unread on a specific repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**all** | Option<**bool**> | If true, mark all notifications on this repo. Default value is false | | +**status_types** | Option<[**Vec**](String.md)> | Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. | | +**to_status** | Option<**String**> | Status to mark notifications as. Defaults to read. | | +**last_read_at** | Option<**String**> | Describes the last point that notifications were checked. Anything updated since this time will not be updated. | | + +### Return type + +[**Vec**](NotificationThread.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## notify_read_thread + +> models::NotificationThread notify_read_thread(id, to_status) +Mark notification thread as read by ID + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of notification thread | [required] | +**to_status** | Option<**String**> | Status to mark notifications as | |[default to read] + +### Return type + +[**models::NotificationThread**](NotificationThread.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/forgejo-openapi/docs/NotificationCount.md b/forgejo-openapi/docs/NotificationCount.md new file mode 100644 index 0000000..0c76de0 --- /dev/null +++ b/forgejo-openapi/docs/NotificationCount.md @@ -0,0 +1,11 @@ +# NotificationCount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/NotificationSubject.md b/forgejo-openapi/docs/NotificationSubject.md new file mode 100644 index 0000000..8a28c83 --- /dev/null +++ b/forgejo-openapi/docs/NotificationSubject.md @@ -0,0 +1,17 @@ +# NotificationSubject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_url** | Option<**String**> | | [optional] +**latest_comment_html_url** | Option<**String**> | | [optional] +**latest_comment_url** | Option<**String**> | | [optional] +**state** | Option<**String**> | StateType issue state type | [optional] +**title** | Option<**String**> | | [optional] +**r#type** | Option<**String**> | NotifySubjectType represent type of notification subject | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/NotificationThread.md b/forgejo-openapi/docs/NotificationThread.md new file mode 100644 index 0000000..a67580f --- /dev/null +++ b/forgejo-openapi/docs/NotificationThread.md @@ -0,0 +1,17 @@ +# NotificationThread + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**pinned** | Option<**bool**> | | [optional] +**repository** | Option<[**models::Repository**](Repository.md)> | | [optional] +**subject** | Option<[**models::NotificationSubject**](NotificationSubject.md)> | | [optional] +**unread** | Option<**bool**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/OAuth2Application.md b/forgejo-openapi/docs/OAuth2Application.md new file mode 100644 index 0000000..19e3cbb --- /dev/null +++ b/forgejo-openapi/docs/OAuth2Application.md @@ -0,0 +1,17 @@ +# OAuth2Application + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_id** | Option<**String**> | | [optional] +**client_secret** | Option<**String**> | | [optional] +**confidential_client** | Option<**bool**> | | [optional] +**created** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] +**redirect_uris** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Organization.md b/forgejo-openapi/docs/Organization.md new file mode 100644 index 0000000..5ca228b --- /dev/null +++ b/forgejo-openapi/docs/Organization.md @@ -0,0 +1,21 @@ +# Organization + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avatar_url** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**full_name** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**location** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**repo_admin_change_team_access** | Option<**bool**> | | [optional] +**username** | Option<**String**> | deprecated | [optional] +**visibility** | Option<**String**> | | [optional] +**website** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/OrganizationApi.md b/forgejo-openapi/docs/OrganizationApi.md new file mode 100644 index 0000000..0de0344 --- /dev/null +++ b/forgejo-openapi/docs/OrganizationApi.md @@ -0,0 +1,1983 @@ +# \OrganizationApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_org_repo**](OrganizationApi.md#create_org_repo) | **POST** /orgs/{org}/repos | Create a repository in an organization +[**create_org_repo_deprecated**](OrganizationApi.md#create_org_repo_deprecated) | **POST** /org/{org}/repos | Create a repository in an organization +[**create_org_variable**](OrganizationApi.md#create_org_variable) | **POST** /orgs/{org}/actions/variables/{variablename} | Create a new variable in organization +[**delete_org_secret**](OrganizationApi.md#delete_org_secret) | **DELETE** /orgs/{org}/actions/secrets/{secretname} | Delete a secret in an organization +[**delete_org_variable**](OrganizationApi.md#delete_org_variable) | **DELETE** /orgs/{org}/actions/variables/{variablename} | Delete organization's variable by name +[**get_org_variable**](OrganizationApi.md#get_org_variable) | **GET** /orgs/{org}/actions/variables/{variablename} | Get organization's variable by name +[**get_org_variables_list**](OrganizationApi.md#get_org_variables_list) | **GET** /orgs/{org}/actions/variables | List variables of an organization +[**org_add_team_member**](OrganizationApi.md#org_add_team_member) | **PUT** /teams/{id}/members/{username} | Add a team member +[**org_add_team_repository**](OrganizationApi.md#org_add_team_repository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team +[**org_block_user**](OrganizationApi.md#org_block_user) | **PUT** /orgs/{org}/block/{username} | Blocks a user from the organization +[**org_check_quota**](OrganizationApi.md#org_check_quota) | **GET** /orgs/{org}/quota/check | Check if the organization is over quota for a given subject +[**org_conceal_member**](OrganizationApi.md#org_conceal_member) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership +[**org_create**](OrganizationApi.md#org_create) | **POST** /orgs | Create an organization +[**org_create_hook**](OrganizationApi.md#org_create_hook) | **POST** /orgs/{org}/hooks | Create a hook +[**org_create_label**](OrganizationApi.md#org_create_label) | **POST** /orgs/{org}/labels | Create a label for an organization +[**org_create_team**](OrganizationApi.md#org_create_team) | **POST** /orgs/{org}/teams | Create a team +[**org_delete**](OrganizationApi.md#org_delete) | **DELETE** /orgs/{org} | Delete an organization +[**org_delete_avatar**](OrganizationApi.md#org_delete_avatar) | **DELETE** /orgs/{org}/avatar | Delete an organization's avatar. It will be replaced by a default one +[**org_delete_hook**](OrganizationApi.md#org_delete_hook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook +[**org_delete_label**](OrganizationApi.md#org_delete_label) | **DELETE** /orgs/{org}/labels/{id} | Delete a label +[**org_delete_member**](OrganizationApi.md#org_delete_member) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization +[**org_delete_team**](OrganizationApi.md#org_delete_team) | **DELETE** /teams/{id} | Delete a team +[**org_edit**](OrganizationApi.md#org_edit) | **PATCH** /orgs/{org} | Edit an organization +[**org_edit_hook**](OrganizationApi.md#org_edit_hook) | **PATCH** /orgs/{org}/hooks/{id} | Update a hook +[**org_edit_label**](OrganizationApi.md#org_edit_label) | **PATCH** /orgs/{org}/labels/{id} | Update a label +[**org_edit_team**](OrganizationApi.md#org_edit_team) | **PATCH** /teams/{id} | Edit a team +[**org_get**](OrganizationApi.md#org_get) | **GET** /orgs/{org} | Get an organization +[**org_get_all**](OrganizationApi.md#org_get_all) | **GET** /orgs | List all organizations +[**org_get_hook**](OrganizationApi.md#org_get_hook) | **GET** /orgs/{org}/hooks/{id} | Get a hook +[**org_get_label**](OrganizationApi.md#org_get_label) | **GET** /orgs/{org}/labels/{id} | Get a single label +[**org_get_quota**](OrganizationApi.md#org_get_quota) | **GET** /orgs/{org}/quota | Get quota information for an organization +[**org_get_runner_registration_token**](OrganizationApi.md#org_get_runner_registration_token) | **GET** /orgs/{org}/actions/runners/registration-token | Get an organization's actions runner registration token +[**org_get_team**](OrganizationApi.md#org_get_team) | **GET** /teams/{id} | Get a team +[**org_get_user_permissions**](OrganizationApi.md#org_get_user_permissions) | **GET** /users/{username}/orgs/{org}/permissions | Get user permissions in organization +[**org_is_member**](OrganizationApi.md#org_is_member) | **GET** /orgs/{org}/members/{username} | Check if a user is a member of an organization +[**org_is_public_member**](OrganizationApi.md#org_is_public_member) | **GET** /orgs/{org}/public_members/{username} | Check if a user is a public member of an organization +[**org_list_actions_secrets**](OrganizationApi.md#org_list_actions_secrets) | **GET** /orgs/{org}/actions/secrets | List actions secrets of an organization +[**org_list_activity_feeds**](OrganizationApi.md#org_list_activity_feeds) | **GET** /orgs/{org}/activities/feeds | List an organization's activity feeds +[**org_list_blocked_users**](OrganizationApi.md#org_list_blocked_users) | **GET** /orgs/{org}/list_blocked | List the organization's blocked users +[**org_list_current_user_orgs**](OrganizationApi.md#org_list_current_user_orgs) | **GET** /user/orgs | List the current user's organizations +[**org_list_hooks**](OrganizationApi.md#org_list_hooks) | **GET** /orgs/{org}/hooks | List an organization's webhooks +[**org_list_labels**](OrganizationApi.md#org_list_labels) | **GET** /orgs/{org}/labels | List an organization's labels +[**org_list_members**](OrganizationApi.md#org_list_members) | **GET** /orgs/{org}/members | List an organization's members +[**org_list_public_members**](OrganizationApi.md#org_list_public_members) | **GET** /orgs/{org}/public_members | List an organization's public members +[**org_list_quota_artifacts**](OrganizationApi.md#org_list_quota_artifacts) | **GET** /orgs/{org}/quota/artifacts | List the artifacts affecting the organization's quota +[**org_list_quota_attachments**](OrganizationApi.md#org_list_quota_attachments) | **GET** /orgs/{org}/quota/attachments | List the attachments affecting the organization's quota +[**org_list_quota_packages**](OrganizationApi.md#org_list_quota_packages) | **GET** /orgs/{org}/quota/packages | List the packages affecting the organization's quota +[**org_list_repos**](OrganizationApi.md#org_list_repos) | **GET** /orgs/{org}/repos | List an organization's repos +[**org_list_team_activity_feeds**](OrganizationApi.md#org_list_team_activity_feeds) | **GET** /teams/{id}/activities/feeds | List a team's activity feeds +[**org_list_team_member**](OrganizationApi.md#org_list_team_member) | **GET** /teams/{id}/members/{username} | List a particular member of team +[**org_list_team_members**](OrganizationApi.md#org_list_team_members) | **GET** /teams/{id}/members | List a team's members +[**org_list_team_repo**](OrganizationApi.md#org_list_team_repo) | **GET** /teams/{id}/repos/{org}/{repo} | List a particular repo of team +[**org_list_team_repos**](OrganizationApi.md#org_list_team_repos) | **GET** /teams/{id}/repos | List a team's repos +[**org_list_teams**](OrganizationApi.md#org_list_teams) | **GET** /orgs/{org}/teams | List an organization's teams +[**org_list_user_orgs**](OrganizationApi.md#org_list_user_orgs) | **GET** /users/{username}/orgs | List a user's organizations +[**org_publicize_member**](OrganizationApi.md#org_publicize_member) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership +[**org_remove_team_member**](OrganizationApi.md#org_remove_team_member) | **DELETE** /teams/{id}/members/{username} | Remove a team member +[**org_remove_team_repository**](OrganizationApi.md#org_remove_team_repository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team +[**org_search_run_jobs**](OrganizationApi.md#org_search_run_jobs) | **GET** /orgs/{org}/actions/runners/jobs | Search for organization's action jobs according filter conditions +[**org_unblock_user**](OrganizationApi.md#org_unblock_user) | **PUT** /orgs/{org}/unblock/{username} | Unblock a user from the organization +[**org_update_avatar**](OrganizationApi.md#org_update_avatar) | **POST** /orgs/{org}/avatar | Update an organization's avatar +[**rename_org**](OrganizationApi.md#rename_org) | **POST** /orgs/{org}/rename | Rename an organization +[**team_search**](OrganizationApi.md#team_search) | **GET** /orgs/{org}/teams/search | Search for teams within an organization +[**update_org_secret**](OrganizationApi.md#update_org_secret) | **PUT** /orgs/{org}/actions/secrets/{secretname} | Create or Update a secret value in an organization +[**update_org_variable**](OrganizationApi.md#update_org_variable) | **PUT** /orgs/{org}/actions/variables/{variablename} | Update variable in organization + + + +## create_org_repo + +> models::Repository create_org_repo(org, body) +Create a repository in an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of organization | [required] | +**body** | Option<[**CreateRepoOption**](CreateRepoOption.md)> | | | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_org_repo_deprecated + +> models::Repository create_org_repo_deprecated(org, body) +Create a repository in an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of organization | [required] | +**body** | Option<[**CreateRepoOption**](CreateRepoOption.md)> | | | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_org_variable + +> create_org_variable(org, variablename, body) +Create a new variable in organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**variablename** | **String** | name of the variable | [required] | +**body** | Option<[**CreateVariableOption**](CreateVariableOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_org_secret + +> delete_org_secret(org, secretname) +Delete a secret in an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of organization | [required] | +**secretname** | **String** | name of the secret | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_org_variable + +> delete_org_variable(org, variablename) +Delete organization's variable by name + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**variablename** | **String** | name of the variable | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_org_variable + +> models::ActionVariable get_org_variable(org, variablename) +Get organization's variable by name + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**variablename** | **String** | name of the variable | [required] | + +### Return type + +[**models::ActionVariable**](ActionVariable.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_org_variables_list + +> Vec get_org_variables_list(org, page, limit) +List variables of an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](ActionVariable.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_add_team_member + +> org_add_team_member(id, username) +Add a team member + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team | [required] | +**username** | **String** | username of the user to add | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_add_team_repository + +> org_add_team_repository(id, org, repo) +Add a repository to a team + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team | [required] | +**org** | **String** | organization that owns the repo to add | [required] | +**repo** | **String** | name of the repo to add | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_block_user + +> org_block_user(org, username) +Blocks a user from the organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the org | [required] | +**username** | **String** | username of the user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_check_quota + +> bool org_check_quota(org, subject) +Check if the organization is over quota for a given subject + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**subject** | **String** | subject of the quota | [required] | + +### Return type + +**bool** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_conceal_member + +> org_conceal_member(org, username) +Conceal a user's membership + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**username** | **String** | username of the user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_create + +> models::Organization org_create(organization) +Create an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**organization** | [**CreateOrgOption**](CreateOrgOption.md) | | [required] | + +### Return type + +[**models::Organization**](Organization.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_create_hook + +> models::Hook org_create_hook(org, body) +Create a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**body** | [**CreateHookOption**](CreateHookOption.md) | | [required] | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_create_label + +> models::Label org_create_label(org, body) +Create a label for an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**body** | Option<[**CreateLabelOption**](CreateLabelOption.md)> | | | + +### Return type + +[**models::Label**](Label.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_create_team + +> models::Team org_create_team(org, body) +Create a team + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**body** | Option<[**CreateTeamOption**](CreateTeamOption.md)> | | | + +### Return type + +[**models::Team**](Team.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_delete + +> org_delete(org) +Delete an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | organization that is to be deleted | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_delete_avatar + +> org_delete_avatar(org) +Delete an organization's avatar. It will be replaced by a default one + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_delete_hook + +> org_delete_hook(org, id) +Delete a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**id** | **i64** | id of the hook to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_delete_label + +> org_delete_label(org, id) +Delete a label + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**id** | **i64** | id of the label to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_delete_member + +> org_delete_member(org, username) +Remove a member from an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**username** | **String** | username of the user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_delete_team + +> org_delete_team(id) +Delete a team + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_edit + +> models::Organization org_edit(org, body) +Edit an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization to edit | [required] | +**body** | [**EditOrgOption**](EditOrgOption.md) | | [required] | + +### Return type + +[**models::Organization**](Organization.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_edit_hook + +> models::Hook org_edit_hook(org, id, body) +Update a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**id** | **i64** | id of the hook to update | [required] | +**body** | Option<[**EditHookOption**](EditHookOption.md)> | | | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_edit_label + +> models::Label org_edit_label(org, id, body) +Update a label + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**id** | **i64** | id of the label to edit | [required] | +**body** | Option<[**EditLabelOption**](EditLabelOption.md)> | | | + +### Return type + +[**models::Label**](Label.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_edit_team + +> models::Team org_edit_team(id, body) +Edit a team + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team to edit | [required] | +**body** | Option<[**EditTeamOption**](EditTeamOption.md)> | | | + +### Return type + +[**models::Team**](Team.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_get + +> models::Organization org_get(org) +Get an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization to get | [required] | + +### Return type + +[**models::Organization**](Organization.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_get_all + +> Vec org_get_all(page, limit) +List all organizations + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Organization.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_get_hook + +> models::Hook org_get_hook(org, id) +Get a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**id** | **i64** | id of the hook to get | [required] | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_get_label + +> models::Label org_get_label(org, id) +Get a single label + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**id** | **i64** | id of the label to get | [required] | + +### Return type + +[**models::Label**](Label.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_get_quota + +> models::QuotaInfo org_get_quota(org) +Get quota information for an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | + +### Return type + +[**models::QuotaInfo**](QuotaInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_get_runner_registration_token + +> models::RegistrationToken org_get_runner_registration_token(org) +Get an organization's actions runner registration token + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | + +### Return type + +[**models::RegistrationToken**](RegistrationToken.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_get_team + +> models::Team org_get_team(id) +Get a team + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team to get | [required] | + +### Return type + +[**models::Team**](Team.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_get_user_permissions + +> models::OrganizationPermissions org_get_user_permissions(username, org) +Get user permissions in organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**org** | **String** | name of the organization | [required] | + +### Return type + +[**models::OrganizationPermissions**](OrganizationPermissions.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_is_member + +> org_is_member(org, username) +Check if a user is a member of an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**username** | **String** | username of the user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_is_public_member + +> org_is_public_member(org, username) +Check if a user is a public member of an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**username** | **String** | username of the user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_actions_secrets + +> Vec org_list_actions_secrets(org, page, limit) +List actions secrets of an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Secret.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_activity_feeds + +> Vec org_list_activity_feeds(org, date, page, limit) +List an organization's activity feeds + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the org | [required] | +**date** | Option<**String**> | the date of the activities to be found | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Activity.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_blocked_users + +> Vec org_list_blocked_users(org, page, limit) +List the organization's blocked users + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the org | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](BlockedUser.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_current_user_orgs + +> Vec org_list_current_user_orgs(page, limit) +List the current user's organizations + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Organization.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_hooks + +> Vec org_list_hooks(org, page, limit) +List an organization's webhooks + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_labels + +> Vec org_list_labels(org, sort, page, limit) +List an organization's labels + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**sort** | Option<**String**> | Specifies the sorting method: mostissues, leastissues, or reversealphabetically. | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Label.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_members + +> Vec org_list_members(org, page, limit) +List an organization's members + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_public_members + +> Vec org_list_public_members(org, page, limit) +List an organization's public members + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_quota_artifacts + +> Vec org_list_quota_artifacts(org, page, limit) +List the artifacts affecting the organization's quota + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](QuotaUsedArtifact.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_quota_attachments + +> Vec org_list_quota_attachments(org, page, limit) +List the attachments affecting the organization's quota + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](QuotaUsedAttachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_quota_packages + +> Vec org_list_quota_packages(org, page, limit) +List the packages affecting the organization's quota + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](QuotaUsedPackage.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_repos + +> Vec org_list_repos(org, page, limit) +List an organization's repos + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_team_activity_feeds + +> Vec org_list_team_activity_feeds(id, date, page, limit) +List a team's activity feeds + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team | [required] | +**date** | Option<**String**> | the date of the activities to be found | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Activity.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_team_member + +> models::User org_list_team_member(id, username) +List a particular member of team + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team | [required] | +**username** | **String** | username of the member to list | [required] | + +### Return type + +[**models::User**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_team_members + +> Vec org_list_team_members(id, page, limit) +List a team's members + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_team_repo + +> models::Repository org_list_team_repo(id, org, repo) +List a particular repo of team + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team | [required] | +**org** | **String** | organization that owns the repo to list | [required] | +**repo** | **String** | name of the repo to list | [required] | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_team_repos + +> Vec org_list_team_repos(id, page, limit) +List a team's repos + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_teams + +> Vec org_list_teams(org, page, limit) +List an organization's teams + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Team.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_list_user_orgs + +> Vec org_list_user_orgs(username, page, limit) +List a user's organizations + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Organization.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_publicize_member + +> org_publicize_member(org, username) +Publicize a user's membership + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**username** | **String** | username of the user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_remove_team_member + +> org_remove_team_member(id, username) +Remove a team member + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team | [required] | +**username** | **String** | username of the user to remove | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_remove_team_repository + +> org_remove_team_repository(id, org, repo) +Remove a repository from a team + +This does not delete the repository, it only removes the repository from the team. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the team | [required] | +**org** | **String** | organization that owns the repo to remove | [required] | +**repo** | **String** | name of the repo to remove | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_search_run_jobs + +> Vec org_search_run_jobs(org, labels) +Search for organization's action jobs according filter conditions + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**labels** | Option<**String**> | a comma separated list of run job labels to search for | | + +### Return type + +[**Vec**](ActionRunJob.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_unblock_user + +> org_unblock_user(org, username) +Unblock a user from the organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the org | [required] | +**username** | **String** | username of the user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## org_update_avatar + +> org_update_avatar(org, body) +Update an organization's avatar + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**body** | Option<[**UpdateUserAvatarOption**](UpdateUserAvatarOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## rename_org + +> rename_org(org, body) +Rename an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | existing org name | [required] | +**body** | [**RenameOrgOption**](RenameOrgOption.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## team_search + +> models::TeamSearchResults team_search(org, q, include_desc, page, limit) +Search for teams within an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**q** | Option<**String**> | keywords to search | | +**include_desc** | Option<**bool**> | include search within team description (defaults to true) | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**models::TeamSearchResults**](TeamSearchResults.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_org_secret + +> update_org_secret(org, secretname, body) +Create or Update a secret value in an organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of organization | [required] | +**secretname** | **String** | name of the secret | [required] | +**body** | Option<[**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_org_variable + +> update_org_variable(org, variablename, body) +Update variable in organization + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**org** | **String** | name of the organization | [required] | +**variablename** | **String** | name of the variable | [required] | +**body** | Option<[**UpdateVariableOption**](UpdateVariableOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/forgejo-openapi/docs/OrganizationPermissions.md b/forgejo-openapi/docs/OrganizationPermissions.md new file mode 100644 index 0000000..7a964fa --- /dev/null +++ b/forgejo-openapi/docs/OrganizationPermissions.md @@ -0,0 +1,15 @@ +# OrganizationPermissions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_create_repository** | Option<**bool**> | | [optional] +**can_read** | Option<**bool**> | | [optional] +**can_write** | Option<**bool**> | | [optional] +**is_admin** | Option<**bool**> | | [optional] +**is_owner** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Package.md b/forgejo-openapi/docs/Package.md new file mode 100644 index 0000000..29ef457 --- /dev/null +++ b/forgejo-openapi/docs/Package.md @@ -0,0 +1,19 @@ +# Package + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | Option<**String**> | | [optional] +**creator** | Option<[**models::User**](User.md)> | | [optional] +**html_url** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] +**owner** | Option<[**models::User**](User.md)> | | [optional] +**repository** | Option<[**models::Repository**](Repository.md)> | | [optional] +**r#type** | Option<**String**> | | [optional] +**version** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PackageApi.md b/forgejo-openapi/docs/PackageApi.md new file mode 100644 index 0000000..39540b5 --- /dev/null +++ b/forgejo-openapi/docs/PackageApi.md @@ -0,0 +1,200 @@ +# \PackageApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_package**](PackageApi.md#delete_package) | **DELETE** /packages/{owner}/{type}/{name}/{version} | Delete a package +[**get_package**](PackageApi.md#get_package) | **GET** /packages/{owner}/{type}/{name}/{version} | Gets a package +[**link_package**](PackageApi.md#link_package) | **POST** /packages/{owner}/{type}/{name}/-/link/{repo_name} | Link a package to a repository +[**list_package_files**](PackageApi.md#list_package_files) | **GET** /packages/{owner}/{type}/{name}/{version}/files | Gets all files of a package +[**list_packages**](PackageApi.md#list_packages) | **GET** /packages/{owner} | Gets all packages of an owner +[**unlink_package**](PackageApi.md#unlink_package) | **POST** /packages/{owner}/{type}/{name}/-/unlink | Unlink a package from a repository + + + +## delete_package + +> delete_package(owner, r#type, name, version) +Delete a package + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the package | [required] | +**r#type** | **String** | type of the package | [required] | +**name** | **String** | name of the package | [required] | +**version** | **String** | version of the package | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_package + +> models::Package get_package(owner, r#type, name, version) +Gets a package + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the package | [required] | +**r#type** | **String** | type of the package | [required] | +**name** | **String** | name of the package | [required] | +**version** | **String** | version of the package | [required] | + +### Return type + +[**models::Package**](Package.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## link_package + +> link_package(owner, r#type, name, repo_name) +Link a package to a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the package | [required] | +**r#type** | **String** | type of the package | [required] | +**name** | **String** | name of the package | [required] | +**repo_name** | **String** | name of the repository to link. | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_package_files + +> Vec list_package_files(owner, r#type, name, version) +Gets all files of a package + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the package | [required] | +**r#type** | **String** | type of the package | [required] | +**name** | **String** | name of the package | [required] | +**version** | **String** | version of the package | [required] | + +### Return type + +[**Vec**](PackageFile.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_packages + +> Vec list_packages(owner, page, limit, r#type, q) +Gets all packages of an owner + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the packages | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | +**r#type** | Option<**String**> | package type filter | | +**q** | Option<**String**> | name filter | | + +### Return type + +[**Vec**](Package.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## unlink_package + +> unlink_package(owner, r#type, name) +Unlink a package from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the package | [required] | +**r#type** | **String** | type of the package | [required] | +**name** | **String** | name of the package | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/forgejo-openapi/docs/PackageFile.md b/forgejo-openapi/docs/PackageFile.md new file mode 100644 index 0000000..772bfb0 --- /dev/null +++ b/forgejo-openapi/docs/PackageFile.md @@ -0,0 +1,17 @@ +# PackageFile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**size** | Option<**i64**> | | [optional] +**id** | Option<**i64**> | | [optional] +**md5** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**sha1** | Option<**String**> | | [optional] +**sha256** | Option<**String**> | | [optional] +**sha512** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PayloadCommit.md b/forgejo-openapi/docs/PayloadCommit.md new file mode 100644 index 0000000..cf9126f --- /dev/null +++ b/forgejo-openapi/docs/PayloadCommit.md @@ -0,0 +1,20 @@ +# PayloadCommit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**added** | Option<**Vec**> | | [optional] +**author** | Option<[**models::PayloadUser**](PayloadUser.md)> | | [optional] +**committer** | Option<[**models::PayloadUser**](PayloadUser.md)> | | [optional] +**id** | Option<**String**> | sha1 hash of the commit | [optional] +**message** | Option<**String**> | | [optional] +**modified** | Option<**Vec**> | | [optional] +**removed** | Option<**Vec**> | | [optional] +**timestamp** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] +**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PayloadCommitVerification.md b/forgejo-openapi/docs/PayloadCommitVerification.md new file mode 100644 index 0000000..d6e7c6c --- /dev/null +++ b/forgejo-openapi/docs/PayloadCommitVerification.md @@ -0,0 +1,15 @@ +# PayloadCommitVerification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payload** | Option<**String**> | | [optional] +**reason** | Option<**String**> | | [optional] +**signature** | Option<**String**> | | [optional] +**signer** | Option<[**models::PayloadUser**](PayloadUser.md)> | | [optional] +**verified** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PayloadUser.md b/forgejo-openapi/docs/PayloadUser.md new file mode 100644 index 0000000..2a1065b --- /dev/null +++ b/forgejo-openapi/docs/PayloadUser.md @@ -0,0 +1,13 @@ +# PayloadUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | Option<**String**> | | [optional] +**name** | Option<**String**> | Full name of the commit author | [optional] +**username** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Permission.md b/forgejo-openapi/docs/Permission.md new file mode 100644 index 0000000..88c2032 --- /dev/null +++ b/forgejo-openapi/docs/Permission.md @@ -0,0 +1,13 @@ +# Permission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**admin** | Option<**bool**> | | [optional] +**pull** | Option<**bool**> | | [optional] +**push** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PrBranchInfo.md b/forgejo-openapi/docs/PrBranchInfo.md new file mode 100644 index 0000000..1cfd8a0 --- /dev/null +++ b/forgejo-openapi/docs/PrBranchInfo.md @@ -0,0 +1,15 @@ +# PrBranchInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | Option<**String**> | | [optional] +**r#ref** | Option<**String**> | | [optional] +**repo** | Option<[**models::Repository**](Repository.md)> | | [optional] +**repo_id** | Option<**i64**> | | [optional] +**sha** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PublicKey.md b/forgejo-openapi/docs/PublicKey.md new file mode 100644 index 0000000..39ee65a --- /dev/null +++ b/forgejo-openapi/docs/PublicKey.md @@ -0,0 +1,19 @@ +# PublicKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | Option<**String**> | | [optional] +**fingerprint** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**key** | Option<**String**> | | [optional] +**key_type** | Option<**String**> | | [optional] +**read_only** | Option<**bool**> | | [optional] +**title** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] +**user** | Option<[**models::User**](User.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PullRequest.md b/forgejo-openapi/docs/PullRequest.md new file mode 100644 index 0000000..568ba58 --- /dev/null +++ b/forgejo-openapi/docs/PullRequest.md @@ -0,0 +1,48 @@ +# PullRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additions** | Option<**i64**> | | [optional] +**allow_maintainer_edit** | Option<**bool**> | | [optional] +**assignee** | Option<[**models::User**](User.md)> | | [optional] +**assignees** | Option<[**Vec**](User.md)> | | [optional] +**base** | Option<[**models::PrBranchInfo**](PRBranchInfo.md)> | | [optional] +**body** | Option<**String**> | | [optional] +**changed_files** | Option<**i64**> | | [optional] +**closed_at** | Option<**String**> | | [optional] +**comments** | Option<**i64**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**deletions** | Option<**i64**> | | [optional] +**diff_url** | Option<**String**> | | [optional] +**draft** | Option<**bool**> | | [optional] +**due_date** | Option<**String**> | | [optional] +**flow** | Option<**i64**> | | [optional] +**head** | Option<[**models::PrBranchInfo**](PRBranchInfo.md)> | | [optional] +**html_url** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**is_locked** | Option<**bool**> | | [optional] +**labels** | Option<[**Vec**](Label.md)> | | [optional] +**merge_base** | Option<**String**> | | [optional] +**merge_commit_sha** | Option<**String**> | | [optional] +**mergeable** | Option<**bool**> | | [optional] +**merged** | Option<**bool**> | | [optional] +**merged_at** | Option<**String**> | | [optional] +**merged_by** | Option<[**models::User**](User.md)> | | [optional] +**milestone** | Option<[**models::Milestone**](Milestone.md)> | | [optional] +**number** | Option<**i64**> | | [optional] +**patch_url** | Option<**String**> | | [optional] +**pin_order** | Option<**i64**> | | [optional] +**requested_reviewers** | Option<[**Vec**](User.md)> | | [optional] +**requested_reviewers_teams** | Option<[**Vec**](Team.md)> | | [optional] +**review_comments** | Option<**i64**> | number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) | [optional] +**state** | Option<**String**> | StateType issue state type | [optional] +**title** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] +**user** | Option<[**models::User**](User.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PullRequestMeta.md b/forgejo-openapi/docs/PullRequestMeta.md new file mode 100644 index 0000000..9b089db --- /dev/null +++ b/forgejo-openapi/docs/PullRequestMeta.md @@ -0,0 +1,14 @@ +# PullRequestMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**draft** | Option<**bool**> | | [optional] +**html_url** | Option<**String**> | | [optional] +**merged** | Option<**bool**> | | [optional] +**merged_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PullReview.md b/forgejo-openapi/docs/PullReview.md new file mode 100644 index 0000000..006b465 --- /dev/null +++ b/forgejo-openapi/docs/PullReview.md @@ -0,0 +1,24 @@ +# PullReview + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | Option<**String**> | | [optional] +**comments_count** | Option<**i64**> | | [optional] +**commit_id** | Option<**String**> | | [optional] +**dismissed** | Option<**bool**> | | [optional] +**html_url** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**official** | Option<**bool**> | | [optional] +**pull_request_url** | Option<**String**> | | [optional] +**stale** | Option<**bool**> | | [optional] +**state** | Option<**String**> | ReviewStateType review state type | [optional] +**submitted_at** | Option<**String**> | | [optional] +**team** | Option<[**models::Team**](Team.md)> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**user** | Option<[**models::User**](User.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PullReviewComment.md b/forgejo-openapi/docs/PullReviewComment.md new file mode 100644 index 0000000..5aa0e29 --- /dev/null +++ b/forgejo-openapi/docs/PullReviewComment.md @@ -0,0 +1,25 @@ +# PullReviewComment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | Option<**String**> | | [optional] +**commit_id** | Option<**String**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**diff_hunk** | Option<**String**> | | [optional] +**html_url** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**original_commit_id** | Option<**String**> | | [optional] +**original_position** | Option<**i32**> | | [optional] +**path** | Option<**String**> | | [optional] +**position** | Option<**i32**> | | [optional] +**pull_request_review_id** | Option<**i64**> | | [optional] +**pull_request_url** | Option<**String**> | | [optional] +**resolver** | Option<[**models::User**](User.md)> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**user** | Option<[**models::User**](User.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PullReviewRequestOptions.md b/forgejo-openapi/docs/PullReviewRequestOptions.md new file mode 100644 index 0000000..8dfc1da --- /dev/null +++ b/forgejo-openapi/docs/PullReviewRequestOptions.md @@ -0,0 +1,12 @@ +# PullReviewRequestOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reviewers** | Option<**Vec**> | | [optional] +**team_reviewers** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/PushMirror.md b/forgejo-openapi/docs/PushMirror.md new file mode 100644 index 0000000..d824d71 --- /dev/null +++ b/forgejo-openapi/docs/PushMirror.md @@ -0,0 +1,20 @@ +# PushMirror + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**branch_filter** | Option<**String**> | | [optional] +**created** | Option<**String**> | | [optional] +**interval** | Option<**String**> | | [optional] +**last_error** | Option<**String**> | | [optional] +**last_update** | Option<**String**> | | [optional] +**public_key** | Option<**String**> | | [optional] +**remote_address** | Option<**String**> | | [optional] +**remote_name** | Option<**String**> | | [optional] +**repo_name** | Option<**String**> | | [optional] +**sync_on_commit** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaGroup.md b/forgejo-openapi/docs/QuotaGroup.md new file mode 100644 index 0000000..c89aad6 --- /dev/null +++ b/forgejo-openapi/docs/QuotaGroup.md @@ -0,0 +1,12 @@ +# QuotaGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | Name of the group | [optional] +**rules** | Option<[**Vec**](QuotaRuleInfo.md)> | Rules associated with the group | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaInfo.md b/forgejo-openapi/docs/QuotaInfo.md new file mode 100644 index 0000000..6ad6bc8 --- /dev/null +++ b/forgejo-openapi/docs/QuotaInfo.md @@ -0,0 +1,12 @@ +# QuotaInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**groups** | Option<[**Vec**](QuotaGroup.md)> | QuotaGroupList represents a list of quota groups | [optional] +**used** | Option<[**models::QuotaUsed**](QuotaUsed.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaRuleInfo.md b/forgejo-openapi/docs/QuotaRuleInfo.md new file mode 100644 index 0000000..24a9842 --- /dev/null +++ b/forgejo-openapi/docs/QuotaRuleInfo.md @@ -0,0 +1,13 @@ +# QuotaRuleInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | Option<**i64**> | The limit set by the rule | [optional] +**name** | Option<**String**> | Name of the rule (only shown to admins) | [optional] +**subjects** | Option<**Vec**> | Subjects the rule affects | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaUsed.md b/forgejo-openapi/docs/QuotaUsed.md new file mode 100644 index 0000000..b52b9d0 --- /dev/null +++ b/forgejo-openapi/docs/QuotaUsed.md @@ -0,0 +1,11 @@ +# QuotaUsed + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**size** | Option<[**models::QuotaUsedSize**](QuotaUsedSize.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaUsedArtifact.md b/forgejo-openapi/docs/QuotaUsedArtifact.md new file mode 100644 index 0000000..63f9be4 --- /dev/null +++ b/forgejo-openapi/docs/QuotaUsedArtifact.md @@ -0,0 +1,13 @@ +# QuotaUsedArtifact + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_url** | Option<**String**> | HTML URL to the action run containing the artifact | [optional] +**name** | Option<**String**> | Name of the artifact | [optional] +**size** | Option<**i64**> | Size of the artifact (compressed) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaUsedAttachment.md b/forgejo-openapi/docs/QuotaUsedAttachment.md new file mode 100644 index 0000000..1ebd2ec --- /dev/null +++ b/forgejo-openapi/docs/QuotaUsedAttachment.md @@ -0,0 +1,14 @@ +# QuotaUsedAttachment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_url** | Option<**String**> | API URL for the attachment | [optional] +**contained_in** | Option<[**models::QuotaUsedAttachmentContainedIn**](QuotaUsedAttachmentContainedIn.md)> | | [optional] +**name** | Option<**String**> | Filename of the attachment | [optional] +**size** | Option<**i64**> | Size of the attachment (in bytes) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaUsedAttachmentContainedIn.md b/forgejo-openapi/docs/QuotaUsedAttachmentContainedIn.md new file mode 100644 index 0000000..52b973c --- /dev/null +++ b/forgejo-openapi/docs/QuotaUsedAttachmentContainedIn.md @@ -0,0 +1,12 @@ +# QuotaUsedAttachmentContainedIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_url** | Option<**String**> | API URL for the object that contains this attachment | [optional] +**html_url** | Option<**String**> | HTML URL for the object that contains this attachment | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaUsedPackage.md b/forgejo-openapi/docs/QuotaUsedPackage.md new file mode 100644 index 0000000..a9c830e --- /dev/null +++ b/forgejo-openapi/docs/QuotaUsedPackage.md @@ -0,0 +1,15 @@ +# QuotaUsedPackage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_url** | Option<**String**> | HTML URL to the package version | [optional] +**name** | Option<**String**> | Name of the package | [optional] +**size** | Option<**i64**> | Size of the package version | [optional] +**r#type** | Option<**String**> | Type of the package | [optional] +**version** | Option<**String**> | Version of the package | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaUsedSize.md b/forgejo-openapi/docs/QuotaUsedSize.md new file mode 100644 index 0000000..f270b02 --- /dev/null +++ b/forgejo-openapi/docs/QuotaUsedSize.md @@ -0,0 +1,13 @@ +# QuotaUsedSize + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets** | Option<[**models::QuotaUsedSizeAssets**](QuotaUsedSizeAssets.md)> | | [optional] +**git** | Option<[**models::QuotaUsedSizeGit**](QuotaUsedSizeGit.md)> | | [optional] +**repos** | Option<[**models::QuotaUsedSizeRepos**](QuotaUsedSizeRepos.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaUsedSizeAssets.md b/forgejo-openapi/docs/QuotaUsedSizeAssets.md new file mode 100644 index 0000000..775755e --- /dev/null +++ b/forgejo-openapi/docs/QuotaUsedSizeAssets.md @@ -0,0 +1,13 @@ +# QuotaUsedSizeAssets + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**artifacts** | Option<**i64**> | Storage size used for the user's artifacts | [optional] +**attachments** | Option<[**models::QuotaUsedSizeAssetsAttachments**](QuotaUsedSizeAssetsAttachments.md)> | | [optional] +**packages** | Option<[**models::QuotaUsedSizeAssetsPackages**](QuotaUsedSizeAssetsPackages.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaUsedSizeAssetsAttachments.md b/forgejo-openapi/docs/QuotaUsedSizeAssetsAttachments.md new file mode 100644 index 0000000..d6f4650 --- /dev/null +++ b/forgejo-openapi/docs/QuotaUsedSizeAssetsAttachments.md @@ -0,0 +1,12 @@ +# QuotaUsedSizeAssetsAttachments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**issues** | Option<**i64**> | Storage size used for the user's issue & comment attachments | [optional] +**releases** | Option<**i64**> | Storage size used for the user's release attachments | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaUsedSizeAssetsPackages.md b/forgejo-openapi/docs/QuotaUsedSizeAssetsPackages.md new file mode 100644 index 0000000..d9c7fe4 --- /dev/null +++ b/forgejo-openapi/docs/QuotaUsedSizeAssetsPackages.md @@ -0,0 +1,11 @@ +# QuotaUsedSizeAssetsPackages + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**all** | Option<**i64**> | Storage suze used for the user's packages | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaUsedSizeGit.md b/forgejo-openapi/docs/QuotaUsedSizeGit.md new file mode 100644 index 0000000..fa5cae6 --- /dev/null +++ b/forgejo-openapi/docs/QuotaUsedSizeGit.md @@ -0,0 +1,11 @@ +# QuotaUsedSizeGit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lfs** | Option<**i64**> | Storage size of the user's Git LFS objects | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/QuotaUsedSizeRepos.md b/forgejo-openapi/docs/QuotaUsedSizeRepos.md new file mode 100644 index 0000000..66df570 --- /dev/null +++ b/forgejo-openapi/docs/QuotaUsedSizeRepos.md @@ -0,0 +1,12 @@ +# QuotaUsedSizeRepos + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**private** | Option<**i64**> | Storage size of the user's private repositories | [optional] +**public** | Option<**i64**> | Storage size of the user's public repositories | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Reaction.md b/forgejo-openapi/docs/Reaction.md new file mode 100644 index 0000000..df4f20a --- /dev/null +++ b/forgejo-openapi/docs/Reaction.md @@ -0,0 +1,13 @@ +# Reaction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | Option<**String**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**user** | Option<[**models::User**](User.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Reference.md b/forgejo-openapi/docs/Reference.md new file mode 100644 index 0000000..7698c9b --- /dev/null +++ b/forgejo-openapi/docs/Reference.md @@ -0,0 +1,13 @@ +# Reference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | Option<[**models::GitObject**](GitObject.md)> | | [optional] +**r#ref** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/RegistrationToken.md b/forgejo-openapi/docs/RegistrationToken.md new file mode 100644 index 0000000..b70b020 --- /dev/null +++ b/forgejo-openapi/docs/RegistrationToken.md @@ -0,0 +1,11 @@ +# RegistrationToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Release.md b/forgejo-openapi/docs/Release.md new file mode 100644 index 0000000..8a34107 --- /dev/null +++ b/forgejo-openapi/docs/Release.md @@ -0,0 +1,28 @@ +# Release + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**archive_download_count** | Option<[**models::TagArchiveDownloadCount**](TagArchiveDownloadCount.md)> | | [optional] +**assets** | Option<[**Vec**](Attachment.md)> | | [optional] +**author** | Option<[**models::User**](User.md)> | | [optional] +**body** | Option<**String**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**draft** | Option<**bool**> | | [optional] +**hide_archive_links** | Option<**bool**> | | [optional] +**html_url** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] +**prerelease** | Option<**bool**> | | [optional] +**published_at** | Option<**String**> | | [optional] +**tag_name** | Option<**String**> | | [optional] +**tarball_url** | Option<**String**> | | [optional] +**target_commitish** | Option<**String**> | | [optional] +**upload_url** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] +**zipball_url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/RenameOrgOption.md b/forgejo-openapi/docs/RenameOrgOption.md new file mode 100644 index 0000000..90eadf9 --- /dev/null +++ b/forgejo-openapi/docs/RenameOrgOption.md @@ -0,0 +1,11 @@ +# RenameOrgOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_name** | **String** | New username for this org. This name cannot be in use yet by any other user. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/RenameUserOption.md b/forgejo-openapi/docs/RenameUserOption.md new file mode 100644 index 0000000..c5df112 --- /dev/null +++ b/forgejo-openapi/docs/RenameUserOption.md @@ -0,0 +1,11 @@ +# RenameUserOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_username** | **String** | New username for this user. This name cannot be in use yet by any other user. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ReplaceFlagsOption.md b/forgejo-openapi/docs/ReplaceFlagsOption.md new file mode 100644 index 0000000..6f5f83f --- /dev/null +++ b/forgejo-openapi/docs/ReplaceFlagsOption.md @@ -0,0 +1,11 @@ +# ReplaceFlagsOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**flags** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/RepoCollaboratorPermission.md b/forgejo-openapi/docs/RepoCollaboratorPermission.md new file mode 100644 index 0000000..d748229 --- /dev/null +++ b/forgejo-openapi/docs/RepoCollaboratorPermission.md @@ -0,0 +1,13 @@ +# RepoCollaboratorPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**permission** | Option<**String**> | | [optional] +**role_name** | Option<**String**> | | [optional] +**user** | Option<[**models::User**](User.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/RepoCommit.md b/forgejo-openapi/docs/RepoCommit.md new file mode 100644 index 0000000..e40fe3d --- /dev/null +++ b/forgejo-openapi/docs/RepoCommit.md @@ -0,0 +1,16 @@ +# RepoCommit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] +**committer** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] +**message** | Option<**String**> | | [optional] +**tree** | Option<[**models::CommitMeta**](CommitMeta.md)> | | [optional] +**url** | Option<**String**> | | [optional] +**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/RepoCreateReleaseAttachmentRequest.md b/forgejo-openapi/docs/RepoCreateReleaseAttachmentRequest.md new file mode 100644 index 0000000..5c331f3 --- /dev/null +++ b/forgejo-openapi/docs/RepoCreateReleaseAttachmentRequest.md @@ -0,0 +1,12 @@ +# RepoCreateReleaseAttachmentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attachment** | Option<**std::path::PathBuf**> | attachment to upload (this parameter is incompatible with `external_url`) | [optional] +**external_url** | Option<**String**> | url to external asset (this parameter is incompatible with `attachment`) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/RepoTopicOptions.md b/forgejo-openapi/docs/RepoTopicOptions.md new file mode 100644 index 0000000..3811737 --- /dev/null +++ b/forgejo-openapi/docs/RepoTopicOptions.md @@ -0,0 +1,11 @@ +# RepoTopicOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topics** | Option<**Vec**> | list of topic names | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/RepoTransfer.md b/forgejo-openapi/docs/RepoTransfer.md new file mode 100644 index 0000000..bc5e8e0 --- /dev/null +++ b/forgejo-openapi/docs/RepoTransfer.md @@ -0,0 +1,13 @@ +# RepoTransfer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**doer** | Option<[**models::User**](User.md)> | | [optional] +**recipient** | Option<[**models::User**](User.md)> | | [optional] +**teams** | Option<[**Vec**](Team.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Repository.md b/forgejo-openapi/docs/Repository.md new file mode 100644 index 0000000..b9f6014 --- /dev/null +++ b/forgejo-openapi/docs/Repository.md @@ -0,0 +1,73 @@ +# Repository + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_fast_forward_only_merge** | Option<**bool**> | | [optional] +**allow_merge_commits** | Option<**bool**> | | [optional] +**allow_rebase** | Option<**bool**> | | [optional] +**allow_rebase_explicit** | Option<**bool**> | | [optional] +**allow_rebase_update** | Option<**bool**> | | [optional] +**allow_squash_merge** | Option<**bool**> | | [optional] +**archived** | Option<**bool**> | | [optional] +**archived_at** | Option<**String**> | | [optional] +**avatar_url** | Option<**String**> | | [optional] +**clone_url** | Option<**String**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**default_allow_maintainer_edit** | Option<**bool**> | | [optional] +**default_branch** | Option<**String**> | | [optional] +**default_delete_branch_after_merge** | Option<**bool**> | | [optional] +**default_merge_style** | Option<**String**> | | [optional] +**default_update_style** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**empty** | Option<**bool**> | | [optional] +**external_tracker** | Option<[**models::ExternalTracker**](ExternalTracker.md)> | | [optional] +**external_wiki** | Option<[**models::ExternalWiki**](ExternalWiki.md)> | | [optional] +**fork** | Option<**bool**> | | [optional] +**forks_count** | Option<**i64**> | | [optional] +**full_name** | Option<**String**> | | [optional] +**globally_editable_wiki** | Option<**bool**> | | [optional] +**has_actions** | Option<**bool**> | | [optional] +**has_issues** | Option<**bool**> | | [optional] +**has_packages** | Option<**bool**> | | [optional] +**has_projects** | Option<**bool**> | | [optional] +**has_pull_requests** | Option<**bool**> | | [optional] +**has_releases** | Option<**bool**> | | [optional] +**has_wiki** | Option<**bool**> | | [optional] +**html_url** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**ignore_whitespace_conflicts** | Option<**bool**> | | [optional] +**internal** | Option<**bool**> | | [optional] +**internal_tracker** | Option<[**models::InternalTracker**](InternalTracker.md)> | | [optional] +**language** | Option<**String**> | | [optional] +**languages_url** | Option<**String**> | | [optional] +**link** | Option<**String**> | | [optional] +**mirror** | Option<**bool**> | | [optional] +**mirror_interval** | Option<**String**> | | [optional] +**mirror_updated** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**object_format_name** | Option<**ObjectFormatName**> | ObjectFormatName of the underlying git repository (enum: sha1, sha256) | [optional] +**open_issues_count** | Option<**i64**> | | [optional] +**open_pr_counter** | Option<**i64**> | | [optional] +**original_url** | Option<**String**> | | [optional] +**owner** | Option<[**models::User**](User.md)> | | [optional] +**parent** | Option<[**models::Repository**](Repository.md)> | | [optional] +**permissions** | Option<[**models::Permission**](Permission.md)> | | [optional] +**private** | Option<**bool**> | | [optional] +**release_counter** | Option<**i64**> | | [optional] +**repo_transfer** | Option<[**models::RepoTransfer**](RepoTransfer.md)> | | [optional] +**size** | Option<**i64**> | | [optional] +**ssh_url** | Option<**String**> | | [optional] +**stars_count** | Option<**i64**> | | [optional] +**template** | Option<**bool**> | | [optional] +**topics** | Option<**Vec**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**url** | Option<**String**> | | [optional] +**watchers_count** | Option<**i64**> | | [optional] +**website** | Option<**String**> | | [optional] +**wiki_branch** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/RepositoryApi.md b/forgejo-openapi/docs/RepositoryApi.md new file mode 100644 index 0000000..1d96824 --- /dev/null +++ b/forgejo-openapi/docs/RepositoryApi.md @@ -0,0 +1,5816 @@ +# \RepositoryApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**accept_repo_transfer**](RepositoryApi.md#accept_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/accept | Accept a repo transfer +[**action_run**](RepositoryApi.md#action_run) | **GET** /repos/{owner}/{repo}/actions/runs/{run_id} | Get an action run +[**create_current_user_repo**](RepositoryApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +[**create_fork**](RepositoryApi.md#create_fork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository +[**create_repo_variable**](RepositoryApi.md#create_repo_variable) | **POST** /repos/{owner}/{repo}/actions/variables/{variablename} | Create a repo-level variable +[**delete_repo_secret**](RepositoryApi.md#delete_repo_secret) | **DELETE** /repos/{owner}/{repo}/actions/secrets/{secretname} | Delete a secret in a repository +[**delete_repo_variable**](RepositoryApi.md#delete_repo_variable) | **DELETE** /repos/{owner}/{repo}/actions/variables/{variablename} | Delete a repo-level variable +[**dispatch_workflow**](RepositoryApi.md#dispatch_workflow) | **POST** /repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches | Dispatches a workflow +[**generate_repo**](RepositoryApi.md#generate_repo) | **POST** /repos/{template_owner}/{template_repo}/generate | Create a repository using a template +[**get_annotated_tag**](RepositoryApi.md#get_annotated_tag) | **GET** /repos/{owner}/{repo}/git/tags/{sha} | Gets the tag object of an annotated tag (not lightweight tags) +[**get_blob**](RepositoryApi.md#get_blob) | **GET** /repos/{owner}/{repo}/git/blobs/{sha} | Gets the blob of a repository. +[**get_blobs**](RepositoryApi.md#get_blobs) | **GET** /repos/{owner}/{repo}/git/blobs | Gets multiple blobs of a repository. +[**get_repo_variable**](RepositoryApi.md#get_repo_variable) | **GET** /repos/{owner}/{repo}/actions/variables/{variablename} | Get a repo-level variable +[**get_repo_variables_list**](RepositoryApi.md#get_repo_variables_list) | **GET** /repos/{owner}/{repo}/actions/variables | Get repo-level variables list +[**get_tree**](RepositoryApi.md#get_tree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. +[**list_action_runs**](RepositoryApi.md#list_action_runs) | **GET** /repos/{owner}/{repo}/actions/runs | List a repository's action runs +[**list_action_tasks**](RepositoryApi.md#list_action_tasks) | **GET** /repos/{owner}/{repo}/actions/tasks | List a repository's action tasks +[**list_forks**](RepositoryApi.md#list_forks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks +[**reject_repo_transfer**](RepositoryApi.md#reject_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/reject | Reject a repo transfer +[**repo_add_collaborator**](RepositoryApi.md#repo_add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add a collaborator to a repository +[**repo_add_flag**](RepositoryApi.md#repo_add_flag) | **PUT** /repos/{owner}/{repo}/flags/{flag} | Add a flag to a repository +[**repo_add_push_mirror**](RepositoryApi.md#repo_add_push_mirror) | **POST** /repos/{owner}/{repo}/push_mirrors | Set up a new push mirror in a repository +[**repo_add_team**](RepositoryApi.md#repo_add_team) | **PUT** /repos/{owner}/{repo}/teams/{team} | Add a team to a repository +[**repo_add_topic**](RepositoryApi.md#repo_add_topic) | **PUT** /repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository +[**repo_apply_diff_patch**](RepositoryApi.md#repo_apply_diff_patch) | **POST** /repos/{owner}/{repo}/diffpatch | Apply diff patch to repository +[**repo_cancel_scheduled_auto_merge**](RepositoryApi.md#repo_cancel_scheduled_auto_merge) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/merge | Cancel the scheduled auto merge for the given pull request +[**repo_change_files**](RepositoryApi.md#repo_change_files) | **POST** /repos/{owner}/{repo}/contents | Modify multiple files in a repository +[**repo_check_collaborator**](RepositoryApi.md#repo_check_collaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository +[**repo_check_flag**](RepositoryApi.md#repo_check_flag) | **GET** /repos/{owner}/{repo}/flags/{flag} | Check if a repository has a given flag +[**repo_check_team**](RepositoryApi.md#repo_check_team) | **GET** /repos/{owner}/{repo}/teams/{team} | Check if a team is assigned to a repository +[**repo_compare_diff**](RepositoryApi.md#repo_compare_diff) | **GET** /repos/{owner}/{repo}/compare/{basehead} | Get commit comparison information +[**repo_convert**](RepositoryApi.md#repo_convert) | **POST** /repos/{owner}/{repo}/convert | Convert a mirror repo to a normal repo. +[**repo_create_branch**](RepositoryApi.md#repo_create_branch) | **POST** /repos/{owner}/{repo}/branches | Create a branch +[**repo_create_branch_protection**](RepositoryApi.md#repo_create_branch_protection) | **POST** /repos/{owner}/{repo}/branch_protections | Create a branch protections for a repository +[**repo_create_file**](RepositoryApi.md#repo_create_file) | **POST** /repos/{owner}/{repo}/contents/{filepath} | Create a file in a repository +[**repo_create_hook**](RepositoryApi.md#repo_create_hook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook +[**repo_create_key**](RepositoryApi.md#repo_create_key) | **POST** /repos/{owner}/{repo}/keys | Add a key to a repository +[**repo_create_pull_request**](RepositoryApi.md#repo_create_pull_request) | **POST** /repos/{owner}/{repo}/pulls | Create a pull request +[**repo_create_pull_review**](RepositoryApi.md#repo_create_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews | Create a review to an pull request +[**repo_create_pull_review_comment**](RepositoryApi.md#repo_create_pull_review_comment) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Add a new comment to a pull request review +[**repo_create_pull_review_requests**](RepositoryApi.md#repo_create_pull_review_requests) | **POST** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | Create review requests for a pull request +[**repo_create_release**](RepositoryApi.md#repo_create_release) | **POST** /repos/{owner}/{repo}/releases | Create a release +[**repo_create_release_attachment**](RepositoryApi.md#repo_create_release_attachment) | **POST** /repos/{owner}/{repo}/releases/{id}/assets | Create a release attachment +[**repo_create_status**](RepositoryApi.md#repo_create_status) | **POST** /repos/{owner}/{repo}/statuses/{sha} | Create a commit status +[**repo_create_tag**](RepositoryApi.md#repo_create_tag) | **POST** /repos/{owner}/{repo}/tags | Create a new git tag in a repository +[**repo_create_tag_protection**](RepositoryApi.md#repo_create_tag_protection) | **POST** /repos/{owner}/{repo}/tag_protections | Create a tag protections for a repository +[**repo_create_wiki_page**](RepositoryApi.md#repo_create_wiki_page) | **POST** /repos/{owner}/{repo}/wiki/new | Create a wiki page +[**repo_delete**](RepositoryApi.md#repo_delete) | **DELETE** /repos/{owner}/{repo} | Delete a repository +[**repo_delete_all_flags**](RepositoryApi.md#repo_delete_all_flags) | **DELETE** /repos/{owner}/{repo}/flags | Remove all flags from a repository +[**repo_delete_avatar**](RepositoryApi.md#repo_delete_avatar) | **DELETE** /repos/{owner}/{repo}/avatar | Delete a repository's avatar +[**repo_delete_branch**](RepositoryApi.md#repo_delete_branch) | **DELETE** /repos/{owner}/{repo}/branches/{branch} | Delete a specific branch from a repository +[**repo_delete_branch_protection**](RepositoryApi.md#repo_delete_branch_protection) | **DELETE** /repos/{owner}/{repo}/branch_protections/{name} | Delete a specific branch protection for the repository +[**repo_delete_collaborator**](RepositoryApi.md#repo_delete_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository +[**repo_delete_file**](RepositoryApi.md#repo_delete_file) | **DELETE** /repos/{owner}/{repo}/contents/{filepath} | Delete a file in a repository +[**repo_delete_flag**](RepositoryApi.md#repo_delete_flag) | **DELETE** /repos/{owner}/{repo}/flags/{flag} | Remove a flag from a repository +[**repo_delete_git_hook**](RepositoryApi.md#repo_delete_git_hook) | **DELETE** /repos/{owner}/{repo}/hooks/git/{id} | Delete a Git hook in a repository +[**repo_delete_hook**](RepositoryApi.md#repo_delete_hook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook in a repository +[**repo_delete_key**](RepositoryApi.md#repo_delete_key) | **DELETE** /repos/{owner}/{repo}/keys/{id} | Delete a key from a repository +[**repo_delete_pull_review**](RepositoryApi.md#repo_delete_pull_review) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Delete a specific review from a pull request +[**repo_delete_pull_review_comment**](RepositoryApi.md#repo_delete_pull_review_comment) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment} | Delete a pull review comment +[**repo_delete_pull_review_requests**](RepositoryApi.md#repo_delete_pull_review_requests) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | Cancel review requests for a pull request +[**repo_delete_push_mirror**](RepositoryApi.md#repo_delete_push_mirror) | **DELETE** /repos/{owner}/{repo}/push_mirrors/{name} | Remove a push mirror from a repository by remoteName +[**repo_delete_release**](RepositoryApi.md#repo_delete_release) | **DELETE** /repos/{owner}/{repo}/releases/{id} | Delete a release +[**repo_delete_release_attachment**](RepositoryApi.md#repo_delete_release_attachment) | **DELETE** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment +[**repo_delete_release_by_tag**](RepositoryApi.md#repo_delete_release_by_tag) | **DELETE** /repos/{owner}/{repo}/releases/tags/{tag} | Delete a release by tag name +[**repo_delete_tag**](RepositoryApi.md#repo_delete_tag) | **DELETE** /repos/{owner}/{repo}/tags/{tag} | Delete a repository's tag by name +[**repo_delete_tag_protection**](RepositoryApi.md#repo_delete_tag_protection) | **DELETE** /repos/{owner}/{repo}/tag_protections/{id} | Delete a specific tag protection for the repository +[**repo_delete_team**](RepositoryApi.md#repo_delete_team) | **DELETE** /repos/{owner}/{repo}/teams/{team} | Delete a team from a repository +[**repo_delete_topic**](RepositoryApi.md#repo_delete_topic) | **DELETE** /repos/{owner}/{repo}/topics/{topic} | Delete a topic from a repository +[**repo_delete_wiki_page**](RepositoryApi.md#repo_delete_wiki_page) | **DELETE** /repos/{owner}/{repo}/wiki/page/{pageName} | Delete a wiki page +[**repo_dismiss_pull_review**](RepositoryApi.md#repo_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals | Dismiss a review for a pull request +[**repo_download_commit_diff_or_patch**](RepositoryApi.md#repo_download_commit_diff_or_patch) | **GET** /repos/{owner}/{repo}/git/commits/{sha}.{diffType} | Get a commit's diff or patch +[**repo_download_pull_diff_or_patch**](RepositoryApi.md#repo_download_pull_diff_or_patch) | **GET** /repos/{owner}/{repo}/pulls/{index}.{diffType} | Get a pull request diff or patch +[**repo_edit**](RepositoryApi.md#repo_edit) | **PATCH** /repos/{owner}/{repo} | Edit a repository's properties. Only fields that are set will be changed. +[**repo_edit_branch_protection**](RepositoryApi.md#repo_edit_branch_protection) | **PATCH** /repos/{owner}/{repo}/branch_protections/{name} | Edit a branch protections for a repository. Only fields that are set will be changed +[**repo_edit_git_hook**](RepositoryApi.md#repo_edit_git_hook) | **PATCH** /repos/{owner}/{repo}/hooks/git/{id} | Edit a Git hook in a repository +[**repo_edit_hook**](RepositoryApi.md#repo_edit_hook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook in a repository +[**repo_edit_pull_request**](RepositoryApi.md#repo_edit_pull_request) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. +[**repo_edit_release**](RepositoryApi.md#repo_edit_release) | **PATCH** /repos/{owner}/{repo}/releases/{id} | Update a release +[**repo_edit_release_attachment**](RepositoryApi.md#repo_edit_release_attachment) | **PATCH** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment +[**repo_edit_tag_protection**](RepositoryApi.md#repo_edit_tag_protection) | **PATCH** /repos/{owner}/{repo}/tag_protections/{id} | Edit a tag protections for a repository. Only fields that are set will be changed +[**repo_edit_wiki_page**](RepositoryApi.md#repo_edit_wiki_page) | **PATCH** /repos/{owner}/{repo}/wiki/page/{pageName} | Edit a wiki page +[**repo_get**](RepositoryApi.md#repo_get) | **GET** /repos/{owner}/{repo} | Get a repository +[**repo_get_all_commits**](RepositoryApi.md#repo_get_all_commits) | **GET** /repos/{owner}/{repo}/commits | Get a list of all commits from a repository +[**repo_get_archive**](RepositoryApi.md#repo_get_archive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository +[**repo_get_assignees**](RepositoryApi.md#repo_get_assignees) | **GET** /repos/{owner}/{repo}/assignees | Return all users that have write access and can be assigned to issues +[**repo_get_branch**](RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository, including its effective branch protection +[**repo_get_branch_protection**](RepositoryApi.md#repo_get_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections/{name} | Get a specific branch protection for the repository +[**repo_get_by_id**](RepositoryApi.md#repo_get_by_id) | **GET** /repositories/{id} | Get a repository by id +[**repo_get_combined_status_by_ref**](RepositoryApi.md#repo_get_combined_status_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/status | Get a commit's combined status, by branch/tag/commit reference +[**repo_get_commit_pull_request**](RepositoryApi.md#repo_get_commit_pull_request) | **GET** /repos/{owner}/{repo}/commits/{sha}/pull | Get the pull request of the commit +[**repo_get_contents**](RepositoryApi.md#repo_get_contents) | **GET** /repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir +[**repo_get_contents_list**](RepositoryApi.md#repo_get_contents_list) | **GET** /repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir +[**repo_get_editor_config**](RepositoryApi.md#repo_get_editor_config) | **GET** /repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository +[**repo_get_git_hook**](RepositoryApi.md#repo_get_git_hook) | **GET** /repos/{owner}/{repo}/hooks/git/{id} | Get a Git hook +[**repo_get_hook**](RepositoryApi.md#repo_get_hook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook +[**repo_get_issue_config**](RepositoryApi.md#repo_get_issue_config) | **GET** /repos/{owner}/{repo}/issue_config | Returns the issue config for a repo +[**repo_get_issue_templates**](RepositoryApi.md#repo_get_issue_templates) | **GET** /repos/{owner}/{repo}/issue_templates | Get available issue templates for a repository +[**repo_get_key**](RepositoryApi.md#repo_get_key) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id +[**repo_get_languages**](RepositoryApi.md#repo_get_languages) | **GET** /repos/{owner}/{repo}/languages | Get languages and number of bytes of code written +[**repo_get_latest_release**](RepositoryApi.md#repo_get_latest_release) | **GET** /repos/{owner}/{repo}/releases/latest | Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at +[**repo_get_note**](RepositoryApi.md#repo_get_note) | **GET** /repos/{owner}/{repo}/git/notes/{sha} | Get a note corresponding to a single commit from a repository +[**repo_get_pull_request**](RepositoryApi.md#repo_get_pull_request) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request +[**repo_get_pull_request_by_base_head**](RepositoryApi.md#repo_get_pull_request_by_base_head) | **GET** /repos/{owner}/{repo}/pulls/{base}/{head} | Get a pull request by base and head +[**repo_get_pull_request_commits**](RepositoryApi.md#repo_get_pull_request_commits) | **GET** /repos/{owner}/{repo}/pulls/{index}/commits | Get commits for a pull request +[**repo_get_pull_request_files**](RepositoryApi.md#repo_get_pull_request_files) | **GET** /repos/{owner}/{repo}/pulls/{index}/files | Get changed files for a pull request +[**repo_get_pull_review**](RepositoryApi.md#repo_get_pull_review) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Get a specific review for a pull request +[**repo_get_pull_review_comment**](RepositoryApi.md#repo_get_pull_review_comment) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment} | Get a pull review comment +[**repo_get_pull_review_comments**](RepositoryApi.md#repo_get_pull_review_comments) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Get a specific review for a pull request +[**repo_get_push_mirror_by_remote_name**](RepositoryApi.md#repo_get_push_mirror_by_remote_name) | **GET** /repos/{owner}/{repo}/push_mirrors/{name} | Get push mirror of the repository by remoteName +[**repo_get_raw_file**](RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository +[**repo_get_raw_file_or_lfs**](RepositoryApi.md#repo_get_raw_file_or_lfs) | **GET** /repos/{owner}/{repo}/media/{filepath} | Get a file or it's LFS object from a repository +[**repo_get_release**](RepositoryApi.md#repo_get_release) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release +[**repo_get_release_attachment**](RepositoryApi.md#repo_get_release_attachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment +[**repo_get_release_by_tag**](RepositoryApi.md#repo_get_release_by_tag) | **GET** /repos/{owner}/{repo}/releases/tags/{tag} | Get a release by tag name +[**repo_get_repo_permissions**](RepositoryApi.md#repo_get_repo_permissions) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator}/permission | Get repository permissions for a user +[**repo_get_reviewers**](RepositoryApi.md#repo_get_reviewers) | **GET** /repos/{owner}/{repo}/reviewers | Return all users that can be requested to review in this repo +[**repo_get_runner_registration_token**](RepositoryApi.md#repo_get_runner_registration_token) | **GET** /repos/{owner}/{repo}/actions/runners/registration-token | Get a repository's actions runner registration token +[**repo_get_single_commit**](RepositoryApi.md#repo_get_single_commit) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository +[**repo_get_tag**](RepositoryApi.md#repo_get_tag) | **GET** /repos/{owner}/{repo}/tags/{tag} | Get the tag of a repository by tag name +[**repo_get_tag_protection**](RepositoryApi.md#repo_get_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections/{id} | Get a specific tag protection for the repository +[**repo_get_wiki_page**](RepositoryApi.md#repo_get_wiki_page) | **GET** /repos/{owner}/{repo}/wiki/page/{pageName} | Get a wiki page +[**repo_get_wiki_page_revisions**](RepositoryApi.md#repo_get_wiki_page_revisions) | **GET** /repos/{owner}/{repo}/wiki/revisions/{pageName} | Get revisions of a wiki page +[**repo_get_wiki_pages**](RepositoryApi.md#repo_get_wiki_pages) | **GET** /repos/{owner}/{repo}/wiki/pages | Get all wiki pages +[**repo_list_actions_secrets**](RepositoryApi.md#repo_list_actions_secrets) | **GET** /repos/{owner}/{repo}/actions/secrets | List an repo's actions secrets +[**repo_list_activity_feeds**](RepositoryApi.md#repo_list_activity_feeds) | **GET** /repos/{owner}/{repo}/activities/feeds | List a repository's activity feeds +[**repo_list_all_git_refs**](RepositoryApi.md#repo_list_all_git_refs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs +[**repo_list_branch_protection**](RepositoryApi.md#repo_list_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections | List branch protections for a repository +[**repo_list_branches**](RepositoryApi.md#repo_list_branches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches +[**repo_list_collaborators**](RepositoryApi.md#repo_list_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators +[**repo_list_flags**](RepositoryApi.md#repo_list_flags) | **GET** /repos/{owner}/{repo}/flags | List a repository's flags +[**repo_list_git_hooks**](RepositoryApi.md#repo_list_git_hooks) | **GET** /repos/{owner}/{repo}/hooks/git | List the Git hooks in a repository +[**repo_list_git_refs**](RepositoryApi.md#repo_list_git_refs) | **GET** /repos/{owner}/{repo}/git/refs/{ref} | Get specified ref or filtered repository's refs +[**repo_list_hooks**](RepositoryApi.md#repo_list_hooks) | **GET** /repos/{owner}/{repo}/hooks | List the hooks in a repository +[**repo_list_keys**](RepositoryApi.md#repo_list_keys) | **GET** /repos/{owner}/{repo}/keys | List a repository's keys +[**repo_list_pinned_issues**](RepositoryApi.md#repo_list_pinned_issues) | **GET** /repos/{owner}/{repo}/issues/pinned | List a repo's pinned issues +[**repo_list_pinned_pull_requests**](RepositoryApi.md#repo_list_pinned_pull_requests) | **GET** /repos/{owner}/{repo}/pulls/pinned | List a repo's pinned pull requests +[**repo_list_pull_requests**](RepositoryApi.md#repo_list_pull_requests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results. +[**repo_list_pull_reviews**](RepositoryApi.md#repo_list_pull_reviews) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews | List all reviews for a pull request +[**repo_list_push_mirrors**](RepositoryApi.md#repo_list_push_mirrors) | **GET** /repos/{owner}/{repo}/push_mirrors | Get all push mirrors of the repository +[**repo_list_release_attachments**](RepositoryApi.md#repo_list_release_attachments) | **GET** /repos/{owner}/{repo}/releases/{id}/assets | List release's attachments +[**repo_list_releases**](RepositoryApi.md#repo_list_releases) | **GET** /repos/{owner}/{repo}/releases | List a repo's releases +[**repo_list_stargazers**](RepositoryApi.md#repo_list_stargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers +[**repo_list_statuses**](RepositoryApi.md#repo_list_statuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses +[**repo_list_statuses_by_ref**](RepositoryApi.md#repo_list_statuses_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's statuses, by branch/tag/commit reference +[**repo_list_subscribers**](RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers +[**repo_list_tag_protection**](RepositoryApi.md#repo_list_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections | List tag protections for a repository +[**repo_list_tags**](RepositoryApi.md#repo_list_tags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags +[**repo_list_teams**](RepositoryApi.md#repo_list_teams) | **GET** /repos/{owner}/{repo}/teams | List a repository's teams +[**repo_list_topics**](RepositoryApi.md#repo_list_topics) | **GET** /repos/{owner}/{repo}/topics | Get list of topics that a repository has +[**repo_merge_pull_request**](RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request +[**repo_migrate**](RepositoryApi.md#repo_migrate) | **POST** /repos/migrate | Migrate a remote git repository +[**repo_mirror_sync**](RepositoryApi.md#repo_mirror_sync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository +[**repo_new_pin_allowed**](RepositoryApi.md#repo_new_pin_allowed) | **GET** /repos/{owner}/{repo}/new_pin_allowed | Returns if new Issue Pins are allowed +[**repo_pull_request_is_merged**](RepositoryApi.md#repo_pull_request_is_merged) | **GET** /repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged +[**repo_push_mirror_sync**](RepositoryApi.md#repo_push_mirror_sync) | **POST** /repos/{owner}/{repo}/push_mirrors-sync | Sync all push mirrored repository +[**repo_remove_note**](RepositoryApi.md#repo_remove_note) | **DELETE** /repos/{owner}/{repo}/git/notes/{sha} | Removes a note corresponding to a single commit from a repository +[**repo_replace_all_flags**](RepositoryApi.md#repo_replace_all_flags) | **PUT** /repos/{owner}/{repo}/flags | Replace all flags of a repository +[**repo_search**](RepositoryApi.md#repo_search) | **GET** /repos/search | Search for repositories +[**repo_search_run_jobs**](RepositoryApi.md#repo_search_run_jobs) | **GET** /repos/{owner}/{repo}/actions/runners/jobs | Search for repository's action jobs according filter conditions +[**repo_set_note**](RepositoryApi.md#repo_set_note) | **POST** /repos/{owner}/{repo}/git/notes/{sha} | Set a note corresponding to a single commit from a repository +[**repo_signing_key**](RepositoryApi.md#repo_signing_key) | **GET** /repos/{owner}/{repo}/signing-key.gpg | Get signing-key.gpg for given repository +[**repo_submit_pull_review**](RepositoryApi.md#repo_submit_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Submit a pending review to an pull request +[**repo_sync_fork_branch**](RepositoryApi.md#repo_sync_fork_branch) | **POST** /repos/{owner}/{repo}/sync_fork/{branch} | Syncs a fork branch with the base branch +[**repo_sync_fork_branch_info**](RepositoryApi.md#repo_sync_fork_branch_info) | **GET** /repos/{owner}/{repo}/sync_fork/{branch} | Gets information about syncing a fork branch with the base branch +[**repo_sync_fork_default**](RepositoryApi.md#repo_sync_fork_default) | **POST** /repos/{owner}/{repo}/sync_fork | Syncs the default branch of a fork with the base branch +[**repo_sync_fork_default_info**](RepositoryApi.md#repo_sync_fork_default_info) | **GET** /repos/{owner}/{repo}/sync_fork | Gets information about syncing the fork default branch with the base branch +[**repo_test_hook**](RepositoryApi.md#repo_test_hook) | **POST** /repos/{owner}/{repo}/hooks/{id}/tests | Test a push webhook +[**repo_tracked_times**](RepositoryApi.md#repo_tracked_times) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times +[**repo_transfer**](RepositoryApi.md#repo_transfer) | **POST** /repos/{owner}/{repo}/transfer | Transfer a repo ownership +[**repo_un_dismiss_pull_review**](RepositoryApi.md#repo_un_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals | Cancel to dismiss a review for a pull request +[**repo_update_avatar**](RepositoryApi.md#repo_update_avatar) | **POST** /repos/{owner}/{repo}/avatar | Update a repository's avatar +[**repo_update_branch**](RepositoryApi.md#repo_update_branch) | **PATCH** /repos/{owner}/{repo}/branches/{branch} | Update a branch +[**repo_update_file**](RepositoryApi.md#repo_update_file) | **PUT** /repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository +[**repo_update_pull_request**](RepositoryApi.md#repo_update_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/update | Merge PR's baseBranch into headBranch +[**repo_update_topics**](RepositoryApi.md#repo_update_topics) | **PUT** /repos/{owner}/{repo}/topics | Replace list of topics for a repository +[**repo_validate_issue_config**](RepositoryApi.md#repo_validate_issue_config) | **GET** /repos/{owner}/{repo}/issue_config/validate | Returns the validation information for a issue config +[**topic_search**](RepositoryApi.md#topic_search) | **GET** /topics/search | Search for topics by keyword +[**update_repo_secret**](RepositoryApi.md#update_repo_secret) | **PUT** /repos/{owner}/{repo}/actions/secrets/{secretname} | Create or Update a secret value in a repository +[**update_repo_variable**](RepositoryApi.md#update_repo_variable) | **PUT** /repos/{owner}/{repo}/actions/variables/{variablename} | Update a repo-level variable +[**user_current_check_subscription**](RepositoryApi.md#user_current_check_subscription) | **GET** /repos/{owner}/{repo}/subscription | Check if the current user is watching a repo +[**user_current_delete_subscription**](RepositoryApi.md#user_current_delete_subscription) | **DELETE** /repos/{owner}/{repo}/subscription | Unwatch a repo +[**user_current_put_subscription**](RepositoryApi.md#user_current_put_subscription) | **PUT** /repos/{owner}/{repo}/subscription | Watch a repo +[**user_tracked_times**](RepositoryApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo + + + +## accept_repo_transfer + +> models::Repository accept_repo_transfer(owner, repo) +Accept a repo transfer + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo to transfer | [required] | +**repo** | **String** | name of the repo to transfer | [required] | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## action_run + +> models::ActionRun action_run(owner, repo, run_id) +Get an action run + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**run_id** | **i64** | id of the action run | [required] | + +### Return type + +[**models::ActionRun**](ActionRun.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_current_user_repo + +> models::Repository create_current_user_repo(body) +Create a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**CreateRepoOption**](CreateRepoOption.md)> | | | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_fork + +> models::Repository create_fork(owner, repo, body) +Fork a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo to fork | [required] | +**repo** | **String** | name of the repo to fork | [required] | +**body** | Option<[**CreateForkOption**](CreateForkOption.md)> | | | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_repo_variable + +> create_repo_variable(owner, repo, variablename, body) +Create a repo-level variable + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | name of the owner | [required] | +**repo** | **String** | name of the repository | [required] | +**variablename** | **String** | name of the variable | [required] | +**body** | Option<[**CreateVariableOption**](CreateVariableOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_repo_secret + +> delete_repo_secret(owner, repo, secretname) +Delete a secret in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repository | [required] | +**repo** | **String** | name of the repository | [required] | +**secretname** | **String** | name of the secret | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_repo_variable + +> delete_repo_variable(owner, repo, variablename) +Delete a repo-level variable + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | name of the owner | [required] | +**repo** | **String** | name of the repository | [required] | +**variablename** | **String** | name of the variable | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## dispatch_workflow + +> models::DispatchWorkflowRun dispatch_workflow(owner, repo, workflowfilename, body) +Dispatches a workflow + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**workflowfilename** | **String** | name of the workflow | [required] | +**body** | Option<[**DispatchWorkflowOption**](DispatchWorkflowOption.md)> | | | + +### Return type + +[**models::DispatchWorkflowRun**](DispatchWorkflowRun.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## generate_repo + +> models::Repository generate_repo(template_owner, template_repo, body) +Create a repository using a template + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**template_owner** | **String** | name of the template repository owner | [required] | +**template_repo** | **String** | name of the template repository | [required] | +**body** | Option<[**GenerateRepoOption**](GenerateRepoOption.md)> | | | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_annotated_tag + +> models::AnnotatedTag get_annotated_tag(owner, repo, sha) +Gets the tag object of an annotated tag (not lightweight tags) + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | **String** | sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. | [required] | + +### Return type + +[**models::AnnotatedTag**](AnnotatedTag.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_blob + +> models::GitBlob get_blob(owner, repo, sha) +Gets the blob of a repository. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | **String** | sha of the blob to retrieve | [required] | + +### Return type + +[**models::GitBlob**](GitBlob.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_blobs + +> Vec get_blobs(owner, repo, shas) +Gets multiple blobs of a repository. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**shas** | **String** | a comma separated list of blob-sha (mind the overall URL-length limit of ~2,083 chars) | [required] | + +### Return type + +[**Vec**](GitBlob.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_repo_variable + +> models::ActionVariable get_repo_variable(owner, repo, variablename) +Get a repo-level variable + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | name of the owner | [required] | +**repo** | **String** | name of the repository | [required] | +**variablename** | **String** | name of the variable | [required] | + +### Return type + +[**models::ActionVariable**](ActionVariable.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_repo_variables_list + +> Vec get_repo_variables_list(owner, repo, page, limit) +Get repo-level variables list + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | name of the owner | [required] | +**repo** | **String** | name of the repository | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](ActionVariable.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_tree + +> models::GitTreeResponse get_tree(owner, repo, sha, recursive, page, per_page) +Gets the tree of a repository. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | **String** | sha of the commit | [required] | +**recursive** | Option<**bool**> | show all directories and files | | +**page** | Option<**i32**> | 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 | | +**per_page** | Option<**i32**> | number of items per page | | + +### Return type + +[**models::GitTreeResponse**](GitTreeResponse.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_action_runs + +> models::ListActionRunResponse list_action_runs(owner, repo, page, limit, event, status, run_number, head_sha) +List a repository's action runs + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results, default maximum page size is 50 | | +**event** | Option<[**Vec**](String.md)> | Returns workflow run triggered by the specified events. For example, `push`, `pull_request` or `workflow_dispatch`. | | +**status** | Option<[**Vec**](String.md)> | Returns workflow runs with the check run status or conclusion that is specified. For example, a conclusion can be success or a status can be in_progress. Only Forgejo Actions can set a status of waiting, pending, or requested. | | +**run_number** | Option<**i64**> | Returns the workflow run associated with the run number. | | +**head_sha** | Option<**String**> | Only returns workflow runs that are associated with the specified head_sha. | | + +### Return type + +[**models::ListActionRunResponse**](ListActionRunResponse.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_action_tasks + +> models::ActionTaskResponse list_action_tasks(owner, repo, page, limit) +List a repository's action tasks + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results, default maximum page size is 50 | | + +### Return type + +[**models::ActionTaskResponse**](ActionTaskResponse.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## list_forks + +> Vec list_forks(owner, repo, page, limit) +List a repository's forks + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## reject_repo_transfer + +> models::Repository reject_repo_transfer(owner, repo) +Reject a repo transfer + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo to transfer | [required] | +**repo** | **String** | name of the repo to transfer | [required] | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_add_collaborator + +> repo_add_collaborator(owner, repo, collaborator, body) +Add a collaborator to a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**collaborator** | **String** | username of the collaborator to add | [required] | +**body** | Option<[**AddCollaboratorOption**](AddCollaboratorOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_add_flag + +> repo_add_flag(owner, repo, flag) +Add a flag to a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**flag** | **String** | name of the flag | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_add_push_mirror + +> models::PushMirror repo_add_push_mirror(owner, repo, body) +Set up a new push mirror in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreatePushMirrorOption**](CreatePushMirrorOption.md)> | | | + +### Return type + +[**models::PushMirror**](PushMirror.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_add_team + +> repo_add_team(owner, repo, team) +Add a team to a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**team** | **String** | team name | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_add_topic + +> repo_add_topic(owner, repo, topic) +Add a topic to a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**topic** | **String** | name of the topic to add | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_apply_diff_patch + +> models::FileResponse repo_apply_diff_patch(owner, repo, body) +Apply diff patch to repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | [**UpdateFileOptions**](UpdateFileOptions.md) | | [required] | + +### Return type + +[**models::FileResponse**](FileResponse.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_cancel_scheduled_auto_merge + +> repo_cancel_scheduled_auto_merge(owner, repo, index) +Cancel the scheduled auto merge for the given pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request to merge | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_change_files + +> models::FilesResponse repo_change_files(owner, repo, body) +Modify multiple files in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | [**ChangeFilesOptions**](ChangeFilesOptions.md) | | [required] | + +### Return type + +[**models::FilesResponse**](FilesResponse.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_check_collaborator + +> repo_check_collaborator(owner, repo, collaborator) +Check if a user is a collaborator of a repository + +If the user is a collaborator, return 204. If the user is not a collaborator, return 404. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**collaborator** | **String** | username of the collaborator | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_check_flag + +> repo_check_flag(owner, repo, flag) +Check if a repository has a given flag + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**flag** | **String** | name of the flag | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_check_team + +> models::Team repo_check_team(owner, repo, team) +Check if a team is assigned to a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**team** | **String** | team name | [required] | + +### Return type + +[**models::Team**](Team.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_compare_diff + +> models::Compare repo_compare_diff(owner, repo, basehead) +Get commit comparison information + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**basehead** | **String** | compare two branches or commits | [required] | + +### Return type + +[**models::Compare**](Compare.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_convert + +> models::Repository repo_convert(owner, repo) +Convert a mirror repo to a normal repo. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo to convert | [required] | +**repo** | **String** | name of the repo to convert | [required] | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_branch + +> models::Branch repo_create_branch(owner, repo, body) +Create a branch + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreateBranchRepoOption**](CreateBranchRepoOption.md)> | | | + +### Return type + +[**models::Branch**](Branch.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_branch_protection + +> models::BranchProtection repo_create_branch_protection(owner, repo, body) +Create a branch protections for a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreateBranchProtectionOption**](CreateBranchProtectionOption.md)> | | | + +### Return type + +[**models::BranchProtection**](BranchProtection.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_file + +> models::FileResponse repo_create_file(owner, repo, filepath, body) +Create a file in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**filepath** | **String** | path of the file to create | [required] | +**body** | [**CreateFileOptions**](CreateFileOptions.md) | | [required] | + +### Return type + +[**models::FileResponse**](FileResponse.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_hook + +> models::Hook repo_create_hook(owner, repo, body) +Create a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreateHookOption**](CreateHookOption.md)> | | | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_key + +> models::DeployKey repo_create_key(owner, repo, body) +Add a key to a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreateKeyOption**](CreateKeyOption.md)> | | | + +### Return type + +[**models::DeployKey**](DeployKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_pull_request + +> models::PullRequest repo_create_pull_request(owner, repo, body) +Create a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreatePullRequestOption**](CreatePullRequestOption.md)> | | | + +### Return type + +[**models::PullRequest**](PullRequest.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_pull_review + +> models::PullReview repo_create_pull_review(owner, repo, index, body) +Create a review to an pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**body** | [**CreatePullReviewOptions**](CreatePullReviewOptions.md) | | [required] | + +### Return type + +[**models::PullReview**](PullReview.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_pull_review_comment + +> models::PullReviewComment repo_create_pull_review_comment(owner, repo, index, id, body) +Add a new comment to a pull request review + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**id** | **i64** | id of the review | [required] | +**body** | **models::CreatePullReviewComment** | | [required] | + +### Return type + +[**models::PullReviewComment**](PullReviewComment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_pull_review_requests + +> Vec repo_create_pull_review_requests(owner, repo, index, body) +Create review requests for a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**body** | [**PullReviewRequestOptions**](PullReviewRequestOptions.md) | | [required] | + +### Return type + +[**Vec**](PullReview.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_release + +> models::Release repo_create_release(owner, repo, body) +Create a release + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreateReleaseOption**](CreateReleaseOption.md)> | | | + +### Return type + +[**models::Release**](Release.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_release_attachment + +> models::Attachment repo_create_release_attachment(owner, repo, id, name, attachment, external_url) +Create a release attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the release | [required] | +**name** | Option<**String**> | name of the attachment | | +**attachment** | Option<**std::path::PathBuf**> | attachment to upload (this parameter is incompatible with `external_url`) | | +**external_url** | Option<**String**> | url to external asset (this parameter is incompatible with `attachment`) | | + +### Return type + +[**models::Attachment**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: multipart/form-data, application/octet-stream +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_status + +> models::CommitStatus repo_create_status(owner, repo, sha, body) +Create a commit status + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | **String** | sha of the commit | [required] | +**body** | Option<[**CreateStatusOption**](CreateStatusOption.md)> | | | + +### Return type + +[**models::CommitStatus**](CommitStatus.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_tag + +> models::Tag repo_create_tag(owner, repo, body) +Create a new git tag in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreateTagOption**](CreateTagOption.md)> | | | + +### Return type + +[**models::Tag**](Tag.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_tag_protection + +> models::TagProtection repo_create_tag_protection(owner, repo, body) +Create a tag protections for a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreateTagProtectionOption**](CreateTagProtectionOption.md)> | | | + +### Return type + +[**models::TagProtection**](TagProtection.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_create_wiki_page + +> models::WikiPage repo_create_wiki_page(owner, repo, body) +Create a wiki page + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**CreateWikiPageOptions**](CreateWikiPageOptions.md)> | | | + +### Return type + +[**models::WikiPage**](WikiPage.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete + +> repo_delete(owner, repo) +Delete a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo to delete | [required] | +**repo** | **String** | name of the repo to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_all_flags + +> repo_delete_all_flags(owner, repo) +Remove all flags from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_avatar + +> repo_delete_avatar(owner, repo) +Delete a repository's avatar + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_branch + +> repo_delete_branch(owner, repo, branch) +Delete a specific branch from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**branch** | **String** | branch to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_branch_protection + +> repo_delete_branch_protection(owner, repo, name) +Delete a specific branch protection for the repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**name** | **String** | name of protected branch | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_collaborator + +> repo_delete_collaborator(owner, repo, collaborator) +Delete a collaborator from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**collaborator** | **String** | username of the collaborator to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_file + +> models::FileDeleteResponse repo_delete_file(owner, repo, filepath, body) +Delete a file in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**filepath** | **String** | path of the file to delete | [required] | +**body** | [**DeleteFileOptions**](DeleteFileOptions.md) | | [required] | + +### Return type + +[**models::FileDeleteResponse**](FileDeleteResponse.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_flag + +> repo_delete_flag(owner, repo, flag) +Remove a flag from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**flag** | **String** | name of the flag | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_git_hook + +> repo_delete_git_hook(owner, repo, id) +Delete a Git hook in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **String** | id of the hook to get | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_hook + +> repo_delete_hook(owner, repo, id) +Delete a hook in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the hook to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_key + +> repo_delete_key(owner, repo, id) +Delete a key from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the key to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_pull_review + +> repo_delete_pull_review(owner, repo, index, id) +Delete a specific review from a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**id** | **i64** | id of the review | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_pull_review_comment + +> repo_delete_pull_review_comment(owner, repo, index, id, comment) +Delete a pull review comment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**id** | **i64** | id of the review | [required] | +**comment** | **i64** | id of the comment | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_pull_review_requests + +> repo_delete_pull_review_requests(owner, repo, index, body) +Cancel review requests for a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**body** | [**PullReviewRequestOptions**](PullReviewRequestOptions.md) | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_push_mirror + +> repo_delete_push_mirror(owner, repo, name) +Remove a push mirror from a repository by remoteName + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**name** | **String** | remote name of the pushMirror | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_release + +> repo_delete_release(owner, repo, id) +Delete a release + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the release to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_release_attachment + +> repo_delete_release_attachment(owner, repo, id, attachment_id) +Delete a release attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the release | [required] | +**attachment_id** | **i64** | id of the attachment to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_release_by_tag + +> repo_delete_release_by_tag(owner, repo, tag) +Delete a release by tag name + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**tag** | **String** | tag name of the release to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_tag + +> repo_delete_tag(owner, repo, tag) +Delete a repository's tag by name + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**tag** | **String** | name of tag to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_tag_protection + +> repo_delete_tag_protection(owner, repo, id) +Delete a specific tag protection for the repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of protected tag | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_team + +> repo_delete_team(owner, repo, team) +Delete a team from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**team** | **String** | team name | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_topic + +> repo_delete_topic(owner, repo, topic) +Delete a topic from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**topic** | **String** | name of the topic to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_delete_wiki_page + +> repo_delete_wiki_page(owner, repo, page_name) +Delete a wiki page + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page_name** | **String** | name of the page | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_dismiss_pull_review + +> models::PullReview repo_dismiss_pull_review(owner, repo, index, id, body) +Dismiss a review for a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**id** | **i64** | id of the review | [required] | +**body** | [**DismissPullReviewOptions**](DismissPullReviewOptions.md) | | [required] | + +### Return type + +[**models::PullReview**](PullReview.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_download_commit_diff_or_patch + +> String repo_download_commit_diff_or_patch(owner, repo, sha, diff_type) +Get a commit's diff or patch + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | **String** | SHA of the commit to get | [required] | +**diff_type** | **String** | whether the output is diff or patch | [required] | + +### Return type + +**String** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_download_pull_diff_or_patch + +> String repo_download_pull_diff_or_patch(owner, repo, index, diff_type, binary) +Get a pull request diff or patch + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request to get | [required] | +**diff_type** | **String** | whether the output is diff or patch | [required] | +**binary** | Option<**bool**> | whether to include binary file changes. if true, the diff is applicable with `git apply` | | + +### Return type + +**String** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_edit + +> models::Repository repo_edit(owner, repo, body) +Edit a repository's properties. Only fields that are set will be changed. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo to edit | [required] | +**repo** | **String** | name of the repo to edit | [required] | +**body** | Option<[**EditRepoOption**](EditRepoOption.md)> | Properties of a repo that you can edit | | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_edit_branch_protection + +> models::BranchProtection repo_edit_branch_protection(owner, repo, name, body) +Edit a branch protections for a repository. Only fields that are set will be changed + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**name** | **String** | name of protected branch | [required] | +**body** | Option<[**EditBranchProtectionOption**](EditBranchProtectionOption.md)> | | | + +### Return type + +[**models::BranchProtection**](BranchProtection.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_edit_git_hook + +> models::GitHook repo_edit_git_hook(owner, repo, id, body) +Edit a Git hook in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **String** | id of the hook to get | [required] | +**body** | Option<[**EditGitHookOption**](EditGitHookOption.md)> | | | + +### Return type + +[**models::GitHook**](GitHook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_edit_hook + +> models::Hook repo_edit_hook(owner, repo, id, body) +Edit a hook in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | index of the hook | [required] | +**body** | Option<[**EditHookOption**](EditHookOption.md)> | | | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_edit_pull_request + +> models::PullRequest repo_edit_pull_request(owner, repo, index, body) +Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request to edit | [required] | +**body** | Option<[**EditPullRequestOption**](EditPullRequestOption.md)> | | | + +### Return type + +[**models::PullRequest**](PullRequest.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_edit_release + +> models::Release repo_edit_release(owner, repo, id, body) +Update a release + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the release to edit | [required] | +**body** | Option<[**EditReleaseOption**](EditReleaseOption.md)> | | | + +### Return type + +[**models::Release**](Release.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_edit_release_attachment + +> models::Attachment repo_edit_release_attachment(owner, repo, id, attachment_id, body) +Edit a release attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the release | [required] | +**attachment_id** | **i64** | id of the attachment to edit | [required] | +**body** | Option<[**EditAttachmentOptions**](EditAttachmentOptions.md)> | | | + +### Return type + +[**models::Attachment**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_edit_tag_protection + +> models::TagProtection repo_edit_tag_protection(owner, repo, id, body) +Edit a tag protections for a repository. Only fields that are set will be changed + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of protected tag | [required] | +**body** | Option<[**EditTagProtectionOption**](EditTagProtectionOption.md)> | | | + +### Return type + +[**models::TagProtection**](TagProtection.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_edit_wiki_page + +> models::WikiPage repo_edit_wiki_page(owner, repo, page_name, body) +Edit a wiki page + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page_name** | **String** | name of the page | [required] | +**body** | Option<[**CreateWikiPageOptions**](CreateWikiPageOptions.md)> | | | + +### Return type + +[**models::WikiPage**](WikiPage.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get + +> models::Repository repo_get(owner, repo) +Get a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_all_commits + +> Vec repo_get_all_commits(owner, repo, sha, path, stat, verification, files, page, limit, not) +Get a list of all commits from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | Option<**String**> | SHA or branch to start listing commits from (usually 'master') | | +**path** | Option<**String**> | filepath of a file/dir | | +**stat** | Option<**bool**> | include diff stats for every commit (disable for speedup, default 'true') | | +**verification** | Option<**bool**> | include verification for every commit (disable for speedup, default 'true') | | +**files** | Option<**bool**> | include a list of affected files for every commit (disable for speedup, default 'true') | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results (ignored if used with 'path') | | +**not** | Option<**String**> | commits that match the given specifier will not be listed. | | + +### Return type + +[**Vec**](Commit.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_archive + +> repo_get_archive(owner, repo, archive) +Get an archive of a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**archive** | **String** | the git reference for download with attached archive format (e.g. master.zip) | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/octet-stream, application/zip, application/gzip + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_assignees + +> Vec repo_get_assignees(owner, repo) +Return all users that have write access and can be assigned to issues + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_branch + +> models::Branch repo_get_branch(owner, repo, branch) +Retrieve a specific branch from a repository, including its effective branch protection + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**branch** | **String** | branch to get | [required] | + +### Return type + +[**models::Branch**](Branch.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_branch_protection + +> models::BranchProtection repo_get_branch_protection(owner, repo, name) +Get a specific branch protection for the repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**name** | **String** | name of protected branch | [required] | + +### Return type + +[**models::BranchProtection**](BranchProtection.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_by_id + +> models::Repository repo_get_by_id(id) +Get a repository by id + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the repo to get | [required] | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_combined_status_by_ref + +> models::CombinedStatus repo_get_combined_status_by_ref(owner, repo, r#ref, page, limit) +Get a commit's combined status, by branch/tag/commit reference + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**r#ref** | **String** | name of branch/tag/commit | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**models::CombinedStatus**](CombinedStatus.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_commit_pull_request + +> models::PullRequest repo_get_commit_pull_request(owner, repo, sha) +Get the pull request of the commit + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | **String** | SHA of the commit to get | [required] | + +### Return type + +[**models::PullRequest**](PullRequest.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_contents + +> models::ContentsResponse repo_get_contents(owner, repo, filepath, r#ref) +Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**filepath** | **String** | path of the dir, file, symlink or submodule in the repo | [required] | +**r#ref** | Option<**String**> | The name of the commit/branch/tag. Default the repository’s default branch (usually master) | | + +### Return type + +[**models::ContentsResponse**](ContentsResponse.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_contents_list + +> Vec repo_get_contents_list(owner, repo, r#ref) +Gets the metadata of all the entries of the root dir + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**r#ref** | Option<**String**> | The name of the commit/branch/tag. Default the repository’s default branch (usually master) | | + +### Return type + +[**Vec**](ContentsResponse.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_editor_config + +> std::collections::HashMap repo_get_editor_config(owner, repo, filepath, r#ref) +Get the EditorConfig definitions of a file in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**filepath** | **String** | filepath of file to get | [required] | +**r#ref** | Option<**String**> | The name of the commit/branch/tag. Default the repository’s default branch (usually master) | | + +### Return type + +**std::collections::HashMap** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_git_hook + +> models::GitHook repo_get_git_hook(owner, repo, id) +Get a Git hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **String** | id of the hook to get | [required] | + +### Return type + +[**models::GitHook**](GitHook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_hook + +> models::Hook repo_get_hook(owner, repo, id) +Get a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the hook to get | [required] | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_issue_config + +> models::IssueConfig repo_get_issue_config(owner, repo) +Returns the issue config for a repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**models::IssueConfig**](IssueConfig.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_issue_templates + +> Vec repo_get_issue_templates(owner, repo) +Get available issue templates for a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**Vec**](IssueTemplate.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_key + +> models::DeployKey repo_get_key(owner, repo, id) +Get a repository's key by id + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the key to get | [required] | + +### Return type + +[**models::DeployKey**](DeployKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_languages + +> std::collections::HashMap repo_get_languages(owner, repo) +Get languages and number of bytes of code written + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +**std::collections::HashMap** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_latest_release + +> models::Release repo_get_latest_release(owner, repo) +Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**models::Release**](Release.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_note + +> models::Note repo_get_note(owner, repo, sha, verification, files) +Get a note corresponding to a single commit from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | **String** | a git ref or commit sha | [required] | +**verification** | Option<**bool**> | include verification for every commit (disable for speedup, default 'true') | | +**files** | Option<**bool**> | include a list of affected files for every commit (disable for speedup, default 'true') | | + +### Return type + +[**models::Note**](Note.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_pull_request + +> models::PullRequest repo_get_pull_request(owner, repo, index) +Get a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request to get | [required] | + +### Return type + +[**models::PullRequest**](PullRequest.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_pull_request_by_base_head + +> models::PullRequest repo_get_pull_request_by_base_head(owner, repo, base, head) +Get a pull request by base and head + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**base** | **String** | base of the pull request to get | [required] | +**head** | **String** | head of the pull request to get | [required] | + +### Return type + +[**models::PullRequest**](PullRequest.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_pull_request_commits + +> Vec repo_get_pull_request_commits(owner, repo, index, page, limit, verification, files) +Get commits for a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request to get | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | +**verification** | Option<**bool**> | include verification for every commit (disable for speedup, default 'true') | | +**files** | Option<**bool**> | include a list of affected files for every commit (disable for speedup, default 'true') | | + +### Return type + +[**Vec**](Commit.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_pull_request_files + +> Vec repo_get_pull_request_files(owner, repo, index, skip_to, whitespace, page, limit) +Get changed files for a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request to get | [required] | +**skip_to** | Option<**String**> | skip to given file | | +**whitespace** | Option<**String**> | whitespace behavior | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](ChangedFile.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_pull_review + +> models::PullReview repo_get_pull_review(owner, repo, index, id) +Get a specific review for a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**id** | **i64** | id of the review | [required] | + +### Return type + +[**models::PullReview**](PullReview.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_pull_review_comment + +> models::PullReviewComment repo_get_pull_review_comment(owner, repo, index, id, comment) +Get a pull review comment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**id** | **i64** | id of the review | [required] | +**comment** | **i64** | id of the comment | [required] | + +### Return type + +[**models::PullReviewComment**](PullReviewComment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_pull_review_comments + +> Vec repo_get_pull_review_comments(owner, repo, index, id) +Get a specific review for a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**id** | **i64** | id of the review | [required] | + +### Return type + +[**Vec**](PullReviewComment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_push_mirror_by_remote_name + +> models::PushMirror repo_get_push_mirror_by_remote_name(owner, repo, name) +Get push mirror of the repository by remoteName + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**name** | **String** | remote name of push mirror | [required] | + +### Return type + +[**models::PushMirror**](PushMirror.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_raw_file + +> std::path::PathBuf repo_get_raw_file(owner, repo, filepath, r#ref) +Get a file from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**filepath** | **String** | filepath of the file to get | [required] | +**r#ref** | Option<**String**> | The name of the commit/branch/tag. Default the repository’s default branch (usually master) | | + +### Return type + +[**std::path::PathBuf**](std::path::PathBuf.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_raw_file_or_lfs + +> std::path::PathBuf repo_get_raw_file_or_lfs(owner, repo, filepath, r#ref) +Get a file or it's LFS object from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**filepath** | **String** | filepath of the file to get | [required] | +**r#ref** | Option<**String**> | The name of the commit/branch/tag. Default the repository’s default branch (usually master) | | + +### Return type + +[**std::path::PathBuf**](std::path::PathBuf.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_release + +> models::Release repo_get_release(owner, repo, id) +Get a release + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the release to get | [required] | + +### Return type + +[**models::Release**](Release.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_release_attachment + +> models::Attachment repo_get_release_attachment(owner, repo, id, attachment_id) +Get a release attachment + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the release | [required] | +**attachment_id** | **i64** | id of the attachment to get | [required] | + +### Return type + +[**models::Attachment**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_release_by_tag + +> models::Release repo_get_release_by_tag(owner, repo, tag) +Get a release by tag name + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**tag** | **String** | tag name of the release to get | [required] | + +### Return type + +[**models::Release**](Release.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_repo_permissions + +> models::RepoCollaboratorPermission repo_get_repo_permissions(owner, repo, collaborator) +Get repository permissions for a user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**collaborator** | **String** | username of the collaborator | [required] | + +### Return type + +[**models::RepoCollaboratorPermission**](RepoCollaboratorPermission.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_reviewers + +> Vec repo_get_reviewers(owner, repo) +Return all users that can be requested to review in this repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_runner_registration_token + +> models::RegistrationToken repo_get_runner_registration_token(owner, repo) +Get a repository's actions runner registration token + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**models::RegistrationToken**](RegistrationToken.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_single_commit + +> models::Commit repo_get_single_commit(owner, repo, sha, stat, verification, files) +Get a single commit from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | **String** | a git ref or commit sha | [required] | +**stat** | Option<**bool**> | include diff stats for every commit (disable for speedup, default 'true') | | +**verification** | Option<**bool**> | include verification for every commit (disable for speedup, default 'true') | | +**files** | Option<**bool**> | include a list of affected files for every commit (disable for speedup, default 'true') | | + +### Return type + +[**models::Commit**](Commit.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_tag + +> models::Tag repo_get_tag(owner, repo, tag) +Get the tag of a repository by tag name + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**tag** | **String** | name of tag | [required] | + +### Return type + +[**models::Tag**](Tag.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_tag_protection + +> models::TagProtection repo_get_tag_protection(owner, repo, id) +Get a specific tag protection for the repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the tag protect to get | [required] | + +### Return type + +[**models::TagProtection**](TagProtection.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_wiki_page + +> models::WikiPage repo_get_wiki_page(owner, repo, page_name) +Get a wiki page + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page_name** | **String** | name of the page | [required] | + +### Return type + +[**models::WikiPage**](WikiPage.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_wiki_page_revisions + +> models::WikiCommitList repo_get_wiki_page_revisions(owner, repo, page_name, page) +Get revisions of a wiki page + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page_name** | **String** | name of the page | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | + +### Return type + +[**models::WikiCommitList**](WikiCommitList.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_get_wiki_pages + +> Vec repo_get_wiki_pages(owner, repo, page, limit) +Get all wiki pages + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](WikiPageMetaData.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_actions_secrets + +> Vec repo_list_actions_secrets(owner, repo, page, limit) +List an repo's actions secrets + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repository | [required] | +**repo** | **String** | name of the repository | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Secret.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_activity_feeds + +> Vec repo_list_activity_feeds(owner, repo, date, page, limit) +List a repository's activity feeds + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**date** | Option<**String**> | the date of the activities to be found | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Activity.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_all_git_refs + +> Vec repo_list_all_git_refs(owner, repo) +Get specified ref or filtered repository's refs + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**Vec**](Reference.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_branch_protection + +> Vec repo_list_branch_protection(owner, repo) +List branch protections for a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**Vec**](BranchProtection.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_branches + +> Vec repo_list_branches(owner, repo, page, limit) +List a repository's branches + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Branch.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_collaborators + +> Vec repo_list_collaborators(owner, repo, page, limit) +List a repository's collaborators + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_flags + +> Vec repo_list_flags(owner, repo) +List a repository's flags + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +**Vec** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_git_hooks + +> Vec repo_list_git_hooks(owner, repo) +List the Git hooks in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**Vec**](GitHook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_git_refs + +> Vec repo_list_git_refs(owner, repo, r#ref) +Get specified ref or filtered repository's refs + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**r#ref** | **String** | part or full name of the ref | [required] | + +### Return type + +[**Vec**](Reference.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_hooks + +> Vec repo_list_hooks(owner, repo, page, limit) +List the hooks in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_keys + +> Vec repo_list_keys(owner, repo, key_id, fingerprint, page, limit) +List a repository's keys + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**key_id** | Option<**i32**> | the key_id to search for | | +**fingerprint** | Option<**String**> | fingerprint of the key | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](DeployKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_pinned_issues + +> Vec repo_list_pinned_issues(owner, repo) +List a repo's pinned issues + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**Vec**](Issue.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_pinned_pull_requests + +> Vec repo_list_pinned_pull_requests(owner, repo) +List a repo's pinned pull requests + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**Vec**](PullRequest.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_pull_requests + +> Vec repo_list_pull_requests(owner, repo, state, sort, milestone, labels, poster, page, limit) +List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | Owner of the repo | [required] | +**repo** | **String** | Name of the repo | [required] | +**state** | Option<**String**> | State of pull request | |[default to open] +**sort** | Option<**String**> | Type of sort | | +**milestone** | Option<**i64**> | ID of the milestone | | +**labels** | Option<[**Vec**](I64.md)> | Label IDs | | +**poster** | Option<**String**> | Filter by pull request author | | +**page** | Option<**i32**> | Page number of results to return (1-based) | |[default to 1] +**limit** | Option<**i32**> | Page size of results | | + +### Return type + +[**Vec**](PullRequest.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_pull_reviews + +> Vec repo_list_pull_reviews(owner, repo, index, page, limit) +List all reviews for a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](PullReview.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_push_mirrors + +> Vec repo_list_push_mirrors(owner, repo, page, limit) +Get all push mirrors of the repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](PushMirror.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_release_attachments + +> Vec repo_list_release_attachments(owner, repo, id) +List release's attachments + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the release | [required] | + +### Return type + +[**Vec**](Attachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_releases + +> Vec repo_list_releases(owner, repo, draft, pre_release, q, page, limit) +List a repo's releases + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**draft** | Option<**bool**> | filter (exclude / include) drafts, if you dont have repo write access none will show | | +**pre_release** | Option<**bool**> | filter (exclude / include) pre-releases | | +**q** | Option<**String**> | Search string | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Release.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_stargazers + +> Vec repo_list_stargazers(owner, repo, page, limit) +List a repo's stargazers + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_statuses + +> Vec repo_list_statuses(owner, repo, sha, sort, state, page, limit) +Get a commit's statuses + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | **String** | sha of the commit | [required] | +**sort** | Option<**String**> | type of sort | | +**state** | Option<**String**> | type of state | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](CommitStatus.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_statuses_by_ref + +> Vec repo_list_statuses_by_ref(owner, repo, r#ref, sort, state, page, limit) +Get a commit's statuses, by branch/tag/commit reference + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**r#ref** | **String** | name of branch/tag/commit | [required] | +**sort** | Option<**String**> | type of sort | | +**state** | Option<**String**> | type of state | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](CommitStatus.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_subscribers + +> Vec repo_list_subscribers(owner, repo, page, limit) +List a repo's watchers + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_tag_protection + +> Vec repo_list_tag_protection(owner, repo) +List tag protections for a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**Vec**](TagProtection.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_tags + +> Vec repo_list_tags(owner, repo, page, limit) +List a repository's tags + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results, default maximum page size is 50 | | + +### Return type + +[**Vec**](Tag.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_teams + +> Vec repo_list_teams(owner, repo) +List a repository's teams + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**Vec**](Team.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_list_topics + +> models::TopicName repo_list_topics(owner, repo, page, limit) +Get list of topics that a repository has + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**models::TopicName**](TopicName.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_merge_pull_request + +> repo_merge_pull_request(owner, repo, index, body) +Merge a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request to merge | [required] | +**body** | Option<[**MergePullRequestOption**](MergePullRequestOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_migrate + +> models::Repository repo_migrate(body) +Migrate a remote git repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**MigrateRepoOptions**](MigrateRepoOptions.md)> | | | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_mirror_sync + +> repo_mirror_sync(owner, repo) +Sync a mirrored repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo to sync | [required] | +**repo** | **String** | name of the repo to sync | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_new_pin_allowed + +> models::NewIssuePinsAllowed repo_new_pin_allowed(owner, repo) +Returns if new Issue Pins are allowed + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**models::NewIssuePinsAllowed**](NewIssuePinsAllowed.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_pull_request_is_merged + +> repo_pull_request_is_merged(owner, repo, index) +Check if a pull request has been merged + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_push_mirror_sync + +> repo_push_mirror_sync(owner, repo) +Sync all push mirrored repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo to sync | [required] | +**repo** | **String** | name of the repo to sync | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_remove_note + +> repo_remove_note(owner, repo, sha) +Removes a note corresponding to a single commit from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | **String** | a git ref or commit sha | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_replace_all_flags + +> repo_replace_all_flags(owner, repo, body) +Replace all flags of a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**ReplaceFlagsOption**](ReplaceFlagsOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_search + +> models::SearchResults repo_search(q, topic, include_desc, uid, priority_owner_id, team_id, starred_by, private, is_private, template, archived, mode, exclusive, sort, order, page, limit) +Search for repositories + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**q** | Option<**String**> | keyword | | +**topic** | Option<**bool**> | Limit search to repositories with keyword as topic | | +**include_desc** | Option<**bool**> | include search of keyword within repository description | | +**uid** | Option<**i64**> | search only for repos that the user with the given id owns or contributes to | | +**priority_owner_id** | Option<**i64**> | repo owner to prioritize in the results | | +**team_id** | Option<**i64**> | search only for repos that belong to the given team id | | +**starred_by** | Option<**i64**> | search only for repos that the user with the given id has starred | | +**private** | Option<**bool**> | include private repositories this user has access to (defaults to true) | | +**is_private** | Option<**bool**> | show only public, private or all repositories (defaults to all) | | +**template** | Option<**bool**> | include template repositories this user has access to (defaults to true) | | +**archived** | Option<**bool**> | show only archived, non-archived or all repositories (defaults to all) | | +**mode** | Option<**String**> | type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" | | +**exclusive** | Option<**bool**> | if `uid` is given, search only for repos that the user owns | | +**sort** | Option<**String**> | sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" and \"id\". Default is \"alpha\" | | +**order** | Option<**String**> | sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**models::SearchResults**](SearchResults.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_search_run_jobs + +> Vec repo_search_run_jobs(owner, repo, labels) +Search for repository's action jobs according filter conditions + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**labels** | Option<**String**> | a comma separated list of run job labels to search for | | + +### Return type + +[**Vec**](ActionRunJob.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_set_note + +> models::Note repo_set_note(owner, repo, sha, body) +Set a note corresponding to a single commit from a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**sha** | **String** | a git ref or commit sha | [required] | +**body** | Option<[**NoteOptions**](NoteOptions.md)> | | | + +### Return type + +[**models::Note**](Note.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_signing_key + +> String repo_signing_key(owner, repo) +Get signing-key.gpg for given repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +**String** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_submit_pull_review + +> models::PullReview repo_submit_pull_review(owner, repo, index, id, body) +Submit a pending review to an pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**id** | **i64** | id of the review | [required] | +**body** | [**SubmitPullReviewOptions**](SubmitPullReviewOptions.md) | | [required] | + +### Return type + +[**models::PullReview**](PullReview.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_sync_fork_branch + +> repo_sync_fork_branch(owner, repo, branch) +Syncs a fork branch with the base branch + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**branch** | **String** | The branch | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_sync_fork_branch_info + +> models::SyncForkInfo repo_sync_fork_branch_info(owner, repo, branch) +Gets information about syncing a fork branch with the base branch + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**branch** | **String** | The branch | [required] | + +### Return type + +[**models::SyncForkInfo**](SyncForkInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_sync_fork_default + +> repo_sync_fork_default(owner, repo) +Syncs the default branch of a fork with the base branch + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_sync_fork_default_info + +> models::SyncForkInfo repo_sync_fork_default_info(owner, repo) +Gets information about syncing the fork default branch with the base branch + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**models::SyncForkInfo**](SyncForkInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_test_hook + +> repo_test_hook(owner, repo, id, r#ref) +Test a push webhook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**id** | **i64** | id of the hook to test | [required] | +**r#ref** | Option<**String**> | The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload. | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_tracked_times + +> Vec repo_tracked_times(owner, repo, user, since, before, page, limit) +List a repo's tracked times + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**user** | Option<**String**> | optional filter by user (available for issue managers) | | +**since** | Option<**String**> | Only show times updated after the given time. This is a timestamp in RFC 3339 format | | +**before** | Option<**String**> | Only show times updated before the given time. This is a timestamp in RFC 3339 format | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](TrackedTime.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_transfer + +> models::Repository repo_transfer(owner, repo, body) +Transfer a repo ownership + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo to transfer | [required] | +**repo** | **String** | name of the repo to transfer | [required] | +**body** | [**TransferRepoOption**](TransferRepoOption.md) | Transfer Options | [required] | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_un_dismiss_pull_review + +> models::PullReview repo_un_dismiss_pull_review(owner, repo, index, id) +Cancel to dismiss a review for a pull request + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request | [required] | +**id** | **i64** | id of the review | [required] | + +### Return type + +[**models::PullReview**](PullReview.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_update_avatar + +> repo_update_avatar(owner, repo, body) +Update a repository's avatar + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**UpdateRepoAvatarOption**](UpdateRepoAvatarOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_update_branch + +> repo_update_branch(owner, repo, branch, body) +Update a branch + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**branch** | **String** | name of the branch | [required] | +**body** | Option<[**UpdateBranchRepoOption**](UpdateBranchRepoOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_update_file + +> models::FileResponse repo_update_file(owner, repo, filepath, body) +Update a file in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**filepath** | **String** | path of the file to update | [required] | +**body** | [**UpdateFileOptions**](UpdateFileOptions.md) | | [required] | + +### Return type + +[**models::FileResponse**](FileResponse.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_update_pull_request + +> repo_update_pull_request(owner, repo, index, style) +Merge PR's baseBranch into headBranch + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**index** | **i64** | index of the pull request to get | [required] | +**style** | Option<**String**> | how to update pull request | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_update_topics + +> repo_update_topics(owner, repo, body) +Replace list of topics for a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**body** | Option<[**RepoTopicOptions**](RepoTopicOptions.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## repo_validate_issue_config + +> models::IssueConfigValidation repo_validate_issue_config(owner, repo) +Returns the validation information for a issue config + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**models::IssueConfigValidation**](IssueConfigValidation.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## topic_search + +> models::TopicSearchResults topic_search(q, page, limit) +Search for topics by keyword + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**q** | **String** | keyword to search for | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**models::TopicSearchResults**](TopicSearchResults.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_repo_secret + +> update_repo_secret(owner, repo, secretname, body) +Create or Update a secret value in a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repository | [required] | +**repo** | **String** | name of the repository | [required] | +**secretname** | **String** | name of the secret | [required] | +**body** | Option<[**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_repo_variable + +> update_repo_variable(owner, repo, variablename, body) +Update a repo-level variable + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | name of the owner | [required] | +**repo** | **String** | name of the repository | [required] | +**variablename** | **String** | name of the variable | [required] | +**body** | Option<[**UpdateVariableOption**](UpdateVariableOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_check_subscription + +> models::WatchInfo user_current_check_subscription(owner, repo) +Check if the current user is watching a repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**models::WatchInfo**](WatchInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_delete_subscription + +> user_current_delete_subscription(owner, repo) +Unwatch a repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_put_subscription + +> models::WatchInfo user_current_put_subscription(owner, repo) +Watch a repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + +[**models::WatchInfo**](WatchInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_tracked_times + +> Vec user_tracked_times(owner, repo, user) +List a user's tracked times in a repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | +**user** | **String** | username of user | [required] | + +### Return type + +[**Vec**](TrackedTime.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/forgejo-openapi/docs/RepositoryMeta.md b/forgejo-openapi/docs/RepositoryMeta.md new file mode 100644 index 0000000..58daa18 --- /dev/null +++ b/forgejo-openapi/docs/RepositoryMeta.md @@ -0,0 +1,14 @@ +# RepositoryMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**full_name** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] +**owner** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/SearchResults.md b/forgejo-openapi/docs/SearchResults.md new file mode 100644 index 0000000..4642d2e --- /dev/null +++ b/forgejo-openapi/docs/SearchResults.md @@ -0,0 +1,12 @@ +# SearchResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | Option<[**Vec**](Repository.md)> | | [optional] +**ok** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Secret.md b/forgejo-openapi/docs/Secret.md new file mode 100644 index 0000000..b5bcf73 --- /dev/null +++ b/forgejo-openapi/docs/Secret.md @@ -0,0 +1,12 @@ +# Secret + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | Option<**String**> | | [optional] +**name** | Option<**String**> | the secret's name | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/ServerVersion.md b/forgejo-openapi/docs/ServerVersion.md new file mode 100644 index 0000000..96ba26f --- /dev/null +++ b/forgejo-openapi/docs/ServerVersion.md @@ -0,0 +1,11 @@ +# ServerVersion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/SetUserQuotaGroupsOptions.md b/forgejo-openapi/docs/SetUserQuotaGroupsOptions.md new file mode 100644 index 0000000..c0d385c --- /dev/null +++ b/forgejo-openapi/docs/SetUserQuotaGroupsOptions.md @@ -0,0 +1,11 @@ +# SetUserQuotaGroupsOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**groups** | **Vec** | Quota groups the user shall have | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/SettingsApi.md b/forgejo-openapi/docs/SettingsApi.md new file mode 100644 index 0000000..ae75b02 --- /dev/null +++ b/forgejo-openapi/docs/SettingsApi.md @@ -0,0 +1,112 @@ +# \SettingsApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_general_api_settings**](SettingsApi.md#get_general_api_settings) | **GET** /settings/api | Get instance's global settings for api +[**get_general_attachment_settings**](SettingsApi.md#get_general_attachment_settings) | **GET** /settings/attachment | Get instance's global settings for Attachment +[**get_general_repository_settings**](SettingsApi.md#get_general_repository_settings) | **GET** /settings/repository | Get instance's global settings for repositories +[**get_general_ui_settings**](SettingsApi.md#get_general_ui_settings) | **GET** /settings/ui | Get instance's global settings for ui + + + +## get_general_api_settings + +> models::GeneralApiSettings get_general_api_settings() +Get instance's global settings for api + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::GeneralApiSettings**](GeneralAPISettings.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_general_attachment_settings + +> models::GeneralAttachmentSettings get_general_attachment_settings() +Get instance's global settings for Attachment + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::GeneralAttachmentSettings**](GeneralAttachmentSettings.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_general_repository_settings + +> models::GeneralRepoSettings get_general_repository_settings() +Get instance's global settings for repositories + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::GeneralRepoSettings**](GeneralRepoSettings.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_general_ui_settings + +> models::GeneralUiSettings get_general_ui_settings() +Get instance's global settings for ui + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::GeneralUiSettings**](GeneralUISettings.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/forgejo-openapi/docs/StopWatch.md b/forgejo-openapi/docs/StopWatch.md new file mode 100644 index 0000000..fb0b10b --- /dev/null +++ b/forgejo-openapi/docs/StopWatch.md @@ -0,0 +1,17 @@ +# StopWatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | Option<**String**> | | [optional] +**duration** | Option<**String**> | | [optional] +**issue_index** | Option<**i64**> | | [optional] +**issue_title** | Option<**String**> | | [optional] +**repo_name** | Option<**String**> | | [optional] +**repo_owner_name** | Option<**String**> | | [optional] +**seconds** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/SubmitPullReviewOptions.md b/forgejo-openapi/docs/SubmitPullReviewOptions.md new file mode 100644 index 0000000..2be076a --- /dev/null +++ b/forgejo-openapi/docs/SubmitPullReviewOptions.md @@ -0,0 +1,12 @@ +# SubmitPullReviewOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | Option<**String**> | | [optional] +**event** | Option<**String**> | ReviewStateType review state type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/SyncForkInfo.md b/forgejo-openapi/docs/SyncForkInfo.md new file mode 100644 index 0000000..c98acd4 --- /dev/null +++ b/forgejo-openapi/docs/SyncForkInfo.md @@ -0,0 +1,14 @@ +# SyncForkInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed** | Option<**bool**> | | [optional] +**base_commit** | Option<**String**> | | [optional] +**commits_behind** | Option<**i64**> | | [optional] +**fork_commit** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Tag.md b/forgejo-openapi/docs/Tag.md new file mode 100644 index 0000000..2af8d24 --- /dev/null +++ b/forgejo-openapi/docs/Tag.md @@ -0,0 +1,17 @@ +# Tag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**archive_download_count** | Option<[**models::TagArchiveDownloadCount**](TagArchiveDownloadCount.md)> | | [optional] +**commit** | Option<[**models::CommitMeta**](CommitMeta.md)> | | [optional] +**id** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**tarball_url** | Option<**String**> | | [optional] +**zipball_url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/TagArchiveDownloadCount.md b/forgejo-openapi/docs/TagArchiveDownloadCount.md new file mode 100644 index 0000000..747d81e --- /dev/null +++ b/forgejo-openapi/docs/TagArchiveDownloadCount.md @@ -0,0 +1,12 @@ +# TagArchiveDownloadCount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tar_gz** | Option<**i64**> | | [optional] +**zip** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/TagProtection.md b/forgejo-openapi/docs/TagProtection.md new file mode 100644 index 0000000..338bc8d --- /dev/null +++ b/forgejo-openapi/docs/TagProtection.md @@ -0,0 +1,16 @@ +# TagProtection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**name_pattern** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**whitelist_teams** | Option<**Vec**> | | [optional] +**whitelist_usernames** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/Team.md b/forgejo-openapi/docs/Team.md new file mode 100644 index 0000000..2b58c74 --- /dev/null +++ b/forgejo-openapi/docs/Team.md @@ -0,0 +1,19 @@ +# Team + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_create_org_repo** | Option<**bool**> | | [optional] +**description** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**includes_all_repositories** | Option<**bool**> | | [optional] +**name** | Option<**String**> | | [optional] +**organization** | Option<[**models::Organization**](Organization.md)> | | [optional] +**permission** | Option<**Permission**> | (enum: none, read, write, admin, owner) | [optional] +**units** | Option<**Vec**> | | [optional] +**units_map** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/TeamSearchResults.md b/forgejo-openapi/docs/TeamSearchResults.md new file mode 100644 index 0000000..13aa258 --- /dev/null +++ b/forgejo-openapi/docs/TeamSearchResults.md @@ -0,0 +1,12 @@ +# TeamSearchResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | Option<[**Vec**](Team.md)> | | [optional] +**ok** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/TimelineComment.md b/forgejo-openapi/docs/TimelineComment.md new file mode 100644 index 0000000..908d4bc --- /dev/null +++ b/forgejo-openapi/docs/TimelineComment.md @@ -0,0 +1,39 @@ +# TimelineComment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | Option<[**models::User**](User.md)> | | [optional] +**assignee_team** | Option<[**models::Team**](Team.md)> | | [optional] +**body** | Option<**String**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**dependent_issue** | Option<[**models::Issue**](Issue.md)> | | [optional] +**html_url** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**issue_url** | Option<**String**> | | [optional] +**label** | Option<[**models::Label**](Label.md)> | | [optional] +**milestone** | Option<[**models::Milestone**](Milestone.md)> | | [optional] +**new_ref** | Option<**String**> | | [optional] +**new_title** | Option<**String**> | | [optional] +**old_milestone** | Option<[**models::Milestone**](Milestone.md)> | | [optional] +**old_project_id** | Option<**i64**> | | [optional] +**old_ref** | Option<**String**> | | [optional] +**old_title** | Option<**String**> | | [optional] +**project_id** | Option<**i64**> | | [optional] +**pull_request_url** | Option<**String**> | | [optional] +**ref_action** | Option<**String**> | | [optional] +**ref_comment** | Option<[**models::Comment**](Comment.md)> | | [optional] +**ref_commit_sha** | Option<**String**> | commit SHA where issue/PR was referenced | [optional] +**ref_issue** | Option<[**models::Issue**](Issue.md)> | | [optional] +**removed_assignee** | Option<**bool**> | whether the assignees were removed or added | [optional] +**resolve_doer** | Option<[**models::User**](User.md)> | | [optional] +**review_id** | Option<**i64**> | | [optional] +**tracked_time** | Option<[**models::TrackedTime**](TrackedTime.md)> | | [optional] +**r#type** | Option<**String**> | | [optional] +**updated_at** | Option<**String**> | | [optional] +**user** | Option<[**models::User**](User.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/TopicName.md b/forgejo-openapi/docs/TopicName.md new file mode 100644 index 0000000..8a07731 --- /dev/null +++ b/forgejo-openapi/docs/TopicName.md @@ -0,0 +1,11 @@ +# TopicName + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topics** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/TopicResponse.md b/forgejo-openapi/docs/TopicResponse.md new file mode 100644 index 0000000..e018c94 --- /dev/null +++ b/forgejo-openapi/docs/TopicResponse.md @@ -0,0 +1,15 @@ +# TopicResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**repo_count** | Option<**i64**> | | [optional] +**topic_name** | Option<**String**> | | [optional] +**updated** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/TopicSearchResults.md b/forgejo-openapi/docs/TopicSearchResults.md new file mode 100644 index 0000000..9640e72 --- /dev/null +++ b/forgejo-openapi/docs/TopicSearchResults.md @@ -0,0 +1,11 @@ +# TopicSearchResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topics** | Option<[**Vec**](TopicResponse.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/TrackedTime.md b/forgejo-openapi/docs/TrackedTime.md new file mode 100644 index 0000000..91f638d --- /dev/null +++ b/forgejo-openapi/docs/TrackedTime.md @@ -0,0 +1,17 @@ +# TrackedTime + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | Option<**String**> | | [optional] +**id** | Option<**i64**> | | [optional] +**issue** | Option<[**models::Issue**](Issue.md)> | | [optional] +**issue_id** | Option<**i64**> | deprecated (only for backwards compatibility) | [optional] +**time** | Option<**i64**> | Time in seconds | [optional] +**user_id** | Option<**i64**> | deprecated (only for backwards compatibility) | [optional] +**user_name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/TransferRepoOption.md b/forgejo-openapi/docs/TransferRepoOption.md new file mode 100644 index 0000000..04b5f3e --- /dev/null +++ b/forgejo-openapi/docs/TransferRepoOption.md @@ -0,0 +1,12 @@ +# TransferRepoOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_owner** | **String** | | +**team_ids** | Option<**Vec**> | ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/UpdateBranchRepoOption.md b/forgejo-openapi/docs/UpdateBranchRepoOption.md new file mode 100644 index 0000000..c1712e4 --- /dev/null +++ b/forgejo-openapi/docs/UpdateBranchRepoOption.md @@ -0,0 +1,11 @@ +# UpdateBranchRepoOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | New branch name | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/UpdateFileOptions.md b/forgejo-openapi/docs/UpdateFileOptions.md new file mode 100644 index 0000000..9d5435b --- /dev/null +++ b/forgejo-openapi/docs/UpdateFileOptions.md @@ -0,0 +1,20 @@ +# UpdateFileOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | Option<[**models::Identity**](Identity.md)> | | [optional] +**branch** | Option<**String**> | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | Option<[**models::Identity**](Identity.md)> | | [optional] +**content** | **String** | content must be base64 encoded | +**dates** | Option<[**models::CommitDateOptions**](CommitDateOptions.md)> | | [optional] +**from_path** | Option<**String**> | from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL | [optional] +**message** | Option<**String**> | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**new_branch** | Option<**String**> | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**sha** | **String** | sha is the SHA for the file that already exists | +**signoff** | Option<**bool**> | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/UpdateRepoAvatarOption.md b/forgejo-openapi/docs/UpdateRepoAvatarOption.md new file mode 100644 index 0000000..88eebc3 --- /dev/null +++ b/forgejo-openapi/docs/UpdateRepoAvatarOption.md @@ -0,0 +1,11 @@ +# UpdateRepoAvatarOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | Option<**String**> | image must be base64 encoded | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/UpdateUserAvatarOption.md b/forgejo-openapi/docs/UpdateUserAvatarOption.md new file mode 100644 index 0000000..b0cb064 --- /dev/null +++ b/forgejo-openapi/docs/UpdateUserAvatarOption.md @@ -0,0 +1,11 @@ +# UpdateUserAvatarOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | Option<**String**> | image must be base64 encoded | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/UpdateVariableOption.md b/forgejo-openapi/docs/UpdateVariableOption.md new file mode 100644 index 0000000..4f12f4b --- /dev/null +++ b/forgejo-openapi/docs/UpdateVariableOption.md @@ -0,0 +1,12 @@ +# UpdateVariableOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | New name for the variable. If the field is empty, the variable name won't be updated. | [optional] +**value** | **String** | Value of the variable to update | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/User.md b/forgejo-openapi/docs/User.md new file mode 100644 index 0000000..a843717 --- /dev/null +++ b/forgejo-openapi/docs/User.md @@ -0,0 +1,33 @@ +# User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | Option<**bool**> | Is user active | [optional] +**avatar_url** | Option<**String**> | URL to the user's avatar | [optional] +**created** | Option<**String**> | | [optional] +**description** | Option<**String**> | the user's description | [optional] +**email** | Option<**String**> | | [optional] +**followers_count** | Option<**i64**> | user counts | [optional] +**following_count** | Option<**i64**> | | [optional] +**full_name** | Option<**String**> | the user's full name | [optional] +**html_url** | Option<**String**> | URL to the user's profile page | [optional] +**id** | Option<**i64**> | the user's id | [optional] +**is_admin** | Option<**bool**> | Is the user an administrator | [optional] +**language** | Option<**String**> | User locale | [optional] +**last_login** | Option<**String**> | | [optional] +**location** | Option<**String**> | the user's location | [optional] +**login** | Option<**String**> | the user's username | [optional] +**login_name** | Option<**String**> | the user's authentication sign-in name. | [optional][default to empty] +**prohibit_login** | Option<**bool**> | Is user login prohibited | [optional] +**pronouns** | Option<**String**> | the user's pronouns | [optional] +**restricted** | Option<**bool**> | Is user restricted | [optional] +**source_id** | Option<**i64**> | The ID of the user's Authentication Source | [optional] +**starred_repos_count** | Option<**i64**> | | [optional] +**visibility** | Option<**String**> | User visibility level option: public, limited, private | [optional] +**website** | Option<**String**> | the user's website | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/UserApi.md b/forgejo-openapi/docs/UserApi.md new file mode 100644 index 0000000..edf07c6 --- /dev/null +++ b/forgejo-openapi/docs/UserApi.md @@ -0,0 +1,2219 @@ +# \UserApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_current_user_repo**](UserApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +[**create_user_variable**](UserApi.md#create_user_variable) | **POST** /user/actions/variables/{variablename} | Create a user-level variable +[**delete_user_secret**](UserApi.md#delete_user_secret) | **DELETE** /user/actions/secrets/{secretname} | Delete a secret in a user scope +[**delete_user_variable**](UserApi.md#delete_user_variable) | **DELETE** /user/actions/variables/{variablename} | Delete a user-level variable which is created by current doer +[**get_user_settings**](UserApi.md#get_user_settings) | **GET** /user/settings | Get current user's account settings +[**get_user_variable**](UserApi.md#get_user_variable) | **GET** /user/actions/variables/{variablename} | Get a user-level variable which is created by current doer +[**get_user_variables_list**](UserApi.md#get_user_variables_list) | **GET** /user/actions/variables | Get the user-level list of variables which is created by current doer +[**get_verification_token**](UserApi.md#get_verification_token) | **GET** /user/gpg_key_token | Get a Token to verify +[**update_user_secret**](UserApi.md#update_user_secret) | **PUT** /user/actions/secrets/{secretname} | Create or Update a secret value in a user scope +[**update_user_settings**](UserApi.md#update_user_settings) | **PATCH** /user/settings | Update settings in current user's account +[**update_user_variable**](UserApi.md#update_user_variable) | **PUT** /user/actions/variables/{variablename} | Update a user-level variable which is created by current doer +[**user_add_email**](UserApi.md#user_add_email) | **POST** /user/emails | Add an email addresses to the current user's account +[**user_block_user**](UserApi.md#user_block_user) | **PUT** /user/block/{username} | Blocks a user from the doer +[**user_check_following**](UserApi.md#user_check_following) | **GET** /users/{username}/following/{target} | Check if one user is following another user +[**user_check_quota**](UserApi.md#user_check_quota) | **GET** /user/quota/check | Check if the authenticated user is over quota for a given subject +[**user_create_hook**](UserApi.md#user_create_hook) | **POST** /user/hooks | Create a hook +[**user_create_o_auth2_application**](UserApi.md#user_create_o_auth2_application) | **POST** /user/applications/oauth2 | Creates a new OAuth2 application +[**user_create_token**](UserApi.md#user_create_token) | **POST** /users/{username}/tokens | Generate an access token for the specified user +[**user_current_check_following**](UserApi.md#user_current_check_following) | **GET** /user/following/{username} | Check whether a user is followed by the authenticated user +[**user_current_check_starring**](UserApi.md#user_current_check_starring) | **GET** /user/starred/{owner}/{repo} | Whether the authenticated is starring the repo +[**user_current_delete_follow**](UserApi.md#user_current_delete_follow) | **DELETE** /user/following/{username} | Unfollow a user +[**user_current_delete_gpg_key**](UserApi.md#user_current_delete_gpg_key) | **DELETE** /user/gpg_keys/{id} | Remove a GPG public key from current user's account +[**user_current_delete_key**](UserApi.md#user_current_delete_key) | **DELETE** /user/keys/{id} | Delete a public key +[**user_current_delete_star**](UserApi.md#user_current_delete_star) | **DELETE** /user/starred/{owner}/{repo} | Unstar the given repo +[**user_current_get_gpg_key**](UserApi.md#user_current_get_gpg_key) | **GET** /user/gpg_keys/{id} | Get a GPG key +[**user_current_get_key**](UserApi.md#user_current_get_key) | **GET** /user/keys/{id} | Get a public key +[**user_current_list_followers**](UserApi.md#user_current_list_followers) | **GET** /user/followers | List the authenticated user's followers +[**user_current_list_following**](UserApi.md#user_current_list_following) | **GET** /user/following | List the users that the authenticated user is following +[**user_current_list_gpg_keys**](UserApi.md#user_current_list_gpg_keys) | **GET** /user/gpg_keys | List the authenticated user's GPG keys +[**user_current_list_keys**](UserApi.md#user_current_list_keys) | **GET** /user/keys | List the authenticated user's public keys +[**user_current_list_repos**](UserApi.md#user_current_list_repos) | **GET** /user/repos | List the repos that the authenticated user owns +[**user_current_list_starred**](UserApi.md#user_current_list_starred) | **GET** /user/starred | The repos that the authenticated user has starred +[**user_current_list_subscriptions**](UserApi.md#user_current_list_subscriptions) | **GET** /user/subscriptions | List repositories watched by the authenticated user +[**user_current_post_gpg_key**](UserApi.md#user_current_post_gpg_key) | **POST** /user/gpg_keys | Add a GPG public key to current user's account +[**user_current_post_key**](UserApi.md#user_current_post_key) | **POST** /user/keys | Create a public key +[**user_current_put_follow**](UserApi.md#user_current_put_follow) | **PUT** /user/following/{username} | Follow a user +[**user_current_put_star**](UserApi.md#user_current_put_star) | **PUT** /user/starred/{owner}/{repo} | Star the given repo +[**user_current_tracked_times**](UserApi.md#user_current_tracked_times) | **GET** /user/times | List the current user's tracked times +[**user_delete_access_token**](UserApi.md#user_delete_access_token) | **DELETE** /users/{username}/tokens/{token} | Delete an access token from the specified user's account +[**user_delete_avatar**](UserApi.md#user_delete_avatar) | **DELETE** /user/avatar | Delete avatar of the current user. It will be replaced by a default one +[**user_delete_email**](UserApi.md#user_delete_email) | **DELETE** /user/emails | Delete email addresses from the current user's account +[**user_delete_hook**](UserApi.md#user_delete_hook) | **DELETE** /user/hooks/{id} | Delete a hook +[**user_delete_o_auth2_application**](UserApi.md#user_delete_o_auth2_application) | **DELETE** /user/applications/oauth2/{id} | Delete an OAuth2 application +[**user_edit_hook**](UserApi.md#user_edit_hook) | **PATCH** /user/hooks/{id} | Update a hook +[**user_get**](UserApi.md#user_get) | **GET** /users/{username} | Get a user +[**user_get_current**](UserApi.md#user_get_current) | **GET** /user | Get the authenticated user +[**user_get_heatmap_data**](UserApi.md#user_get_heatmap_data) | **GET** /users/{username}/heatmap | Get a user's heatmap +[**user_get_hook**](UserApi.md#user_get_hook) | **GET** /user/hooks/{id} | Get a hook +[**user_get_o_auth2_application**](UserApi.md#user_get_o_auth2_application) | **GET** /user/applications/oauth2/{id} | Get an OAuth2 application +[**user_get_o_auth2_applications**](UserApi.md#user_get_o_auth2_applications) | **GET** /user/applications/oauth2 | List the authenticated user's oauth2 applications +[**user_get_quota**](UserApi.md#user_get_quota) | **GET** /user/quota | Get quota information for the authenticated user +[**user_get_runner_registration_token**](UserApi.md#user_get_runner_registration_token) | **GET** /user/actions/runners/registration-token | Get an user's actions runner registration token +[**user_get_stop_watches**](UserApi.md#user_get_stop_watches) | **GET** /user/stopwatches | Get list of all existing stopwatches +[**user_get_tokens**](UserApi.md#user_get_tokens) | **GET** /users/{username}/tokens | List the specified user's access tokens +[**user_list_activity_feeds**](UserApi.md#user_list_activity_feeds) | **GET** /users/{username}/activities/feeds | List a user's activity feeds +[**user_list_blocked_users**](UserApi.md#user_list_blocked_users) | **GET** /user/list_blocked | List the authenticated user's blocked users +[**user_list_emails**](UserApi.md#user_list_emails) | **GET** /user/emails | List all email addresses of the current user +[**user_list_followers**](UserApi.md#user_list_followers) | **GET** /users/{username}/followers | List the given user's followers +[**user_list_following**](UserApi.md#user_list_following) | **GET** /users/{username}/following | List the users that the given user is following +[**user_list_gpg_keys**](UserApi.md#user_list_gpg_keys) | **GET** /users/{username}/gpg_keys | List the given user's GPG keys +[**user_list_hooks**](UserApi.md#user_list_hooks) | **GET** /user/hooks | List the authenticated user's webhooks +[**user_list_keys**](UserApi.md#user_list_keys) | **GET** /users/{username}/keys | List the given user's public keys +[**user_list_quota_artifacts**](UserApi.md#user_list_quota_artifacts) | **GET** /user/quota/artifacts | List the artifacts affecting the authenticated user's quota +[**user_list_quota_attachments**](UserApi.md#user_list_quota_attachments) | **GET** /user/quota/attachments | List the attachments affecting the authenticated user's quota +[**user_list_quota_packages**](UserApi.md#user_list_quota_packages) | **GET** /user/quota/packages | List the packages affecting the authenticated user's quota +[**user_list_repos**](UserApi.md#user_list_repos) | **GET** /users/{username}/repos | List the repos owned by the given user +[**user_list_starred**](UserApi.md#user_list_starred) | **GET** /users/{username}/starred | The repos that the given user has starred +[**user_list_subscriptions**](UserApi.md#user_list_subscriptions) | **GET** /users/{username}/subscriptions | List the repositories watched by a user +[**user_list_teams**](UserApi.md#user_list_teams) | **GET** /user/teams | List all the teams a user belongs to +[**user_search**](UserApi.md#user_search) | **GET** /users/search | Search for users +[**user_search_run_jobs**](UserApi.md#user_search_run_jobs) | **GET** /user/actions/runners/jobs | Search for user's action jobs according filter conditions +[**user_unblock_user**](UserApi.md#user_unblock_user) | **PUT** /user/unblock/{username} | Unblocks a user from the doer +[**user_update_avatar**](UserApi.md#user_update_avatar) | **POST** /user/avatar | Update avatar of the current user +[**user_update_o_auth2_application**](UserApi.md#user_update_o_auth2_application) | **PATCH** /user/applications/oauth2/{id} | Update an OAuth2 application, this includes regenerating the client secret +[**user_verify_gpg_key**](UserApi.md#user_verify_gpg_key) | **POST** /user/gpg_key_verify | Verify a GPG key + + + +## create_current_user_repo + +> models::Repository create_current_user_repo(body) +Create a repository + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**CreateRepoOption**](CreateRepoOption.md)> | | | + +### Return type + +[**models::Repository**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_user_variable + +> create_user_variable(variablename, body) +Create a user-level variable + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**variablename** | **String** | name of the variable | [required] | +**body** | Option<[**CreateVariableOption**](CreateVariableOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_user_secret + +> delete_user_secret(secretname) +Delete a secret in a user scope + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**secretname** | **String** | name of the secret | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_user_variable + +> delete_user_variable(variablename) +Delete a user-level variable which is created by current doer + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**variablename** | **String** | name of the variable | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_user_settings + +> models::UserSettings get_user_settings() +Get current user's account settings + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::UserSettings**](UserSettings.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_user_variable + +> models::ActionVariable get_user_variable(variablename) +Get a user-level variable which is created by current doer + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**variablename** | **String** | name of the variable | [required] | + +### Return type + +[**models::ActionVariable**](ActionVariable.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_user_variables_list + +> Vec get_user_variables_list(page, limit) +Get the user-level list of variables which is created by current doer + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](ActionVariable.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_verification_token + +> String get_verification_token() +Get a Token to verify + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_user_secret + +> update_user_secret(secretname, body) +Create or Update a secret value in a user scope + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**secretname** | **String** | name of the secret | [required] | +**body** | Option<[**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_user_settings + +> models::UserSettings update_user_settings(body) +Update settings in current user's account + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**UserSettingsOptions**](UserSettingsOptions.md)> | | | + +### Return type + +[**models::UserSettings**](UserSettings.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_user_variable + +> update_user_variable(variablename, body) +Update a user-level variable which is created by current doer + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**variablename** | **String** | name of the variable | [required] | +**body** | Option<[**UpdateVariableOption**](UpdateVariableOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_add_email + +> Vec user_add_email(body) +Add an email addresses to the current user's account + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**CreateEmailOption**](CreateEmailOption.md)> | | | + +### Return type + +[**Vec**](Email.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_block_user + +> user_block_user(username) +Blocks a user from the doer + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of the user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_check_following + +> user_check_following(username, target) +Check if one user is following another user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of following user | [required] | +**target** | **String** | username of followed user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_check_quota + +> bool user_check_quota(subject) +Check if the authenticated user is over quota for a given subject + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**subject** | **String** | subject of the quota | [required] | + +### Return type + +**bool** + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_create_hook + +> models::Hook user_create_hook(body) +Create a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | [**CreateHookOption**](CreateHookOption.md) | | [required] | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_create_o_auth2_application + +> models::OAuth2Application user_create_o_auth2_application(body) +Creates a new OAuth2 application + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | [**CreateOAuth2ApplicationOptions**](CreateOAuth2ApplicationOptions.md) | | [required] | + +### Return type + +[**models::OAuth2Application**](OAuth2Application.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_create_token + +> models::AccessToken user_create_token(username, body) +Generate an access token for the specified user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**body** | Option<[**CreateAccessTokenOption**](CreateAccessTokenOption.md)> | | | + +### Return type + +[**models::AccessToken**](AccessToken.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_check_following + +> user_current_check_following(username) +Check whether a user is followed by the authenticated user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of followed user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_check_starring + +> user_current_check_starring(owner, repo) +Whether the authenticated is starring the repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo | [required] | +**repo** | **String** | name of the repo | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_delete_follow + +> user_current_delete_follow(username) +Unfollow a user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user to unfollow | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_delete_gpg_key + +> user_current_delete_gpg_key(id) +Remove a GPG public key from current user's account + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of key to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_delete_key + +> user_current_delete_key(id) +Delete a public key + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of key to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_delete_star + +> user_current_delete_star(owner, repo) +Unstar the given repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo to unstar | [required] | +**repo** | **String** | name of the repo to unstar | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_get_gpg_key + +> models::GpgKey user_current_get_gpg_key(id) +Get a GPG key + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of key to get | [required] | + +### Return type + +[**models::GpgKey**](GPGKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_get_key + +> models::PublicKey user_current_get_key(id) +Get a public key + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of key to get | [required] | + +### Return type + +[**models::PublicKey**](PublicKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_list_followers + +> Vec user_current_list_followers(page, limit) +List the authenticated user's followers + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_list_following + +> Vec user_current_list_following(page, limit) +List the users that the authenticated user is following + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_list_gpg_keys + +> Vec user_current_list_gpg_keys(page, limit) +List the authenticated user's GPG keys + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](GPGKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_list_keys + +> Vec user_current_list_keys(fingerprint, page, limit) +List the authenticated user's public keys + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**fingerprint** | Option<**String**> | fingerprint of the key | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](PublicKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_list_repos + +> Vec user_current_list_repos(page, limit, order_by) +List the repos that the authenticated user owns + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | +**order_by** | Option<**String**> | order the repositories | | + +### Return type + +[**Vec**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_list_starred + +> Vec user_current_list_starred(page, limit) +The repos that the authenticated user has starred + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_list_subscriptions + +> Vec user_current_list_subscriptions(page, limit) +List repositories watched by the authenticated user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_post_gpg_key + +> models::GpgKey user_current_post_gpg_key(form) +Add a GPG public key to current user's account + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**form** | Option<[**CreateGpgKeyOption**](CreateGpgKeyOption.md)> | | | + +### Return type + +[**models::GpgKey**](GPGKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_post_key + +> models::PublicKey user_current_post_key(body) +Create a public key + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**CreateKeyOption**](CreateKeyOption.md)> | | | + +### Return type + +[**models::PublicKey**](PublicKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_put_follow + +> user_current_put_follow(username) +Follow a user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user to follow | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_put_star + +> user_current_put_star(owner, repo) +Star the given repo + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**owner** | **String** | owner of the repo to star | [required] | +**repo** | **String** | name of the repo to star | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_current_tracked_times + +> Vec user_current_tracked_times(page, limit, since, before) +List the current user's tracked times + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | +**since** | Option<**String**> | Only show times updated after the given time. This is a timestamp in RFC 3339 format | | +**before** | Option<**String**> | Only show times updated before the given time. This is a timestamp in RFC 3339 format | | + +### Return type + +[**Vec**](TrackedTime.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_delete_access_token + +> user_delete_access_token(username, token) +Delete an access token from the specified user's account + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**token** | **String** | token to be deleted, identified by ID and if not available by name | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_delete_avatar + +> user_delete_avatar() +Delete avatar of the current user. It will be replaced by a default one + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_delete_email + +> user_delete_email(body) +Delete email addresses from the current user's account + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**DeleteEmailOption**](DeleteEmailOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_delete_hook + +> user_delete_hook(id) +Delete a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the hook to delete | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_delete_o_auth2_application + +> user_delete_o_auth2_application(id) +Delete an OAuth2 application + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | token to be deleted | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_edit_hook + +> models::Hook user_edit_hook(id, body) +Update a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the hook to update | [required] | +**body** | Option<[**EditHookOption**](EditHookOption.md)> | | | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_get + +> models::User user_get(username) +Get a user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user to get | [required] | + +### Return type + +[**models::User**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_get_current + +> models::User user_get_current() +Get the authenticated user + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::User**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_get_heatmap_data + +> Vec user_get_heatmap_data(username) +Get a user's heatmap + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user to get | [required] | + +### Return type + +[**Vec**](UserHeatmapData.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_get_hook + +> models::Hook user_get_hook(id) +Get a hook + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | id of the hook to get | [required] | + +### Return type + +[**models::Hook**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_get_o_auth2_application + +> models::OAuth2Application user_get_o_auth2_application(id) +Get an OAuth2 application + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | Application ID to be found | [required] | + +### Return type + +[**models::OAuth2Application**](OAuth2Application.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_get_o_auth2_applications + +> Vec user_get_o_auth2_applications(page, limit) +List the authenticated user's oauth2 applications + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](OAuth2Application.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_get_quota + +> models::QuotaInfo user_get_quota() +Get quota information for the authenticated user + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::QuotaInfo**](QuotaInfo.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_get_runner_registration_token + +> models::RegistrationToken user_get_runner_registration_token() +Get an user's actions runner registration token + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::RegistrationToken**](RegistrationToken.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_get_stop_watches + +> Vec user_get_stop_watches(page, limit) +Get list of all existing stopwatches + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](StopWatch.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_get_tokens + +> Vec user_get_tokens(username, page, limit) +List the specified user's access tokens + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](AccessToken.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_activity_feeds + +> Vec user_list_activity_feeds(username, only_performed_by, date, page, limit) +List a user's activity feeds + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**only_performed_by** | Option<**bool**> | if true, only show actions performed by the requested user | | +**date** | Option<**String**> | the date of the activities to be found | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Activity.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_blocked_users + +> Vec user_list_blocked_users(page, limit) +List the authenticated user's blocked users + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](BlockedUser.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_emails + +> Vec user_list_emails() +List all email addresses of the current user + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Vec**](Email.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_followers + +> Vec user_list_followers(username, page, limit) +List the given user's followers + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_following + +> Vec user_list_following(username, page, limit) +List the users that the given user is following + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](User.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_gpg_keys + +> Vec user_list_gpg_keys(username, page, limit) +List the given user's GPG keys + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](GPGKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_hooks + +> Vec user_list_hooks(page, limit) +List the authenticated user's webhooks + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Hook.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_keys + +> Vec user_list_keys(username, fingerprint, page, limit) +List the given user's public keys + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**fingerprint** | Option<**String**> | fingerprint of the key | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](PublicKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_quota_artifacts + +> Vec user_list_quota_artifacts(page, limit) +List the artifacts affecting the authenticated user's quota + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](QuotaUsedArtifact.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_quota_attachments + +> Vec user_list_quota_attachments(page, limit) +List the attachments affecting the authenticated user's quota + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](QuotaUsedAttachment.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_quota_packages + +> Vec user_list_quota_packages(page, limit) +List the packages affecting the authenticated user's quota + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](QuotaUsedPackage.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_repos + +> Vec user_list_repos(username, page, limit) +List the repos owned by the given user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_starred + +> Vec user_list_starred(username, page, limit) +The repos that the given user has starred + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of user | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_subscriptions + +> Vec user_list_subscriptions(username, page, limit) +List the repositories watched by a user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of the user | [required] | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Repository.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_list_teams + +> Vec user_list_teams(page, limit) +List all the teams a user belongs to + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**Vec**](Team.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_search + +> models::UserSearchResults user_search(q, uid, sort, page, limit) +Search for users + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**q** | Option<**String**> | keyword | | +**uid** | Option<**i64**> | ID of the user to search for | | +**sort** | Option<**String**> | sort order of results | | +**page** | Option<**i32**> | page number of results to return (1-based) | | +**limit** | Option<**i32**> | page size of results | | + +### Return type + +[**models::UserSearchResults**](UserSearchResults.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_search_run_jobs + +> Vec user_search_run_jobs(labels) +Search for user's action jobs according filter conditions + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**labels** | Option<**String**> | a comma separated list of run job labels to search for | | + +### Return type + +[**Vec**](ActionRunJob.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_unblock_user + +> user_unblock_user(username) +Unblocks a user from the doer + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | username of the user | [required] | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_update_avatar + +> user_update_avatar(body) +Update avatar of the current user + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**UpdateUserAvatarOption**](UpdateUserAvatarOption.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_update_o_auth2_application + +> models::OAuth2Application user_update_o_auth2_application(id, body) +Update an OAuth2 application, this includes regenerating the client secret + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **i64** | application to be updated | [required] | +**body** | [**CreateOAuth2ApplicationOptions**](CreateOAuth2ApplicationOptions.md) | | [required] | + +### Return type + +[**models::OAuth2Application**](OAuth2Application.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json, text/plain +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## user_verify_gpg_key + +> models::GpgKey user_verify_gpg_key(body) +Verify a GPG key + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | Option<[**VerifyGpgKeyOption**](VerifyGpgKeyOption.md)> | | | + +### Return type + +[**models::GpgKey**](GPGKey.md) + +### Authorization + +[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/forgejo-openapi/docs/UserHeatmapData.md b/forgejo-openapi/docs/UserHeatmapData.md new file mode 100644 index 0000000..8ad2caa --- /dev/null +++ b/forgejo-openapi/docs/UserHeatmapData.md @@ -0,0 +1,12 @@ +# UserHeatmapData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contributions** | Option<**i64**> | | [optional] +**timestamp** | Option<**i64**> | TimeStamp defines a timestamp | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/UserSearchResults.md b/forgejo-openapi/docs/UserSearchResults.md new file mode 100644 index 0000000..770d3e2 --- /dev/null +++ b/forgejo-openapi/docs/UserSearchResults.md @@ -0,0 +1,12 @@ +# UserSearchResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | Option<[**Vec**](User.md)> | | [optional] +**ok** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/UserSettings.md b/forgejo-openapi/docs/UserSettings.md new file mode 100644 index 0000000..ae25b01 --- /dev/null +++ b/forgejo-openapi/docs/UserSettings.md @@ -0,0 +1,22 @@ +# UserSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | Option<**String**> | | [optional] +**diff_view_style** | Option<**String**> | | [optional] +**enable_repo_unit_hints** | Option<**bool**> | | [optional] +**full_name** | Option<**String**> | | [optional] +**hide_activity** | Option<**bool**> | | [optional] +**hide_email** | Option<**bool**> | Privacy | [optional] +**hide_pronouns** | Option<**bool**> | | [optional] +**language** | Option<**String**> | | [optional] +**location** | Option<**String**> | | [optional] +**pronouns** | Option<**String**> | | [optional] +**theme** | Option<**String**> | | [optional] +**website** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/UserSettingsOptions.md b/forgejo-openapi/docs/UserSettingsOptions.md new file mode 100644 index 0000000..2e4a2ef --- /dev/null +++ b/forgejo-openapi/docs/UserSettingsOptions.md @@ -0,0 +1,22 @@ +# UserSettingsOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | Option<**String**> | | [optional] +**diff_view_style** | Option<**String**> | | [optional] +**enable_repo_unit_hints** | Option<**bool**> | | [optional] +**full_name** | Option<**String**> | | [optional] +**hide_activity** | Option<**bool**> | | [optional] +**hide_email** | Option<**bool**> | Privacy | [optional] +**hide_pronouns** | Option<**bool**> | | [optional] +**language** | Option<**String**> | | [optional] +**location** | Option<**String**> | | [optional] +**pronouns** | Option<**String**> | | [optional] +**theme** | Option<**String**> | | [optional] +**website** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/VerifyGpgKeyOption.md b/forgejo-openapi/docs/VerifyGpgKeyOption.md new file mode 100644 index 0000000..d33d33a --- /dev/null +++ b/forgejo-openapi/docs/VerifyGpgKeyOption.md @@ -0,0 +1,12 @@ +# VerifyGpgKeyOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**armored_signature** | Option<**String**> | | [optional] +**key_id** | **String** | An Signature for a GPG key token | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/WatchInfo.md b/forgejo-openapi/docs/WatchInfo.md new file mode 100644 index 0000000..988862e --- /dev/null +++ b/forgejo-openapi/docs/WatchInfo.md @@ -0,0 +1,16 @@ +# WatchInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | Option<**String**> | | [optional] +**ignored** | Option<**bool**> | | [optional] +**reason** | Option<**serde_json::Value**> | | [optional] +**repository_url** | Option<**String**> | | [optional] +**subscribed** | Option<**bool**> | | [optional] +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/WikiCommit.md b/forgejo-openapi/docs/WikiCommit.md new file mode 100644 index 0000000..ca978b8 --- /dev/null +++ b/forgejo-openapi/docs/WikiCommit.md @@ -0,0 +1,14 @@ +# WikiCommit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] +**commiter** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] +**message** | Option<**String**> | | [optional] +**sha** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/WikiCommitList.md b/forgejo-openapi/docs/WikiCommitList.md new file mode 100644 index 0000000..409e2d9 --- /dev/null +++ b/forgejo-openapi/docs/WikiCommitList.md @@ -0,0 +1,12 @@ +# WikiCommitList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commits** | Option<[**Vec**](WikiCommit.md)> | | [optional] +**count** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/WikiPage.md b/forgejo-openapi/docs/WikiPage.md new file mode 100644 index 0000000..43d3296 --- /dev/null +++ b/forgejo-openapi/docs/WikiPage.md @@ -0,0 +1,18 @@ +# WikiPage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit_count** | Option<**i64**> | | [optional] +**content_base64** | Option<**String**> | Page content, base64 encoded | [optional] +**footer** | Option<**String**> | | [optional] +**html_url** | Option<**String**> | | [optional] +**last_commit** | Option<[**models::WikiCommit**](WikiCommit.md)> | | [optional] +**sidebar** | Option<**String**> | | [optional] +**sub_url** | Option<**String**> | | [optional] +**title** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/docs/WikiPageMetaData.md b/forgejo-openapi/docs/WikiPageMetaData.md new file mode 100644 index 0000000..47c5806 --- /dev/null +++ b/forgejo-openapi/docs/WikiPageMetaData.md @@ -0,0 +1,14 @@ +# WikiPageMetaData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_url** | Option<**String**> | | [optional] +**last_commit** | Option<[**models::WikiCommit**](WikiCommit.md)> | | [optional] +**sub_url** | Option<**String**> | | [optional] +**title** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/forgejo-openapi/git_push.sh b/forgejo-openapi/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/forgejo-openapi/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/forgejo-openapi/src/apis/activitypub_api.rs b/forgejo-openapi/src/apis/activitypub_api.rs new file mode 100644 index 0000000..1fa7c4c --- /dev/null +++ b/forgejo-openapi/src/apis/activitypub_api.rs @@ -0,0 +1,1018 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`activitypub_instance_actor`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivitypubInstanceActorError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`activitypub_instance_actor_inbox`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivitypubInstanceActorInboxError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`activitypub_instance_actor_outbox`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivitypubInstanceActorOutboxError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`activitypub_person`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivitypubPersonError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`activitypub_person_activity`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivitypubPersonActivityError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`activitypub_person_activity_note`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivitypubPersonActivityNoteError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`activitypub_person_feed`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivitypubPersonFeedError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`activitypub_person_inbox`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivitypubPersonInboxError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`activitypub_repository`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivitypubRepositoryError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`activitypub_repository_inbox`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivitypubRepositoryInboxError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`activitypub_repository_outbox`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActivitypubRepositoryOutboxError { + UnknownValue(serde_json::Value), +} + + +pub async fn activitypub_instance_actor(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/activitypub/actor", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivityPub`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivityPub`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn activitypub_instance_actor_inbox(configuration: &configuration::Configuration, ) -> Result<(), Error> { + + let uri_str = format!("{}/activitypub/actor/inbox", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn activitypub_instance_actor_outbox(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/activitypub/actor/outbox", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn activitypub_person(configuration: &configuration::Configuration, user_id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + + let uri_str = format!("{}/activitypub/user-id/{user_id}", configuration.base_path, user_id=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivityPub`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivityPub`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn activitypub_person_activity(configuration: &configuration::Configuration, user_id: i32, activity_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_activity_id = activity_id; + + let uri_str = format!("{}/activitypub/user-id/{user_id}/activities/{activity_id}/activity", configuration.base_path, user_id=p_path_user_id, activity_id=p_path_activity_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivityPub`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivityPub`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn activitypub_person_activity_note(configuration: &configuration::Configuration, user_id: i32, activity_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_activity_id = activity_id; + + let uri_str = format!("{}/activitypub/user-id/{user_id}/activities/{activity_id}", configuration.base_path, user_id=p_path_user_id, activity_id=p_path_activity_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivityPub`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivityPub`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn activitypub_person_feed(configuration: &configuration::Configuration, user_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + + let uri_str = format!("{}/activitypub/user-id/{user_id}/outbox", configuration.base_path, user_id=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn activitypub_person_inbox(configuration: &configuration::Configuration, user_id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + + let uri_str = format!("{}/activitypub/user-id/{user_id}/inbox", configuration.base_path, user_id=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn activitypub_repository(configuration: &configuration::Configuration, repository_id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_repository_id = repository_id; + + let uri_str = format!("{}/activitypub/repository-id/{repository_id}", configuration.base_path, repository_id=p_path_repository_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivityPub`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivityPub`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn activitypub_repository_inbox(configuration: &configuration::Configuration, repository_id: i64, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_repository_id = repository_id; + let p_body_body = body; + + let uri_str = format!("{}/activitypub/repository-id/{repository_id}/inbox", configuration.base_path, repository_id=p_path_repository_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn activitypub_repository_outbox(configuration: &configuration::Configuration, repository_id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_repository_id = repository_id; + + let uri_str = format!("{}/activitypub/repository-id/{repository_id}/outbox", configuration.base_path, repository_id=p_path_repository_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/forgejo-openapi/src/apis/admin_api.rs b/forgejo-openapi/src/apis/admin_api.rs new file mode 100644 index 0000000..eb4872d --- /dev/null +++ b/forgejo-openapi/src/apis/admin_api.rs @@ -0,0 +1,3990 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`admin_add_rule_to_quota_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminAddRuleToQuotaGroupError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status409(models::ApiError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_add_user_to_quota_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminAddUserToQuotaGroupError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status409(models::ApiError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_adopt_repository`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminAdoptRepositoryError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_create_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminCreateHookError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_create_org`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminCreateOrgError { + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_create_public_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminCreatePublicKeyError { + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_create_quota_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminCreateQuotaGroupError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status409(models::ApiError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_create_quota_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminCreateQuotaRuleError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status409(models::ApiError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_create_repo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminCreateRepoError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status409(models::ApiError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_create_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminCreateUserError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_cron_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminCronListError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_cron_run`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminCronRunError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_delete_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminDeleteHookError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_delete_quota_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminDeleteQuotaGroupError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_delete_quota_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminDeleteQuotaRuleError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_delete_unadopted_repository`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminDeleteUnadoptedRepositoryError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_delete_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminDeleteUserError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_delete_user_emails`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminDeleteUserEmailsError { + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_delete_user_public_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminDeleteUserPublicKeyError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_edit_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminEditHookError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_edit_quota_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminEditQuotaRuleError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_edit_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminEditUserError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_get_all_emails`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminGetAllEmailsError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_get_all_orgs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminGetAllOrgsError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_get_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminGetHookError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_get_quota_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminGetQuotaGroupError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_get_quota_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminGetQuotaRuleError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_get_runner_registration_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminGetRunnerRegistrationTokenError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_get_user_quota`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminGetUserQuotaError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_list_hooks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminListHooksError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_list_quota_groups`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminListQuotaGroupsError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_list_quota_rules`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminListQuotaRulesError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_list_user_emails`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminListUserEmailsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_list_users_in_quota_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminListUsersInQuotaGroupError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_remove_rule_from_quota_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminRemoveRuleFromQuotaGroupError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_remove_user_from_quota_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminRemoveUserFromQuotaGroupError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_rename_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminRenameUserError { + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_search_emails`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminSearchEmailsError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_search_run_jobs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminSearchRunJobsError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_search_users`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminSearchUsersError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_set_user_quota_groups`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminSetUserQuotaGroupsError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`admin_unadopted_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AdminUnadoptedListError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + + +pub async fn admin_add_rule_to_quota_group(configuration: &configuration::Configuration, quotagroup: &str, quotarule: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_quotagroup = quotagroup; + let p_path_quotarule = quotarule; + + let uri_str = format!("{}/admin/quota/groups/{quotagroup}/rules/{quotarule}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup), quotarule=crate::apis::urlencode(p_path_quotarule)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_add_user_to_quota_group(configuration: &configuration::Configuration, quotagroup: &str, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_quotagroup = quotagroup; + let p_path_username = username; + + let uri_str = format!("{}/admin/quota/groups/{quotagroup}/users/{username}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup), username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_adopt_repository(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/admin/unadopted/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_create_hook(configuration: &configuration::Configuration, body: models::CreateHookOption) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/admin/hooks", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_create_org(configuration: &configuration::Configuration, username: &str, organization: models::CreateOrgOption) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_body_organization = organization; + + let uri_str = format!("{}/admin/users/{username}/orgs", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_organization); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Organization`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Organization`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_create_public_key(configuration: &configuration::Configuration, username: &str, key: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_body_key = key; + + let uri_str = format!("{}/admin/users/{username}/keys", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_key); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PublicKey`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PublicKey`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_create_quota_group(configuration: &configuration::Configuration, group: models::CreateQuotaGroupOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_group = group; + + let uri_str = format!("{}/admin/quota/groups", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_group); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaGroup`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaGroup`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_create_quota_rule(configuration: &configuration::Configuration, rule: models::CreateQuotaRuleOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_rule = rule; + + let uri_str = format!("{}/admin/quota/rules", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_rule); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaRuleInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaRuleInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_create_repo(configuration: &configuration::Configuration, username: &str, repository: models::CreateRepoOption) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_body_repository = repository; + + let uri_str = format!("{}/admin/users/{username}/repos", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_repository); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_create_user(configuration: &configuration::Configuration, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/admin/users", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_cron_list(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/admin/cron", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Cron>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Cron>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_cron_run(configuration: &configuration::Configuration, task: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_task = task; + + let uri_str = format!("{}/admin/cron/{task}", configuration.base_path, task=crate::apis::urlencode(p_path_task)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_delete_hook(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/admin/hooks/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_delete_quota_group(configuration: &configuration::Configuration, quotagroup: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_quotagroup = quotagroup; + + let uri_str = format!("{}/admin/quota/groups/{quotagroup}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_delete_quota_rule(configuration: &configuration::Configuration, quotarule: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_quotarule = quotarule; + + let uri_str = format!("{}/admin/quota/rules/{quotarule}", configuration.base_path, quotarule=crate::apis::urlencode(p_path_quotarule)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_delete_unadopted_repository(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/admin/unadopted/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_delete_user(configuration: &configuration::Configuration, username: &str, purge: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_query_purge = purge; + + let uri_str = format!("{}/admin/users/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref param_value) = p_query_purge { + req_builder = req_builder.query(&[("purge", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_delete_user_emails(configuration: &configuration::Configuration, username: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_body_body = body; + + let uri_str = format!("{}/admin/users/{username}/emails", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_delete_user_public_key(configuration: &configuration::Configuration, username: &str, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_path_id = id; + + let uri_str = format!("{}/admin/users/{username}/keys/{id}", configuration.base_path, username=crate::apis::urlencode(p_path_username), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_edit_hook(configuration: &configuration::Configuration, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/admin/hooks/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_edit_quota_rule(configuration: &configuration::Configuration, quotarule: &str, rule: models::EditQuotaRuleOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_quotarule = quotarule; + let p_body_rule = rule; + + let uri_str = format!("{}/admin/quota/rules/{quotarule}", configuration.base_path, quotarule=crate::apis::urlencode(p_path_quotarule)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_rule); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaRuleInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaRuleInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_edit_user(configuration: &configuration::Configuration, username: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_body_body = body; + + let uri_str = format!("{}/admin/users/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_get_all_emails(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/admin/emails", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Email>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Email>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_get_all_orgs(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/admin/orgs", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Organization>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Organization>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_get_hook(configuration: &configuration::Configuration, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/admin/hooks/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_get_quota_group(configuration: &configuration::Configuration, quotagroup: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_quotagroup = quotagroup; + + let uri_str = format!("{}/admin/quota/groups/{quotagroup}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaGroup`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaGroup`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_get_quota_rule(configuration: &configuration::Configuration, quotarule: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_quotarule = quotarule; + + let uri_str = format!("{}/admin/quota/rules/{quotarule}", configuration.base_path, quotarule=crate::apis::urlencode(p_path_quotarule)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaRuleInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaRuleInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_get_runner_registration_token(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/admin/runners/registration-token", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RegistrationToken`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RegistrationToken`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_get_user_quota(configuration: &configuration::Configuration, username: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + + let uri_str = format!("{}/admin/users/{username}/quota", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_list_hooks(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/admin/hooks", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Hook>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Hook>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_list_quota_groups(configuration: &configuration::Configuration, ) -> Result, Error> { + + let uri_str = format!("{}/admin/quota/groups", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaGroup>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaGroup>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_list_quota_rules(configuration: &configuration::Configuration, ) -> Result, Error> { + + let uri_str = format!("{}/admin/quota/rules", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaRuleInfo>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaRuleInfo>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_list_user_emails(configuration: &configuration::Configuration, username: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + + let uri_str = format!("{}/admin/users/{username}/emails", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Email>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Email>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_list_users_in_quota_group(configuration: &configuration::Configuration, quotagroup: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_quotagroup = quotagroup; + + let uri_str = format!("{}/admin/quota/groups/{quotagroup}/users", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_remove_rule_from_quota_group(configuration: &configuration::Configuration, quotagroup: &str, quotarule: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_quotagroup = quotagroup; + let p_path_quotarule = quotarule; + + let uri_str = format!("{}/admin/quota/groups/{quotagroup}/rules/{quotarule}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup), quotarule=crate::apis::urlencode(p_path_quotarule)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_remove_user_from_quota_group(configuration: &configuration::Configuration, quotagroup: &str, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_quotagroup = quotagroup; + let p_path_username = username; + + let uri_str = format!("{}/admin/quota/groups/{quotagroup}/users/{username}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup), username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_rename_user(configuration: &configuration::Configuration, username: &str, body: models::RenameUserOption) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_body_body = body; + + let uri_str = format!("{}/admin/users/{username}/rename", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_search_emails(configuration: &configuration::Configuration, q: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_q = q; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/admin/emails/search", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_q { + req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Email>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Email>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_search_run_jobs(configuration: &configuration::Configuration, labels: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_labels = labels; + + let uri_str = format!("{}/admin/runners/jobs", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_labels { + req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionRunJob>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionRunJob>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_search_users(configuration: &configuration::Configuration, source_id: Option, login_name: Option<&str>, sort: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_source_id = source_id; + let p_query_login_name = login_name; + let p_query_sort = sort; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/admin/users", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_source_id { + req_builder = req_builder.query(&[("source_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_login_name { + req_builder = req_builder.query(&[("login_name", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_sort { + req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_set_user_quota_groups(configuration: &configuration::Configuration, username: &str, groups: models::SetUserQuotaGroupsOptions) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_body_groups = groups; + + let uri_str = format!("{}/admin/users/{username}/quota/groups", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_groups); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn admin_unadopted_list(configuration: &configuration::Configuration, page: Option, limit: Option, pattern: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + let p_query_pattern = pattern; + + let uri_str = format!("{}/admin/unadopted", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_pattern { + req_builder = req_builder.query(&[("pattern", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/forgejo-openapi/src/apis/configuration.rs b/forgejo-openapi/src/apis/configuration.rs new file mode 100644 index 0000000..78bb985 --- /dev/null +++ b/forgejo-openapi/src/apis/configuration.rs @@ -0,0 +1,51 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + + +#[derive(Debug, Clone)] +pub struct Configuration { + pub base_path: String, + pub user_agent: Option, + pub client: reqwest::Client, + pub basic_auth: Option, + pub oauth_access_token: Option, + pub bearer_access_token: Option, + pub api_key: Option, +} + +pub type BasicAuth = (String, Option); + +#[derive(Debug, Clone)] +pub struct ApiKey { + pub prefix: Option, + pub key: String, +} + + +impl Configuration { + pub fn new() -> Configuration { + Configuration::default() + } +} + +impl Default for Configuration { + fn default() -> Self { + Configuration { + base_path: "/api/v1".to_owned(), + user_agent: Some("OpenAPI-Generator/14.0.0/rust".to_owned()), + client: reqwest::Client::new(), + basic_auth: None, + oauth_access_token: None, + bearer_access_token: None, + api_key: None, + } + } +} diff --git a/forgejo-openapi/src/apis/issue_api.rs b/forgejo-openapi/src/apis/issue_api.rs new file mode 100644 index 0000000..9cb81b0 --- /dev/null +++ b/forgejo-openapi/src/apis/issue_api.rs @@ -0,0 +1,6690 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; +use tokio::fs::File as TokioFile; +use tokio_util::codec::{BytesCodec, FramedRead}; + + +/// struct for typed errors of method [`issue_add_label`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueAddLabelError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_add_subscription`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueAddSubscriptionError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_add_time`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueAddTimeError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_check_subscription`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueCheckSubscriptionError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_clear_labels`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueClearLabelsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_create_comment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueCreateCommentError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status423(models::ApiRepoArchivedError), + Status500(models::ApiInternalServerError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_create_issue`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueCreateIssueError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status412(models::ApiError), + Status422(models::ApiValidationError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_create_issue_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueCreateIssueAttachmentError { + Status400(models::ApiError), + Status404(models::ApiError), + Status413(), + Status422(models::ApiValidationError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_create_issue_blocking`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueCreateIssueBlockingError { + Status404(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_create_issue_comment_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueCreateIssueCommentAttachmentError { + Status400(models::ApiError), + Status404(models::ApiError), + Status413(), + Status422(models::ApiValidationError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_create_issue_dependencies`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueCreateIssueDependenciesError { + Status404(), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_create_label`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueCreateLabelError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_create_milestone`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueCreateMilestoneError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete_comment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteCommentError { + Status403(models::ApiForbiddenError), + Status500(models::ApiInternalServerError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete_comment_deprecated`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteCommentDeprecatedError { + Status403(models::ApiForbiddenError), + Status500(models::ApiInternalServerError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete_comment_reaction`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteCommentReactionError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete_issue_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteIssueAttachmentError { + Status404(models::ApiError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete_issue_comment_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteIssueCommentAttachmentError { + Status404(models::ApiError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete_issue_reaction`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteIssueReactionError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete_label`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteLabelError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete_milestone`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteMilestoneError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete_stop_watch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteStopWatchError { + Status403(), + Status404(models::ApiNotFound), + Status409(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete_subscription`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteSubscriptionError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_delete_time`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueDeleteTimeError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_edit_comment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueEditCommentError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status423(models::ApiRepoArchivedError), + Status500(models::ApiInternalServerError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_edit_comment_deprecated`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueEditCommentDeprecatedError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status500(models::ApiInternalServerError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_edit_issue`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueEditIssueError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status412(models::ApiError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_edit_issue_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueEditIssueAttachmentError { + Status404(models::ApiError), + Status413(), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_edit_issue_comment_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueEditIssueCommentAttachmentError { + Status404(models::ApiError), + Status413(), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_edit_issue_deadline`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueEditIssueDeadlineError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_edit_label`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueEditLabelError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_edit_milestone`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueEditMilestoneError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_comment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetCommentError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status500(models::ApiInternalServerError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_comment_reactions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetCommentReactionsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_comments`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetCommentsError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + Status500(models::ApiInternalServerError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_comments_and_timeline`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetCommentsAndTimelineError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + Status500(models::ApiInternalServerError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_issue`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetIssueError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_issue_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetIssueAttachmentError { + Status404(models::ApiError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_issue_comment_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetIssueCommentAttachmentError { + Status404(models::ApiError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_issue_reactions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetIssueReactionsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_label`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetLabelError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_labels`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetLabelsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_milestone`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetMilestoneError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_milestones_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetMilestonesListError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_get_repo_comments`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueGetRepoCommentsError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + Status500(models::ApiInternalServerError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_list_blocks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueListBlocksError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_list_issue_attachments`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueListIssueAttachmentsError { + Status404(models::ApiError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_list_issue_comment_attachments`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueListIssueCommentAttachmentsError { + Status404(models::ApiError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_list_issue_dependencies`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueListIssueDependenciesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_list_issues`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueListIssuesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_list_labels`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueListLabelsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_post_comment_reaction`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssuePostCommentReactionError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_post_issue_reaction`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssuePostIssueReactionError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_remove_issue_blocking`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueRemoveIssueBlockingError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_remove_issue_dependencies`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueRemoveIssueDependenciesError { + Status404(models::ApiNotFound), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_remove_label`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueRemoveLabelError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_replace_labels`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueReplaceLabelsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_reset_time`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueResetTimeError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_search_issues`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueSearchIssuesError { + Status400(models::ApiError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_start_stop_watch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueStartStopWatchError { + Status403(), + Status404(models::ApiNotFound), + Status409(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_stop_stop_watch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueStopStopWatchError { + Status403(), + Status404(models::ApiNotFound), + Status409(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_subscriptions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueSubscriptionsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`issue_tracked_times`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IssueTrackedTimesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`move_issue_pin`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MoveIssuePinError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`pin_issue`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PinIssueError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`unpin_issue`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UnpinIssueError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + + +pub async fn issue_add_label(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Label>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Label>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_add_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, user: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_user = user; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, user=crate::apis::urlencode(p_path_user)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_add_time(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/times", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TrackedTime`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TrackedTime`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_check_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/subscriptions/check", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WatchInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WatchInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_clear_labels(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_create_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/comments", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Comment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Comment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_create_issue(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_create_issue_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, attachment: std::path::PathBuf, name: Option<&str>, updated_at: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_form_attachment = attachment; + let p_query_name = name; + let p_query_updated_at = updated_at; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_query_name { + req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_updated_at { + req_builder = req_builder.query(&[("updated_at", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + let mut multipart_form = reqwest::multipart::Form::new(); + let file = TokioFile::open(&p_form_attachment).await?; + let stream = FramedRead::new(file, BytesCodec::new()); + let file_name = p_form_attachment.file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_default(); + let file_part = reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)).file_name(file_name); + multipart_form = multipart_form.part("attachment", file_part); + req_builder = req_builder.multipart(multipart_form); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_create_issue_blocking(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/blocks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_create_issue_comment_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment: std::path::PathBuf, name: Option<&str>, updated_at: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_form_attachment = attachment; + let p_query_name = name; + let p_query_updated_at = updated_at; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_query_name { + req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_updated_at { + req_builder = req_builder.query(&[("updated_at", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + let mut multipart_form = reqwest::multipart::Form::new(); + let file = TokioFile::open(&p_form_attachment).await?; + let stream = FramedRead::new(file, BytesCodec::new()); + let file_name = p_form_attachment.file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_default(); + let file_part = reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)).file_name(file_name); + multipart_form = multipart_form.part("attachment", file_part); + req_builder = req_builder.multipart(multipart_form); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_create_issue_dependencies(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/dependencies", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_create_label(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_create_milestone(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/milestones", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Milestone`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Milestone`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_delete(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_delete_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +#[deprecated] +pub async fn issue_delete_comment_deprecated(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i32, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/comments/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_delete_comment_reaction(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, content: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_body_content = content; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_content); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_delete_issue_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, attachment_id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_attachment_id = attachment_id; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, attachment_id=p_path_attachment_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_delete_issue_comment_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_path_attachment_id = attachment_id; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_delete_issue_reaction(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, content: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_content = content; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_content); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_delete_label(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/labels/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_delete_milestone(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/milestones/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_delete_stop_watch(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/stopwatch/delete", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_delete_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, user: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_user = user; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, user=crate::apis::urlencode(p_path_user)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_delete_time(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/times/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_edit_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Comment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Comment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +#[deprecated] +pub async fn issue_edit_comment_deprecated(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i32, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/comments/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Comment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Comment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_edit_issue(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_edit_issue_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, attachment_id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_attachment_id = attachment_id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, attachment_id=p_path_attachment_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_edit_issue_comment_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_path_attachment_id = attachment_id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_edit_issue_deadline(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/deadline", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IssueDeadline`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IssueDeadline`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_edit_label(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/labels/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_edit_milestone(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/milestones/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Milestone`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Milestone`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Comment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Comment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_comment_reactions(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Reaction>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Reaction>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_comments(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, since: Option, before: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_query_since = since; + let p_query_before = before; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/comments", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_since { + req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Comment>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Comment>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_comments_and_timeline(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, since: Option, page: Option, limit: Option, before: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_query_since = since; + let p_query_page = page; + let p_query_limit = limit; + let p_query_before = before; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/timeline", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_since { + req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TimelineComment>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TimelineComment>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_issue(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_issue_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, attachment_id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_attachment_id = attachment_id; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, attachment_id=p_path_attachment_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_issue_comment_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_path_attachment_id = attachment_id; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_issue_reactions(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Reaction>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Reaction>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_label(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/labels/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_labels(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Label>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Label>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_milestone(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/milestones/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Milestone`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Milestone`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_milestones_list(configuration: &configuration::Configuration, owner: &str, repo: &str, state: Option<&str>, name: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_state = state; + let p_query_name = name; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/milestones", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_state { + req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_name { + req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Milestone>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Milestone>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_get_repo_comments(configuration: &configuration::Configuration, owner: &str, repo: &str, since: Option, before: Option, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_since = since; + let p_query_before = before; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_since { + req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Comment>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Comment>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_list_blocks(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/blocks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Issue>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Issue>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_list_issue_attachments(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Attachment>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Attachment>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_list_issue_comment_attachments(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Attachment>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Attachment>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_list_issue_dependencies(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/dependencies", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Issue>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Issue>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_list_issues(configuration: &configuration::Configuration, owner: &str, repo: &str, state: Option<&str>, labels: Option<&str>, q: Option<&str>, r#type: Option<&str>, milestones: Option<&str>, since: Option, before: Option, created_by: Option<&str>, assigned_by: Option<&str>, mentioned_by: Option<&str>, page: Option, limit: Option, sort: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_state = state; + let p_query_labels = labels; + let p_query_q = q; + let p_query_type = r#type; + let p_query_milestones = milestones; + let p_query_since = since; + let p_query_before = before; + let p_query_created_by = created_by; + let p_query_assigned_by = assigned_by; + let p_query_mentioned_by = mentioned_by; + let p_query_page = page; + let p_query_limit = limit; + let p_query_sort = sort; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_state { + req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_labels { + req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_q { + req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_type { + req_builder = req_builder.query(&[("type", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_milestones { + req_builder = req_builder.query(&[("milestones", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_since { + req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_created_by { + req_builder = req_builder.query(&[("created_by", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_assigned_by { + req_builder = req_builder.query(&[("assigned_by", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_mentioned_by { + req_builder = req_builder.query(&[("mentioned_by", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_sort { + req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Issue>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Issue>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_list_labels(configuration: &configuration::Configuration, owner: &str, repo: &str, sort: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_sort = sort; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_sort { + req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Label>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Label>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_post_comment_reaction(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, content: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_body_content = content; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_content); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Reaction`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Reaction`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_post_issue_reaction(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, content: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_content = content; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_content); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Reaction`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Reaction`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_remove_issue_blocking(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/blocks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_remove_issue_dependencies(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/dependencies", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_remove_label(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, identifier: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_identifier = identifier; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/labels/{identifier}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, identifier=crate::apis::urlencode(p_path_identifier)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_replace_labels(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Label>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Label>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_reset_time(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/times", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_search_issues(configuration: &configuration::Configuration, state: Option<&str>, labels: Option<&str>, milestones: Option<&str>, q: Option<&str>, priority_repo_id: Option, r#type: Option<&str>, since: Option, before: Option, assigned: Option, created: Option, mentioned: Option, review_requested: Option, reviewed: Option, owner: Option<&str>, team: Option<&str>, page: Option, limit: Option, sort: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_state = state; + let p_query_labels = labels; + let p_query_milestones = milestones; + let p_query_q = q; + let p_query_priority_repo_id = priority_repo_id; + let p_query_type = r#type; + let p_query_since = since; + let p_query_before = before; + let p_query_assigned = assigned; + let p_query_created = created; + let p_query_mentioned = mentioned; + let p_query_review_requested = review_requested; + let p_query_reviewed = reviewed; + let p_query_owner = owner; + let p_query_team = team; + let p_query_page = page; + let p_query_limit = limit; + let p_query_sort = sort; + + let uri_str = format!("{}/repos/issues/search", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_state { + req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_labels { + req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_milestones { + req_builder = req_builder.query(&[("milestones", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_q { + req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_priority_repo_id { + req_builder = req_builder.query(&[("priority_repo_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_type { + req_builder = req_builder.query(&[("type", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_since { + req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_assigned { + req_builder = req_builder.query(&[("assigned", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_created { + req_builder = req_builder.query(&[("created", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_mentioned { + req_builder = req_builder.query(&[("mentioned", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_review_requested { + req_builder = req_builder.query(&[("review_requested", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_reviewed { + req_builder = req_builder.query(&[("reviewed", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_owner { + req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_team { + req_builder = req_builder.query(&[("team", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_sort { + req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Issue>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Issue>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_start_stop_watch(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/stopwatch/start", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_stop_stop_watch(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/stopwatch/stop", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_subscriptions(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/subscriptions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn issue_tracked_times(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, user: Option<&str>, since: Option, before: Option, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_query_user = user; + let p_query_since = since; + let p_query_before = before; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/times", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_user { + req_builder = req_builder.query(&[("user", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_since { + req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TrackedTime>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TrackedTime>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn move_issue_pin(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, position: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_position = position; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/pin/{position}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, position=p_path_position); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn pin_issue(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/pin", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn unpin_issue(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/pin", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/forgejo-openapi/src/apis/miscellaneous_api.rs b/forgejo-openapi/src/apis/miscellaneous_api.rs new file mode 100644 index 0000000..73db474 --- /dev/null +++ b/forgejo-openapi/src/apis/miscellaneous_api.rs @@ -0,0 +1,1236 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`get_gitignore_template_info`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGitignoreTemplateInfoError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_label_template_info`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLabelTemplateInfoError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_license_template_info`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLicenseTemplateInfoError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_node_info`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetNodeInfoError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_signing_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSigningKeyError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_ssh_signing_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSshSigningKeyError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_version`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetVersionError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_gitignores_templates`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGitignoresTemplatesError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_label_templates`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListLabelTemplatesError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_license_templates`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListLicenseTemplatesError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`render_markdown`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RenderMarkdownError { + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`render_markdown_raw`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RenderMarkdownRawError { + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`render_markup`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RenderMarkupError { + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + + +pub async fn get_gitignore_template_info(configuration: &configuration::Configuration, name: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_name = name; + + let uri_str = format!("{}/gitignore/templates/{name}", configuration.base_path, name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GitignoreTemplateInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GitignoreTemplateInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_label_template_info(configuration: &configuration::Configuration, name: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_name = name; + + let uri_str = format!("{}/label/templates/{name}", configuration.base_path, name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::LabelTemplate>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::LabelTemplate>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_license_template_info(configuration: &configuration::Configuration, name: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_name = name; + + let uri_str = format!("{}/licenses/{name}", configuration.base_path, name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::LicenseTemplateInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::LicenseTemplateInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_node_info(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/nodeinfo", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_signing_key(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/signing-key.gpg", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Ok(content), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_ssh_signing_key(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/signing-key.ssh", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Ok(content), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_version(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/version", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServerVersion`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServerVersion`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn list_gitignores_templates(configuration: &configuration::Configuration, ) -> Result, Error> { + + let uri_str = format!("{}/gitignore/templates", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn list_label_templates(configuration: &configuration::Configuration, ) -> Result, Error> { + + let uri_str = format!("{}/label/templates", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn list_license_templates(configuration: &configuration::Configuration, ) -> Result, Error> { + + let uri_str = format!("{}/licenses", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::LicensesTemplateListEntry>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::LicensesTemplateListEntry>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn render_markdown(configuration: &configuration::Configuration, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/markdown", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `String`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn render_markdown_raw(configuration: &configuration::Configuration, body: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/markdown/raw", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `String`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn render_markup(configuration: &configuration::Configuration, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/markup", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `String`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/forgejo-openapi/src/apis/mod.rs b/forgejo-openapi/src/apis/mod.rs new file mode 100644 index 0000000..8e80732 --- /dev/null +++ b/forgejo-openapi/src/apis/mod.rs @@ -0,0 +1,125 @@ +use std::error; +use std::fmt; + +#[derive(Debug, Clone)] +pub struct ResponseContent { + pub status: reqwest::StatusCode, + pub content: String, + pub entity: Option, +} + +#[derive(Debug)] +pub enum Error { + Reqwest(reqwest::Error), + Serde(serde_json::Error), + Io(std::io::Error), + ResponseError(ResponseContent), +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (module, e) = match self { + Error::Reqwest(e) => ("reqwest", e.to_string()), + Error::Serde(e) => ("serde", e.to_string()), + Error::Io(e) => ("IO", e.to_string()), + Error::ResponseError(e) => ("response", format!("status code {}", e.status)), + }; + write!(f, "error in {}: {}", module, e) + } +} + +impl error::Error for Error { + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + Some(match self { + Error::Reqwest(e) => e, + Error::Serde(e) => e, + Error::Io(e) => e, + Error::ResponseError(_) => return None, + }) + } +} + +impl From for Error { + fn from(e: reqwest::Error) -> Self { + Error::Reqwest(e) + } +} + +impl From for Error { + fn from(e: serde_json::Error) -> Self { + Error::Serde(e) + } +} + +impl From for Error { + fn from(e: std::io::Error) -> Self { + Error::Io(e) + } +} + +pub fn urlencode>(s: T) -> String { + ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() +} + +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + +/// Internal use only +/// A content type supported by this client. +#[allow(dead_code)] +enum ContentType { + Json, + Text, + Unsupported(String) +} + +impl From<&str> for ContentType { + fn from(content_type: &str) -> Self { + if content_type.starts_with("application") && content_type.contains("json") { + return Self::Json; + } else if content_type.starts_with("text/plain") { + return Self::Text; + } else { + return Self::Unsupported(content_type.to_string()); + } + } +} + +pub mod activitypub_api; +pub mod admin_api; +pub mod issue_api; +pub mod miscellaneous_api; +pub mod notification_api; +pub mod organization_api; +pub mod package_api; +pub mod repository_api; +pub mod settings_api; +pub mod user_api; + +pub mod configuration; diff --git a/forgejo-openapi/src/apis/notification_api.rs b/forgejo-openapi/src/apis/notification_api.rs new file mode 100644 index 0000000..a90f309 --- /dev/null +++ b/forgejo-openapi/src/apis/notification_api.rs @@ -0,0 +1,788 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`notify_get_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotifyGetListError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`notify_get_repo_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotifyGetRepoListError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`notify_get_thread`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotifyGetThreadError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`notify_new_available`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotifyNewAvailableError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`notify_read_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotifyReadListError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`notify_read_repo_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotifyReadRepoListError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`notify_read_thread`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotifyReadThreadError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + + +pub async fn notify_get_list(configuration: &configuration::Configuration, all: Option, status_types: Option>, subject_type: Option>, since: Option, before: Option, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_all = all; + let p_query_status_types = status_types; + let p_query_subject_type = subject_type; + let p_query_since = since; + let p_query_before = before; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/notifications", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_all { + req_builder = req_builder.query(&[("all", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_status_types { + req_builder = match "multi" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("status-types".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("status-types", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref param_value) = p_query_subject_type { + req_builder = match "multi" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("subject-type".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("subject-type", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref param_value) = p_query_since { + req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::NotificationThread>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::NotificationThread>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn notify_get_repo_list(configuration: &configuration::Configuration, owner: &str, repo: &str, all: Option, status_types: Option>, subject_type: Option>, since: Option, before: Option, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_all = all; + let p_query_status_types = status_types; + let p_query_subject_type = subject_type; + let p_query_since = since; + let p_query_before = before; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/notifications", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_all { + req_builder = req_builder.query(&[("all", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_status_types { + req_builder = match "multi" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("status-types".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("status-types", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref param_value) = p_query_subject_type { + req_builder = match "multi" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("subject-type".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("subject-type", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref param_value) = p_query_since { + req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::NotificationThread>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::NotificationThread>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn notify_get_thread(configuration: &configuration::Configuration, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/notifications/threads/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NotificationThread`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NotificationThread`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn notify_new_available(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/notifications/new", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NotificationCount`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NotificationCount`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn notify_read_list(configuration: &configuration::Configuration, last_read_at: Option, all: Option, status_types: Option>, to_status: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_last_read_at = last_read_at; + let p_query_all = all; + let p_query_status_types = status_types; + let p_query_to_status = to_status; + + let uri_str = format!("{}/notifications", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref param_value) = p_query_last_read_at { + req_builder = req_builder.query(&[("last_read_at", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_all { + req_builder = req_builder.query(&[("all", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_status_types { + req_builder = match "multi" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("status-types".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("status-types", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref param_value) = p_query_to_status { + req_builder = req_builder.query(&[("to-status", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::NotificationThread>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::NotificationThread>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn notify_read_repo_list(configuration: &configuration::Configuration, owner: &str, repo: &str, all: Option, status_types: Option>, to_status: Option<&str>, last_read_at: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_all = all; + let p_query_status_types = status_types; + let p_query_to_status = to_status; + let p_query_last_read_at = last_read_at; + + let uri_str = format!("{}/repos/{owner}/{repo}/notifications", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref param_value) = p_query_all { + req_builder = req_builder.query(&[("all", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_status_types { + req_builder = match "multi" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("status-types".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("status-types", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref param_value) = p_query_to_status { + req_builder = req_builder.query(&[("to-status", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_last_read_at { + req_builder = req_builder.query(&[("last_read_at", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::NotificationThread>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::NotificationThread>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn notify_read_thread(configuration: &configuration::Configuration, id: i64, to_status: Option<&str>) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_query_to_status = to_status; + + let uri_str = format!("{}/notifications/threads/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref param_value) = p_query_to_status { + req_builder = req_builder.query(&[("to-status", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NotificationThread`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NotificationThread`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/forgejo-openapi/src/apis/organization_api.rs b/forgejo-openapi/src/apis/organization_api.rs new file mode 100644 index 0000000..150b4f4 --- /dev/null +++ b/forgejo-openapi/src/apis/organization_api.rs @@ -0,0 +1,6213 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`create_org_repo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateOrgRepoError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_org_repo_deprecated`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateOrgRepoDeprecatedError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_org_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateOrgVariableError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_org_secret`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteOrgSecretError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_org_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteOrgVariableError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_org_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOrgVariableError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_org_variables_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOrgVariablesListError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_add_team_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgAddTeamMemberError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_add_team_repository`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgAddTeamRepositoryError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_block_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgBlockUserError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_check_quota`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgCheckQuotaError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_conceal_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgConcealMemberError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_create`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgCreateError { + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_create_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgCreateHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_create_label`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgCreateLabelError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_create_team`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgCreateTeamError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgDeleteError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_delete_avatar`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgDeleteAvatarError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_delete_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgDeleteHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_delete_label`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgDeleteLabelError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_delete_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgDeleteMemberError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_delete_team`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgDeleteTeamError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_edit`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgEditError { + Status404(models::ApiNotFound), + Status422(models::ApiError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_edit_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgEditHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_edit_label`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgEditLabelError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_edit_team`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgEditTeamError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgGetError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_get_all`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgGetAllError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_get_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgGetHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_get_label`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgGetLabelError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_get_quota`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgGetQuotaError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_get_runner_registration_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgGetRunnerRegistrationTokenError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_get_team`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgGetTeamError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_get_user_permissions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgGetUserPermissionsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_is_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgIsMemberError { + Status404(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_is_public_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgIsPublicMemberError { + Status404(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_actions_secrets`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListActionsSecretsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_activity_feeds`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListActivityFeedsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_blocked_users`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListBlockedUsersError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_current_user_orgs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListCurrentUserOrgsError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_hooks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListHooksError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_labels`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListLabelsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListMembersError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_public_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListPublicMembersError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_quota_artifacts`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListQuotaArtifactsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_quota_attachments`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListQuotaAttachmentsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_quota_packages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListQuotaPackagesError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_repos`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListReposError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_team_activity_feeds`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListTeamActivityFeedsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_team_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListTeamMemberError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_team_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListTeamMembersError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_team_repo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListTeamRepoError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_team_repos`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListTeamReposError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_teams`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListTeamsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_list_user_orgs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgListUserOrgsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_publicize_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgPublicizeMemberError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_remove_team_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgRemoveTeamMemberError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_remove_team_repository`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgRemoveTeamRepositoryError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_search_run_jobs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgSearchRunJobsError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_unblock_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgUnblockUserError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`org_update_avatar`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrgUpdateAvatarError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`rename_org`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RenameOrgError { + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`team_search`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TeamSearchError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_org_secret`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateOrgSecretError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_org_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateOrgVariableError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + + +pub async fn create_org_repo(configuration: &configuration::Configuration, org: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}/repos", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +#[deprecated] +pub async fn create_org_repo_deprecated(configuration: &configuration::Configuration, org: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_body_body = body; + + let uri_str = format!("{}/org/{org}/repos", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_org_variable(configuration: &configuration::Configuration, org: &str, variablename: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_variablename = variablename; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}/actions/variables/{variablename}", configuration.base_path, org=crate::apis::urlencode(p_path_org), variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_org_secret(configuration: &configuration::Configuration, org: &str, secretname: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_secretname = secretname; + + let uri_str = format!("{}/orgs/{org}/actions/secrets/{secretname}", configuration.base_path, org=crate::apis::urlencode(p_path_org), secretname=crate::apis::urlencode(p_path_secretname)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_org_variable(configuration: &configuration::Configuration, org: &str, variablename: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_variablename = variablename; + + let uri_str = format!("{}/orgs/{org}/actions/variables/{variablename}", configuration.base_path, org=crate::apis::urlencode(p_path_org), variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_org_variable(configuration: &configuration::Configuration, org: &str, variablename: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_variablename = variablename; + + let uri_str = format!("{}/orgs/{org}/actions/variables/{variablename}", configuration.base_path, org=crate::apis::urlencode(p_path_org), variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActionVariable`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActionVariable`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_org_variables_list(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/actions/variables", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionVariable>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionVariable>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_add_team_member(configuration: &configuration::Configuration, id: i64, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_path_username = username; + + let uri_str = format!("{}/teams/{id}/members/{username}", configuration.base_path, id=p_path_id, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_add_team_repository(configuration: &configuration::Configuration, id: i64, org: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_path_org = org; + let p_path_repo = repo; + + let uri_str = format!("{}/teams/{id}/repos/{org}/{repo}", configuration.base_path, id=p_path_id, org=crate::apis::urlencode(p_path_org), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_block_user(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_username = username; + + let uri_str = format!("{}/orgs/{org}/block/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_check_quota(configuration: &configuration::Configuration, org: &str, subject: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_subject = subject; + + let uri_str = format!("{}/orgs/{org}/quota/check", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("subject", &p_query_subject.to_string())]); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `bool`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `bool`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_conceal_member(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_username = username; + + let uri_str = format!("{}/orgs/{org}/public_members/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_create(configuration: &configuration::Configuration, organization: models::CreateOrgOption) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_organization = organization; + + let uri_str = format!("{}/orgs", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_organization); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Organization`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Organization`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_create_hook(configuration: &configuration::Configuration, org: &str, body: models::CreateHookOption) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}/hooks", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_create_label(configuration: &configuration::Configuration, org: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}/labels", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_create_team(configuration: &configuration::Configuration, org: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}/teams", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Team`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Team`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_delete(configuration: &configuration::Configuration, org: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + + let uri_str = format!("{}/orgs/{org}", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_delete_avatar(configuration: &configuration::Configuration, org: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + + let uri_str = format!("{}/orgs/{org}/avatar", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_delete_hook(configuration: &configuration::Configuration, org: &str, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_id = id; + + let uri_str = format!("{}/orgs/{org}/hooks/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_delete_label(configuration: &configuration::Configuration, org: &str, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_id = id; + + let uri_str = format!("{}/orgs/{org}/labels/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_delete_member(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_username = username; + + let uri_str = format!("{}/orgs/{org}/members/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_delete_team(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/teams/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_edit(configuration: &configuration::Configuration, org: &str, body: models::EditOrgOption) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Organization`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Organization`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_edit_hook(configuration: &configuration::Configuration, org: &str, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}/hooks/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_edit_label(configuration: &configuration::Configuration, org: &str, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}/labels/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_edit_team(configuration: &configuration::Configuration, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/teams/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Team`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Team`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_get(configuration: &configuration::Configuration, org: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + + let uri_str = format!("{}/orgs/{org}", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Organization`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Organization`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_get_all(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Organization>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Organization>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_get_hook(configuration: &configuration::Configuration, org: &str, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_id = id; + + let uri_str = format!("{}/orgs/{org}/hooks/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_get_label(configuration: &configuration::Configuration, org: &str, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_id = id; + + let uri_str = format!("{}/orgs/{org}/labels/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_get_quota(configuration: &configuration::Configuration, org: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + + let uri_str = format!("{}/orgs/{org}/quota", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_get_runner_registration_token(configuration: &configuration::Configuration, org: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + + let uri_str = format!("{}/orgs/{org}/actions/runners/registration-token", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RegistrationToken`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RegistrationToken`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_get_team(configuration: &configuration::Configuration, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/teams/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Team`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Team`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_get_user_permissions(configuration: &configuration::Configuration, username: &str, org: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_path_org = org; + + let uri_str = format!("{}/users/{username}/orgs/{org}/permissions", configuration.base_path, username=crate::apis::urlencode(p_path_username), org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationPermissions`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationPermissions`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_is_member(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_username = username; + + let uri_str = format!("{}/orgs/{org}/members/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_is_public_member(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_username = username; + + let uri_str = format!("{}/orgs/{org}/public_members/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_actions_secrets(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/actions/secrets", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Secret>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Secret>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_activity_feeds(configuration: &configuration::Configuration, org: &str, date: Option, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_date = date; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/activities/feeds", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_date { + req_builder = req_builder.query(&[("date", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Activity>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Activity>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_blocked_users(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/list_blocked", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::BlockedUser>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::BlockedUser>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_current_user_orgs(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/orgs", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Organization>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Organization>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_hooks(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/hooks", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Hook>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Hook>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_labels(configuration: &configuration::Configuration, org: &str, sort: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_sort = sort; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/labels", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_sort { + req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Label>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Label>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_members(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/members", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_public_members(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/public_members", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_quota_artifacts(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/quota/artifacts", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedArtifact>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedArtifact>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_quota_attachments(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/quota/attachments", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedAttachment>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedAttachment>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_quota_packages(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/quota/packages", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedPackage>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedPackage>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_repos(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/repos", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_team_activity_feeds(configuration: &configuration::Configuration, id: i64, date: Option, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_query_date = date; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/teams/{id}/activities/feeds", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_date { + req_builder = req_builder.query(&[("date", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Activity>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Activity>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_team_member(configuration: &configuration::Configuration, id: i64, username: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_path_username = username; + + let uri_str = format!("{}/teams/{id}/members/{username}", configuration.base_path, id=p_path_id, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_team_members(configuration: &configuration::Configuration, id: i64, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/teams/{id}/members", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_team_repo(configuration: &configuration::Configuration, id: i64, org: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_path_org = org; + let p_path_repo = repo; + + let uri_str = format!("{}/teams/{id}/repos/{org}/{repo}", configuration.base_path, id=p_path_id, org=crate::apis::urlencode(p_path_org), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_team_repos(configuration: &configuration::Configuration, id: i64, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/teams/{id}/repos", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_teams(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/teams", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Team>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Team>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_list_user_orgs(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/users/{username}/orgs", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Organization>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Organization>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_publicize_member(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_username = username; + + let uri_str = format!("{}/orgs/{org}/public_members/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_remove_team_member(configuration: &configuration::Configuration, id: i64, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_path_username = username; + + let uri_str = format!("{}/teams/{id}/members/{username}", configuration.base_path, id=p_path_id, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// This does not delete the repository, it only removes the repository from the team. +pub async fn org_remove_team_repository(configuration: &configuration::Configuration, id: i64, org: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_path_org = org; + let p_path_repo = repo; + + let uri_str = format!("{}/teams/{id}/repos/{org}/{repo}", configuration.base_path, id=p_path_id, org=crate::apis::urlencode(p_path_org), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_search_run_jobs(configuration: &configuration::Configuration, org: &str, labels: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_labels = labels; + + let uri_str = format!("{}/orgs/{org}/actions/runners/jobs", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_labels { + req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionRunJob>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionRunJob>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_unblock_user(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_username = username; + + let uri_str = format!("{}/orgs/{org}/unblock/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn org_update_avatar(configuration: &configuration::Configuration, org: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}/avatar", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn rename_org(configuration: &configuration::Configuration, org: &str, body: models::RenameOrgOption) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}/rename", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn team_search(configuration: &configuration::Configuration, org: &str, q: Option<&str>, include_desc: Option, page: Option, limit: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_query_q = q; + let p_query_include_desc = include_desc; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/orgs/{org}/teams/search", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_q { + req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_include_desc { + req_builder = req_builder.query(&[("include_desc", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TeamSearchResults`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TeamSearchResults`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn update_org_secret(configuration: &configuration::Configuration, org: &str, secretname: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_secretname = secretname; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}/actions/secrets/{secretname}", configuration.base_path, org=crate::apis::urlencode(p_path_org), secretname=crate::apis::urlencode(p_path_secretname)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn update_org_variable(configuration: &configuration::Configuration, org: &str, variablename: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_org = org; + let p_path_variablename = variablename; + let p_body_body = body; + + let uri_str = format!("{}/orgs/{org}/actions/variables/{variablename}", configuration.base_path, org=crate::apis::urlencode(p_path_org), variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/forgejo-openapi/src/apis/package_api.rs b/forgejo-openapi/src/apis/package_api.rs new file mode 100644 index 0000000..147844d --- /dev/null +++ b/forgejo-openapi/src/apis/package_api.rs @@ -0,0 +1,585 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`delete_package`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeletePackageError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_package`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetPackageError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`link_package`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LinkPackageError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_package_files`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListPackageFilesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_packages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListPackagesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`unlink_package`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UnlinkPackageError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + + +pub async fn delete_package(configuration: &configuration::Configuration, owner: &str, r#type: &str, name: &str, version: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_type = r#type; + let p_path_name = name; + let p_path_version = version; + + let uri_str = format!("{}/packages/{owner}/{type}/{name}/{version}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name), version=crate::apis::urlencode(p_path_version)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_package(configuration: &configuration::Configuration, owner: &str, r#type: &str, name: &str, version: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_type = r#type; + let p_path_name = name; + let p_path_version = version; + + let uri_str = format!("{}/packages/{owner}/{type}/{name}/{version}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name), version=crate::apis::urlencode(p_path_version)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Package`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Package`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn link_package(configuration: &configuration::Configuration, owner: &str, r#type: &str, name: &str, repo_name: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_type = r#type; + let p_path_name = name; + let p_path_repo_name = repo_name; + + let uri_str = format!("{}/packages/{owner}/{type}/{name}/-/link/{repo_name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name), repo_name=crate::apis::urlencode(p_path_repo_name)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn list_package_files(configuration: &configuration::Configuration, owner: &str, r#type: &str, name: &str, version: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_type = r#type; + let p_path_name = name; + let p_path_version = version; + + let uri_str = format!("{}/packages/{owner}/{type}/{name}/{version}/files", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name), version=crate::apis::urlencode(p_path_version)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PackageFile>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PackageFile>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn list_packages(configuration: &configuration::Configuration, owner: &str, page: Option, limit: Option, r#type: Option<&str>, q: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_query_page = page; + let p_query_limit = limit; + let p_query_type = r#type; + let p_query_q = q; + + let uri_str = format!("{}/packages/{owner}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_type { + req_builder = req_builder.query(&[("type", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_q { + req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Package>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Package>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn unlink_package(configuration: &configuration::Configuration, owner: &str, r#type: &str, name: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_type = r#type; + let p_path_name = name; + + let uri_str = format!("{}/packages/{owner}/{type}/{name}/-/unlink", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/forgejo-openapi/src/apis/repository_api.rs b/forgejo-openapi/src/apis/repository_api.rs new file mode 100644 index 0000000..b019380 --- /dev/null +++ b/forgejo-openapi/src/apis/repository_api.rs @@ -0,0 +1,18035 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; +use tokio::fs::File as TokioFile; +use tokio_util::codec::{BytesCodec, FramedRead}; + + +/// struct for typed errors of method [`accept_repo_transfer`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AcceptRepoTransferError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status413(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`action_run`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActionRunError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_current_user_repo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateCurrentUserRepoError { + Status400(models::ApiError), + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status409(), + Status413(), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_fork`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateForkError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status409(), + Status413(), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_repo_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateRepoVariableError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_repo_secret`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteRepoSecretError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_repo_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteRepoVariableError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`dispatch_workflow`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DispatchWorkflowError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`generate_repo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GenerateRepoError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status409(), + Status413(), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_annotated_tag`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetAnnotatedTagError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_blob`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetBlobError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_blobs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetBlobsError { + Status400(models::ApiError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_repo_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetRepoVariableError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_repo_variables_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetRepoVariablesListError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_tree`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTreeError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_action_runs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListActionRunsError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_action_tasks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListActionTasksError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status409(), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_forks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListForksError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`reject_repo_transfer`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RejectRepoTransferError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_add_collaborator`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoAddCollaboratorError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_add_flag`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoAddFlagError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_add_push_mirror`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoAddPushMirrorError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status413(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_add_team`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoAddTeamError { + Status404(models::ApiNotFound), + Status405(models::ApiError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_add_topic`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoAddTopicError { + Status404(models::ApiNotFound), + Status422(models::ApiInvalidTopicsError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_apply_diff_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoApplyDiffPatchError { + Status404(models::ApiNotFound), + Status413(), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_cancel_scheduled_auto_merge`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCancelScheduledAutoMergeError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_change_files`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoChangeFilesError { + Status403(models::ApiError), + Status404(models::ApiNotFound), + Status409(), + Status413(), + Status422(models::ApiError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_check_collaborator`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCheckCollaboratorError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_check_flag`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCheckFlagError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_check_team`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCheckTeamError { + Status404(models::ApiNotFound), + Status405(models::ApiError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_compare_diff`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCompareDiffError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_convert`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoConvertError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_branch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreateBranchError { + Status403(), + Status404(), + Status409(), + Status413(), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_branch_protection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreateBranchProtectionError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_file`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreateFileError { + Status403(models::ApiError), + Status404(models::ApiNotFound), + Status409(), + Status413(), + Status422(models::ApiError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreateHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreateKeyError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_pull_request`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreatePullRequestError { + Status404(models::ApiNotFound), + Status409(models::ApiError), + Status413(), + Status422(models::ApiValidationError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_pull_review`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreatePullReviewError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_pull_review_comment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreatePullReviewCommentError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_pull_review_requests`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreatePullReviewRequestsError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_release`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreateReleaseError { + Status404(models::ApiNotFound), + Status409(models::ApiError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_release_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreateReleaseAttachmentError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + Status413(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_status`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreateStatusError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_tag`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreateTagError { + Status404(models::ApiNotFound), + Status405(), + Status409(), + Status413(), + Status422(models::ApiValidationError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_tag_protection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreateTagProtectionError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_create_wiki_page`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoCreateWikiPageError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status413(), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_all_flags`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteAllFlagsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_avatar`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteAvatarError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_branch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteBranchError { + Status403(models::ApiError), + Status404(models::ApiNotFound), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_branch_protection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteBranchProtectionError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_collaborator`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteCollaboratorError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_file`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteFileError { + Status400(models::ApiError), + Status403(models::ApiError), + Status404(models::ApiError), + Status413(), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_flag`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteFlagError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_git_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteGitHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteKeyError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_pull_review`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeletePullReviewError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_pull_review_comment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeletePullReviewCommentError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_pull_review_requests`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeletePullReviewRequestsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_push_mirror`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeletePushMirrorError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_release`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteReleaseError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_release_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteReleaseAttachmentError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_release_by_tag`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteReleaseByTagError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_tag`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteTagError { + Status404(models::ApiNotFound), + Status405(), + Status409(), + Status422(models::ApiValidationError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_tag_protection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteTagProtectionError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_team`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteTeamError { + Status404(models::ApiNotFound), + Status405(models::ApiError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_topic`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteTopicError { + Status404(models::ApiNotFound), + Status422(models::ApiInvalidTopicsError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_delete_wiki_page`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDeleteWikiPageError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_dismiss_pull_review`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDismissPullReviewError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_download_commit_diff_or_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDownloadCommitDiffOrPatchError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_download_pull_diff_or_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoDownloadPullDiffOrPatchError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_edit`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoEditError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_edit_branch_protection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoEditBranchProtectionError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_edit_git_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoEditGitHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_edit_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoEditHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_edit_pull_request`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoEditPullRequestError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status409(models::ApiError), + Status412(models::ApiError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_edit_release`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoEditReleaseError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_edit_release_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoEditReleaseAttachmentError { + Status404(models::ApiNotFound), + Status413(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_edit_tag_protection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoEditTagProtectionError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_edit_wiki_page`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoEditWikiPageError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status413(), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_all_commits`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetAllCommitsError { + Status404(models::ApiNotFound), + Status409(models::ApiError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_archive`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetArchiveError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_assignees`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetAssigneesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_branch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetBranchError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_branch_protection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetBranchProtectionError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_by_id`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetByIdError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_combined_status_by_ref`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetCombinedStatusByRefError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_commit_pull_request`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetCommitPullRequestError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_contents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetContentsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_contents_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetContentsListError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_editor_config`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetEditorConfigError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_git_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetGitHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_issue_config`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetIssueConfigError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_issue_templates`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetIssueTemplatesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetKeyError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_languages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetLanguagesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_latest_release`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetLatestReleaseError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_note`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetNoteError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_pull_request`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetPullRequestError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_pull_request_by_base_head`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetPullRequestByBaseHeadError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_pull_request_commits`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetPullRequestCommitsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_pull_request_files`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetPullRequestFilesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_pull_review`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetPullReviewError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_pull_review_comment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetPullReviewCommentError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_pull_review_comments`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetPullReviewCommentsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_push_mirror_by_remote_name`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetPushMirrorByRemoteNameError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_raw_file`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetRawFileError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_raw_file_or_lfs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetRawFileOrLfsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_release`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetReleaseError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_release_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetReleaseAttachmentError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_release_by_tag`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetReleaseByTagError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_repo_permissions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetRepoPermissionsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_reviewers`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetReviewersError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_runner_registration_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetRunnerRegistrationTokenError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_single_commit`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetSingleCommitError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_tag`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetTagError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_tag_protection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetTagProtectionError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_wiki_page`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetWikiPageError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_wiki_page_revisions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetWikiPageRevisionsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_get_wiki_pages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoGetWikiPagesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_actions_secrets`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListActionsSecretsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_activity_feeds`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListActivityFeedsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_all_git_refs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListAllGitRefsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_branch_protection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListBranchProtectionError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_branches`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListBranchesError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_collaborators`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListCollaboratorsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_flags`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListFlagsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_git_hooks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListGitHooksError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_git_refs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListGitRefsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_hooks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListHooksError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_keys`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListKeysError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_pinned_issues`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListPinnedIssuesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_pinned_pull_requests`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListPinnedPullRequestsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_pull_requests`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListPullRequestsError { + Status404(models::ApiNotFound), + Status500(models::ApiError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_pull_reviews`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListPullReviewsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_push_mirrors`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListPushMirrorsError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_release_attachments`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListReleaseAttachmentsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_releases`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListReleasesError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_stargazers`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListStargazersError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_statuses`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListStatusesError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_statuses_by_ref`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListStatusesByRefError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_subscribers`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListSubscribersError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_tag_protection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListTagProtectionError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_tags`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListTagsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_teams`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListTeamsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_list_topics`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoListTopicsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_merge_pull_request`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoMergePullRequestError { + Status404(models::ApiNotFound), + Status405(), + Status409(models::ApiError), + Status413(), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_migrate`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoMigrateError { + Status403(models::ApiForbiddenError), + Status409(), + Status413(), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_mirror_sync`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoMirrorSyncError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status413(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_new_pin_allowed`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoNewPinAllowedError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_pull_request_is_merged`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoPullRequestIsMergedError { + Status404(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_push_mirror_sync`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoPushMirrorSyncError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status413(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_remove_note`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoRemoveNoteError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_replace_all_flags`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoReplaceAllFlagsError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_search`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoSearchError { + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_search_run_jobs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoSearchRunJobsError { + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_set_note`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoSetNoteError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_signing_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoSigningKeyError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_submit_pull_review`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoSubmitPullReviewError { + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_sync_fork_branch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoSyncForkBranchError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_sync_fork_branch_info`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoSyncForkBranchInfoError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_sync_fork_default`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoSyncForkDefaultError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_sync_fork_default_info`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoSyncForkDefaultInfoError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_test_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoTestHookError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_tracked_times`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoTrackedTimesError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_transfer`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoTransferError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status413(), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_un_dismiss_pull_review`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoUnDismissPullReviewError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_update_avatar`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoUpdateAvatarError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_update_branch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoUpdateBranchError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_update_file`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoUpdateFileError { + Status403(models::ApiError), + Status404(models::ApiNotFound), + Status409(), + Status413(), + Status422(models::ApiError), + Status423(models::ApiRepoArchivedError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_update_pull_request`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoUpdatePullRequestError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status409(models::ApiError), + Status413(), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_update_topics`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoUpdateTopicsError { + Status404(models::ApiNotFound), + Status422(models::ApiInvalidTopicsError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`repo_validate_issue_config`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RepoValidateIssueConfigError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`topic_search`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TopicSearchError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_repo_secret`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateRepoSecretError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_repo_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateRepoVariableError { + Status400(models::ApiError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_check_subscription`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentCheckSubscriptionError { + Status404(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_delete_subscription`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentDeleteSubscriptionError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_put_subscription`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentPutSubscriptionError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_tracked_times`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserTrackedTimesError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + + +pub async fn accept_repo_transfer(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/transfer/accept", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn action_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_run_id = run_id; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), run_id=p_path_run_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActionRun`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActionRun`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_current_user_repo(configuration: &configuration::Configuration, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/user/repos", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_fork(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/forks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, variablename: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_variablename = variablename; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/variables/{variablename}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_repo_secret(configuration: &configuration::Configuration, owner: &str, repo: &str, secretname: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_secretname = secretname; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/secrets/{secretname}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), secretname=crate::apis::urlencode(p_path_secretname)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, variablename: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_variablename = variablename; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/variables/{variablename}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn dispatch_workflow(configuration: &configuration::Configuration, owner: &str, repo: &str, workflowfilename: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_workflowfilename = workflowfilename; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), workflowfilename=crate::apis::urlencode(p_path_workflowfilename)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DispatchWorkflowRun`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DispatchWorkflowRun`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn generate_repo(configuration: &configuration::Configuration, template_owner: &str, template_repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_template_owner = template_owner; + let p_path_template_repo = template_repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{template_owner}/{template_repo}/generate", configuration.base_path, template_owner=crate::apis::urlencode(p_path_template_owner), template_repo=crate::apis::urlencode(p_path_template_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_annotated_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_sha = sha; + + let uri_str = format!("{}/repos/{owner}/{repo}/git/tags/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AnnotatedTag`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AnnotatedTag`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_blob(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_sha = sha; + + let uri_str = format!("{}/repos/{owner}/{repo}/git/blobs/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GitBlob`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GitBlob`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_blobs(configuration: &configuration::Configuration, owner: &str, repo: &str, shas: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_shas = shas; + + let uri_str = format!("{}/repos/{owner}/{repo}/git/blobs", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("shas", &p_query_shas.to_string())]); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::GitBlob>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::GitBlob>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, variablename: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_variablename = variablename; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/variables/{variablename}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActionVariable`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActionVariable`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_repo_variables_list(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/variables", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionVariable>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionVariable>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_tree(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, recursive: Option, page: Option, per_page: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_sha = sha; + let p_query_recursive = recursive; + let p_query_page = page; + let p_query_per_page = per_page; + + let uri_str = format!("{}/repos/{owner}/{repo}/git/trees/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_recursive { + req_builder = req_builder.query(&[("recursive", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_per_page { + req_builder = req_builder.query(&[("per_page", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GitTreeResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GitTreeResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn list_action_runs(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option, event: Option>, status: Option>, run_number: Option, head_sha: Option<&str>) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + let p_query_event = event; + let p_query_status = status; + let p_query_run_number = run_number; + let p_query_head_sha = head_sha; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/runs", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_event { + req_builder = match "csv" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("event".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("event", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref param_value) = p_query_status { + req_builder = match "csv" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("status".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("status", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref param_value) = p_query_run_number { + req_builder = req_builder.query(&[("run_number", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_head_sha { + req_builder = req_builder.query(&[("head_sha", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ListActionRunResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ListActionRunResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn list_action_tasks(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/tasks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActionTaskResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActionTaskResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn list_forks(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/forks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn reject_repo_transfer(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/transfer/reject", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_add_collaborator(configuration: &configuration::Configuration, owner: &str, repo: &str, collaborator: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_collaborator = collaborator; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/collaborators/{collaborator}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), collaborator=crate::apis::urlencode(p_path_collaborator)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_add_flag(configuration: &configuration::Configuration, owner: &str, repo: &str, flag: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_flag = flag; + + let uri_str = format!("{}/repos/{owner}/{repo}/flags/{flag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), flag=crate::apis::urlencode(p_path_flag)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_add_push_mirror(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/push_mirrors", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PushMirror`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PushMirror`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_add_team(configuration: &configuration::Configuration, owner: &str, repo: &str, team: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_team = team; + + let uri_str = format!("{}/repos/{owner}/{repo}/teams/{team}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), team=crate::apis::urlencode(p_path_team)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_add_topic(configuration: &configuration::Configuration, owner: &str, repo: &str, topic: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_topic = topic; + + let uri_str = format!("{}/repos/{owner}/{repo}/topics/{topic}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), topic=crate::apis::urlencode(p_path_topic)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_apply_diff_patch(configuration: &configuration::Configuration, owner: &str, repo: &str, body: models::UpdateFileOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/diffpatch", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FileResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FileResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_cancel_scheduled_auto_merge(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/merge", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_change_files(configuration: &configuration::Configuration, owner: &str, repo: &str, body: models::ChangeFilesOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/contents", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FilesResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FilesResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// If the user is a collaborator, return 204. If the user is not a collaborator, return 404. +pub async fn repo_check_collaborator(configuration: &configuration::Configuration, owner: &str, repo: &str, collaborator: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_collaborator = collaborator; + + let uri_str = format!("{}/repos/{owner}/{repo}/collaborators/{collaborator}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), collaborator=crate::apis::urlencode(p_path_collaborator)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_check_flag(configuration: &configuration::Configuration, owner: &str, repo: &str, flag: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_flag = flag; + + let uri_str = format!("{}/repos/{owner}/{repo}/flags/{flag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), flag=crate::apis::urlencode(p_path_flag)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_check_team(configuration: &configuration::Configuration, owner: &str, repo: &str, team: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_team = team; + + let uri_str = format!("{}/repos/{owner}/{repo}/teams/{team}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), team=crate::apis::urlencode(p_path_team)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Team`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Team`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_compare_diff(configuration: &configuration::Configuration, owner: &str, repo: &str, basehead: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_basehead = basehead; + + let uri_str = format!("{}/repos/{owner}/{repo}/compare/{basehead}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), basehead=crate::apis::urlencode(p_path_basehead)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Compare`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Compare`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_convert(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/convert", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_branch(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/branches", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Branch`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Branch`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_branch_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/branch_protections", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BranchProtection`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BranchProtection`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_file(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, body: models::CreateFileOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_filepath = filepath; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/contents/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FileResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FileResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/hooks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_key(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/keys", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeployKey`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeployKey`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullRequest`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullRequest`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: models::CreatePullReviewOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReview`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReview`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_pull_review_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64, body: models::CreatePullReviewComment) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReviewComment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReviewComment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_pull_review_requests(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: models::PullReviewRequestOptions) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/requested_reviewers", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PullReview>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PullReview>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_release(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Release`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Release`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_release_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, name: Option<&str>, attachment: Option, external_url: Option<&str>) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_query_name = name; + let p_form_attachment = attachment; + let p_form_external_url = external_url; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_query_name { + req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + let mut multipart_form = reqwest::multipart::Form::new(); + if let Some(ref param_value) = p_form_attachment { + let file = TokioFile::open(param_value).await?; + let stream = FramedRead::new(file, BytesCodec::new()); + let file_name = param_value.file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_default(); + let file_part = reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)).file_name(file_name); + multipart_form = multipart_form.part("attachment", file_part); + } + if let Some(param_value) = p_form_external_url { + multipart_form = multipart_form.text("external_url", param_value.to_string()); + } + req_builder = req_builder.multipart(multipart_form); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_status(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_sha = sha; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/statuses/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CommitStatus`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CommitStatus`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/tags", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Tag`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Tag`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_tag_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/tag_protections", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TagProtection`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TagProtection`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_create_wiki_page(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/wiki/new", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WikiPage`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WikiPage`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_all_flags(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/flags", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_avatar(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/avatar", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_branch(configuration: &configuration::Configuration, owner: &str, repo: &str, branch: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_branch = branch; + + let uri_str = format!("{}/repos/{owner}/{repo}/branches/{branch}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), branch=crate::apis::urlencode(p_path_branch)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_branch_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_name = name; + + let uri_str = format!("{}/repos/{owner}/{repo}/branch_protections/{name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_collaborator(configuration: &configuration::Configuration, owner: &str, repo: &str, collaborator: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_collaborator = collaborator; + + let uri_str = format!("{}/repos/{owner}/{repo}/collaborators/{collaborator}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), collaborator=crate::apis::urlencode(p_path_collaborator)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_file(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, body: models::DeleteFileOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_filepath = filepath; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/contents/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FileDeleteResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FileDeleteResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_flag(configuration: &configuration::Configuration, owner: &str, repo: &str, flag: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_flag = flag; + + let uri_str = format!("{}/repos/{owner}/{repo}/flags/{flag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), flag=crate::apis::urlencode(p_path_flag)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_git_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/hooks/git/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=crate::apis::urlencode(p_path_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/hooks/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_key(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/keys/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_pull_review_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64, comment: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + let p_path_comment = comment; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id, comment=p_path_comment); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_pull_review_requests(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: models::PullReviewRequestOptions) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/requested_reviewers", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_push_mirror(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_name = name; + + let uri_str = format!("{}/repos/{owner}/{repo}/push_mirrors/{name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_release(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_release_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_path_attachment_id = attachment_id; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_release_by_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, tag: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_tag = tag; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases/tags/{tag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), tag=crate::apis::urlencode(p_path_tag)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, tag: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_tag = tag; + + let uri_str = format!("{}/repos/{owner}/{repo}/tags/{tag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), tag=crate::apis::urlencode(p_path_tag)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_tag_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/tag_protections/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_team(configuration: &configuration::Configuration, owner: &str, repo: &str, team: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_team = team; + + let uri_str = format!("{}/repos/{owner}/{repo}/teams/{team}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), team=crate::apis::urlencode(p_path_team)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_topic(configuration: &configuration::Configuration, owner: &str, repo: &str, topic: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_topic = topic; + + let uri_str = format!("{}/repos/{owner}/{repo}/topics/{topic}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), topic=crate::apis::urlencode(p_path_topic)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_delete_wiki_page(configuration: &configuration::Configuration, owner: &str, repo: &str, page_name: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_page_name = page_name; + + let uri_str = format!("{}/repos/{owner}/{repo}/wiki/page/{pageName}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), pageName=crate::apis::urlencode(p_path_page_name)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_dismiss_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64, body: models::DismissPullReviewOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReview`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReview`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_download_commit_diff_or_patch(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, diff_type: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_sha = sha; + let p_path_diff_type = diff_type; + + let uri_str = format!("{}/repos/{owner}/{repo}/git/commits/{sha}.{diffType}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha), diffType=crate::apis::urlencode(p_path_diff_type)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Ok(content), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_download_pull_diff_or_patch(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, diff_type: &str, binary: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_diff_type = diff_type; + let p_query_binary = binary; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}.{diffType}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, diffType=crate::apis::urlencode(p_path_diff_type)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_binary { + req_builder = req_builder.query(&[("binary", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Ok(content), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_edit(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_edit_branch_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_name = name; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/branch_protections/{name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BranchProtection`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BranchProtection`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_edit_git_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/hooks/git/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=crate::apis::urlencode(p_path_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GitHook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GitHook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_edit_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/hooks/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_edit_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullRequest`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullRequest`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_edit_release(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Release`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Release`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_edit_release_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_path_attachment_id = attachment_id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_edit_tag_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/tag_protections/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TagProtection`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TagProtection`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_edit_wiki_page(configuration: &configuration::Configuration, owner: &str, repo: &str, page_name: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_page_name = page_name; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/wiki/page/{pageName}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), pageName=crate::apis::urlencode(p_path_page_name)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WikiPage`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WikiPage`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_all_commits(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: Option<&str>, path: Option<&str>, stat: Option, verification: Option, files: Option, page: Option, limit: Option, not: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_sha = sha; + let p_query_path = path; + let p_query_stat = stat; + let p_query_verification = verification; + let p_query_files = files; + let p_query_page = page; + let p_query_limit = limit; + let p_query_not = not; + + let uri_str = format!("{}/repos/{owner}/{repo}/commits", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_sha { + req_builder = req_builder.query(&[("sha", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_path { + req_builder = req_builder.query(&[("path", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_stat { + req_builder = req_builder.query(&[("stat", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_verification { + req_builder = req_builder.query(&[("verification", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_files { + req_builder = req_builder.query(&[("files", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_not { + req_builder = req_builder.query(&[("not", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Commit>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Commit>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_archive(configuration: &configuration::Configuration, owner: &str, repo: &str, archive: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_archive = archive; + + let uri_str = format!("{}/repos/{owner}/{repo}/archive/{archive}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), archive=crate::apis::urlencode(p_path_archive)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_assignees(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/assignees", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_branch(configuration: &configuration::Configuration, owner: &str, repo: &str, branch: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_branch = branch; + + let uri_str = format!("{}/repos/{owner}/{repo}/branches/{branch}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), branch=crate::apis::urlencode(p_path_branch)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Branch`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Branch`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_branch_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_name = name; + + let uri_str = format!("{}/repos/{owner}/{repo}/branch_protections/{name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BranchProtection`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BranchProtection`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_by_id(configuration: &configuration::Configuration, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/repositories/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_combined_status_by_ref(configuration: &configuration::Configuration, owner: &str, repo: &str, r#ref: &str, page: Option, limit: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_ref = r#ref; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/commits/{ref}/status", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), ref=crate::apis::urlencode(p_path_ref)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CombinedStatus`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CombinedStatus`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_commit_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_sha = sha; + + let uri_str = format!("{}/repos/{owner}/{repo}/commits/{sha}/pull", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullRequest`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullRequest`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_contents(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, r#ref: Option<&str>) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_filepath = filepath; + let p_query_ref = r#ref; + + let uri_str = format!("{}/repos/{owner}/{repo}/contents/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_ref { + req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ContentsResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ContentsResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_contents_list(configuration: &configuration::Configuration, owner: &str, repo: &str, r#ref: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_ref = r#ref; + + let uri_str = format!("{}/repos/{owner}/{repo}/contents", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_ref { + req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ContentsResponse>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ContentsResponse>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_editor_config(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, r#ref: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_filepath = filepath; + let p_query_ref = r#ref; + + let uri_str = format!("{}/repos/{owner}/{repo}/editorconfig/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_ref { + req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, String>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, String>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_git_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/hooks/git/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=crate::apis::urlencode(p_path_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GitHook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GitHook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/hooks/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_issue_config(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/issue_config", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IssueConfig`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IssueConfig`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_issue_templates(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/issue_templates", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::IssueTemplate>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::IssueTemplate>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_key(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/keys/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeployKey`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeployKey`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_languages(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/languages", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, i64>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, i64>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_latest_release(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases/latest", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Release`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Release`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_note(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, verification: Option, files: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_sha = sha; + let p_query_verification = verification; + let p_query_files = files; + + let uri_str = format!("{}/repos/{owner}/{repo}/git/notes/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_verification { + req_builder = req_builder.query(&[("verification", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_files { + req_builder = req_builder.query(&[("files", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Note`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Note`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullRequest`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullRequest`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_pull_request_by_base_head(configuration: &configuration::Configuration, owner: &str, repo: &str, base: &str, head: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_base = base; + let p_path_head = head; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{base}/{head}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), base=crate::apis::urlencode(p_path_base), head=crate::apis::urlencode(p_path_head)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullRequest`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullRequest`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_pull_request_commits(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option, verification: Option, files: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_query_page = page; + let p_query_limit = limit; + let p_query_verification = verification; + let p_query_files = files; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/commits", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_verification { + req_builder = req_builder.query(&[("verification", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_files { + req_builder = req_builder.query(&[("files", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Commit>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Commit>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_pull_request_files(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, skip_to: Option<&str>, whitespace: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_query_skip_to = skip_to; + let p_query_whitespace = whitespace; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/files", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_skip_to { + req_builder = req_builder.query(&[("skip-to", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_whitespace { + req_builder = req_builder.query(&[("whitespace", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ChangedFile>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ChangedFile>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReview`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReview`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_pull_review_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64, comment: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + let p_path_comment = comment; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id, comment=p_path_comment); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReviewComment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReviewComment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_pull_review_comments(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PullReviewComment>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PullReviewComment>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_push_mirror_by_remote_name(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_name = name; + + let uri_str = format!("{}/repos/{owner}/{repo}/push_mirrors/{name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PushMirror`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PushMirror`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_raw_file(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, r#ref: Option<&str>) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_filepath = filepath; + let p_query_ref = r#ref; + + let uri_str = format!("{}/repos/{owner}/{repo}/raw/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_ref { + req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(resp) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_raw_file_or_lfs(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, r#ref: Option<&str>) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_filepath = filepath; + let p_query_ref = r#ref; + + let uri_str = format!("{}/repos/{owner}/{repo}/media/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_ref { + req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(resp) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_release(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Release`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Release`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_release_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_path_attachment_id = attachment_id; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_release_by_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, tag: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_tag = tag; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases/tags/{tag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), tag=crate::apis::urlencode(p_path_tag)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Release`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Release`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_repo_permissions(configuration: &configuration::Configuration, owner: &str, repo: &str, collaborator: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_collaborator = collaborator; + + let uri_str = format!("{}/repos/{owner}/{repo}/collaborators/{collaborator}/permission", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), collaborator=crate::apis::urlencode(p_path_collaborator)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RepoCollaboratorPermission`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RepoCollaboratorPermission`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_reviewers(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/reviewers", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_runner_registration_token(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/registration-token", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RegistrationToken`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RegistrationToken`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_single_commit(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, stat: Option, verification: Option, files: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_sha = sha; + let p_query_stat = stat; + let p_query_verification = verification; + let p_query_files = files; + + let uri_str = format!("{}/repos/{owner}/{repo}/git/commits/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_stat { + req_builder = req_builder.query(&[("stat", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_verification { + req_builder = req_builder.query(&[("verification", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_files { + req_builder = req_builder.query(&[("files", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Commit`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Commit`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, tag: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_tag = tag; + + let uri_str = format!("{}/repos/{owner}/{repo}/tags/{tag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), tag=crate::apis::urlencode(p_path_tag)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Tag`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Tag`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_tag_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/tag_protections/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TagProtection`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TagProtection`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_wiki_page(configuration: &configuration::Configuration, owner: &str, repo: &str, page_name: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_page_name = page_name; + + let uri_str = format!("{}/repos/{owner}/{repo}/wiki/page/{pageName}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), pageName=crate::apis::urlencode(p_path_page_name)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WikiPage`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WikiPage`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_wiki_page_revisions(configuration: &configuration::Configuration, owner: &str, repo: &str, page_name: &str, page: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_page_name = page_name; + let p_query_page = page; + + let uri_str = format!("{}/repos/{owner}/{repo}/wiki/revisions/{pageName}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), pageName=crate::apis::urlencode(p_path_page_name)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WikiCommitList`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WikiCommitList`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_get_wiki_pages(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/wiki/pages", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::WikiPageMetaData>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::WikiPageMetaData>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_actions_secrets(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/secrets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Secret>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Secret>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_activity_feeds(configuration: &configuration::Configuration, owner: &str, repo: &str, date: Option, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_date = date; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/activities/feeds", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_date { + req_builder = req_builder.query(&[("date", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Activity>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Activity>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_all_git_refs(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/git/refs", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Reference>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Reference>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_branch_protection(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/branch_protections", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::BranchProtection>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::BranchProtection>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_branches(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/branches", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Branch>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Branch>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_collaborators(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/collaborators", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_flags(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/flags", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_git_hooks(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/hooks/git", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::GitHook>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::GitHook>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_git_refs(configuration: &configuration::Configuration, owner: &str, repo: &str, r#ref: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_ref = r#ref; + + let uri_str = format!("{}/repos/{owner}/{repo}/git/refs/{ref}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), ref=crate::apis::urlencode(p_path_ref)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Reference>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Reference>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_hooks(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/hooks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Hook>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Hook>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_keys(configuration: &configuration::Configuration, owner: &str, repo: &str, key_id: Option, fingerprint: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_key_id = key_id; + let p_query_fingerprint = fingerprint; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/keys", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_key_id { + req_builder = req_builder.query(&[("key_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_fingerprint { + req_builder = req_builder.query(&[("fingerprint", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::DeployKey>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::DeployKey>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_pinned_issues(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/issues/pinned", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Issue>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Issue>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_pinned_pull_requests(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/pinned", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PullRequest>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PullRequest>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_pull_requests(configuration: &configuration::Configuration, owner: &str, repo: &str, state: Option<&str>, sort: Option<&str>, milestone: Option, labels: Option>, poster: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_state = state; + let p_query_sort = sort; + let p_query_milestone = milestone; + let p_query_labels = labels; + let p_query_poster = poster; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_state { + req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_sort { + req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_milestone { + req_builder = req_builder.query(&[("milestone", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_labels { + req_builder = match "multi" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("labels".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("labels", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref param_value) = p_query_poster { + req_builder = req_builder.query(&[("poster", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PullRequest>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PullRequest>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_pull_reviews(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PullReview>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PullReview>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_push_mirrors(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/push_mirrors", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PushMirror>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PushMirror>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_release_attachments(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Attachment>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Attachment>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_releases(configuration: &configuration::Configuration, owner: &str, repo: &str, draft: Option, pre_release: Option, q: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_draft = draft; + let p_query_pre_release = pre_release; + let p_query_q = q; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/releases", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_draft { + req_builder = req_builder.query(&[("draft", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_pre_release { + req_builder = req_builder.query(&[("pre-release", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_q { + req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Release>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Release>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_stargazers(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/stargazers", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_statuses(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, sort: Option<&str>, state: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_sha = sha; + let p_query_sort = sort; + let p_query_state = state; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/statuses/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_sort { + req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_state { + req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::CommitStatus>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::CommitStatus>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_statuses_by_ref(configuration: &configuration::Configuration, owner: &str, repo: &str, r#ref: &str, sort: Option<&str>, state: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_ref = r#ref; + let p_query_sort = sort; + let p_query_state = state; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/commits/{ref}/statuses", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), ref=crate::apis::urlencode(p_path_ref)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_sort { + req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_state { + req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::CommitStatus>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::CommitStatus>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_subscribers(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/subscribers", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_tag_protection(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/tag_protections", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TagProtection>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TagProtection>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_tags(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/tags", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Tag>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Tag>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_teams(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/teams", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Team>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Team>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_list_topics(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/topics", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TopicName`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TopicName`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_merge_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/merge", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_migrate(configuration: &configuration::Configuration, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/repos/migrate", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_mirror_sync(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/mirror-sync", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_new_pin_allowed(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/new_pin_allowed", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NewIssuePinsAllowed`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NewIssuePinsAllowed`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_pull_request_is_merged(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/merge", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_push_mirror_sync(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/push_mirrors-sync", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_remove_note(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_sha = sha; + + let uri_str = format!("{}/repos/{owner}/{repo}/git/notes/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_replace_all_flags(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/flags", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_search(configuration: &configuration::Configuration, q: Option<&str>, topic: Option, include_desc: Option, uid: Option, priority_owner_id: Option, team_id: Option, starred_by: Option, private: Option, is_private: Option, template: Option, archived: Option, mode: Option<&str>, exclusive: Option, sort: Option<&str>, order: Option<&str>, page: Option, limit: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_q = q; + let p_query_topic = topic; + let p_query_include_desc = include_desc; + let p_query_uid = uid; + let p_query_priority_owner_id = priority_owner_id; + let p_query_team_id = team_id; + let p_query_starred_by = starred_by; + let p_query_private = private; + let p_query_is_private = is_private; + let p_query_template = template; + let p_query_archived = archived; + let p_query_mode = mode; + let p_query_exclusive = exclusive; + let p_query_sort = sort; + let p_query_order = order; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/search", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_q { + req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_topic { + req_builder = req_builder.query(&[("topic", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_include_desc { + req_builder = req_builder.query(&[("includeDesc", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_uid { + req_builder = req_builder.query(&[("uid", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_priority_owner_id { + req_builder = req_builder.query(&[("priority_owner_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_team_id { + req_builder = req_builder.query(&[("team_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_starred_by { + req_builder = req_builder.query(&[("starredBy", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_private { + req_builder = req_builder.query(&[("private", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_is_private { + req_builder = req_builder.query(&[("is_private", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_template { + req_builder = req_builder.query(&[("template", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_archived { + req_builder = req_builder.query(&[("archived", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_mode { + req_builder = req_builder.query(&[("mode", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_exclusive { + req_builder = req_builder.query(&[("exclusive", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_sort { + req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_order { + req_builder = req_builder.query(&[("order", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SearchResults`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SearchResults`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_search_run_jobs(configuration: &configuration::Configuration, owner: &str, repo: &str, labels: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_labels = labels; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/jobs", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_labels { + req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionRunJob>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionRunJob>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_set_note(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_sha = sha; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/git/notes/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Note`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Note`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_signing_key(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/signing-key.gpg", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Ok(content), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_submit_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64, body: models::SubmitPullReviewOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReview`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReview`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_sync_fork_branch(configuration: &configuration::Configuration, owner: &str, repo: &str, branch: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_branch = branch; + + let uri_str = format!("{}/repos/{owner}/{repo}/sync_fork/{branch}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), branch=crate::apis::urlencode(p_path_branch)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_sync_fork_branch_info(configuration: &configuration::Configuration, owner: &str, repo: &str, branch: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_branch = branch; + + let uri_str = format!("{}/repos/{owner}/{repo}/sync_fork/{branch}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), branch=crate::apis::urlencode(p_path_branch)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SyncForkInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SyncForkInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_sync_fork_default(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/sync_fork", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_sync_fork_default_info(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/sync_fork", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SyncForkInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SyncForkInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_test_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, r#ref: Option<&str>) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_id = id; + let p_query_ref = r#ref; + + let uri_str = format!("{}/repos/{owner}/{repo}/hooks/{id}/tests", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_query_ref { + req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_tracked_times(configuration: &configuration::Configuration, owner: &str, repo: &str, user: Option<&str>, since: Option, before: Option, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_query_user = user; + let p_query_since = since; + let p_query_before = before; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/repos/{owner}/{repo}/times", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_user { + req_builder = req_builder.query(&[("user", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_since { + req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TrackedTime>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TrackedTime>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_transfer(configuration: &configuration::Configuration, owner: &str, repo: &str, body: models::TransferRepoOption) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/transfer", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_un_dismiss_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_path_id = id; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReview`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReview`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_update_avatar(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/avatar", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_update_branch(configuration: &configuration::Configuration, owner: &str, repo: &str, branch: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_branch = branch; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/branches/{branch}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), branch=crate::apis::urlencode(p_path_branch)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_update_file(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, body: models::UpdateFileOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_filepath = filepath; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/contents/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FileResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FileResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_update_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, style: Option<&str>) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_index = index; + let p_query_style = style; + + let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/update", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_query_style { + req_builder = req_builder.query(&[("style", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_update_topics(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/topics", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn repo_validate_issue_config(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/issue_config/validate", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IssueConfigValidation`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IssueConfigValidation`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn topic_search(configuration: &configuration::Configuration, q: &str, page: Option, limit: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_q = q; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/topics/search", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("q", &p_query_q.to_string())]); + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TopicSearchResults`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TopicSearchResults`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn update_repo_secret(configuration: &configuration::Configuration, owner: &str, repo: &str, secretname: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_secretname = secretname; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/secrets/{secretname}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), secretname=crate::apis::urlencode(p_path_secretname)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn update_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, variablename: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_variablename = variablename; + let p_body_body = body; + + let uri_str = format!("{}/repos/{owner}/{repo}/actions/variables/{variablename}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_check_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/subscription", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WatchInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WatchInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_delete_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/subscription", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_put_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/repos/{owner}/{repo}/subscription", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WatchInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WatchInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +#[deprecated] +pub async fn user_tracked_times(configuration: &configuration::Configuration, owner: &str, repo: &str, user: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + let p_path_user = user; + + let uri_str = format!("{}/repos/{owner}/{repo}/times/{user}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), user=crate::apis::urlencode(p_path_user)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TrackedTime>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TrackedTime>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/forgejo-openapi/src/apis/settings_api.rs b/forgejo-openapi/src/apis/settings_api.rs new file mode 100644 index 0000000..826c4f9 --- /dev/null +++ b/forgejo-openapi/src/apis/settings_api.rs @@ -0,0 +1,386 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`get_general_api_settings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGeneralApiSettingsError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_general_attachment_settings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGeneralAttachmentSettingsError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_general_repository_settings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGeneralRepositorySettingsError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_general_ui_settings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGeneralUiSettingsError { + UnknownValue(serde_json::Value), +} + + +pub async fn get_general_api_settings(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/settings/api", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GeneralApiSettings`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GeneralApiSettings`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_general_attachment_settings(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/settings/attachment", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GeneralAttachmentSettings`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GeneralAttachmentSettings`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_general_repository_settings(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/settings/repository", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GeneralRepoSettings`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GeneralRepoSettings`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_general_ui_settings(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/settings/ui", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GeneralUiSettings`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GeneralUiSettings`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/forgejo-openapi/src/apis/user_api.rs b/forgejo-openapi/src/apis/user_api.rs new file mode 100644 index 0000000..8e330c3 --- /dev/null +++ b/forgejo-openapi/src/apis/user_api.rs @@ -0,0 +1,7266 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`create_current_user_repo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateCurrentUserRepoError { + Status400(models::ApiError), + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status409(), + Status413(), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_user_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateUserVariableError { + Status400(models::ApiError), + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_user_secret`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteUserSecretError { + Status400(models::ApiError), + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_user_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteUserVariableError { + Status400(models::ApiError), + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_user_settings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserSettingsError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_user_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserVariableError { + Status400(models::ApiError), + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_user_variables_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserVariablesListError { + Status400(models::ApiError), + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_verification_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetVerificationTokenError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_user_secret`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateUserSecretError { + Status400(models::ApiError), + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_user_settings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateUserSettingsError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_user_variable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateUserVariableError { + Status400(models::ApiError), + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_add_email`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserAddEmailError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_block_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserBlockUserError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_check_following`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCheckFollowingError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_check_quota`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCheckQuotaError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_create_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCreateHookError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_create_o_auth2_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCreateOAuth2ApplicationError { + Status400(models::ApiError), + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_create_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCreateTokenError { + Status400(models::ApiError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_check_following`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentCheckFollowingError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_check_starring`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentCheckStarringError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_delete_follow`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentDeleteFollowError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_delete_gpg_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentDeleteGpgKeyError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_delete_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentDeleteKeyError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_delete_star`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentDeleteStarError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_get_gpg_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentGetGpgKeyError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_get_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentGetKeyError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_list_followers`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentListFollowersError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_list_following`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentListFollowingError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_list_gpg_keys`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentListGpgKeysError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_list_keys`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentListKeysError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_list_repos`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentListReposError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_list_starred`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentListStarredError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_list_subscriptions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentListSubscriptionsError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_post_gpg_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentPostGpgKeyError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_post_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentPostKeyError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_put_follow`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentPutFollowError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_put_star`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentPutStarError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_current_tracked_times`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserCurrentTrackedTimesError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_delete_access_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserDeleteAccessTokenError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_delete_avatar`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserDeleteAvatarError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_delete_email`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserDeleteEmailError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_delete_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserDeleteHookError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_delete_o_auth2_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserDeleteOAuth2ApplicationError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_edit_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserEditHookError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserGetError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_get_current`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserGetCurrentError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_get_heatmap_data`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserGetHeatmapDataError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_get_hook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserGetHookError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_get_o_auth2_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserGetOAuth2ApplicationError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_get_o_auth2_applications`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserGetOAuth2ApplicationsError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_get_quota`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserGetQuotaError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_get_runner_registration_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserGetRunnerRegistrationTokenError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_get_stop_watches`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserGetStopWatchesError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_get_tokens`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserGetTokensError { + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_activity_feeds`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListActivityFeedsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_blocked_users`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListBlockedUsersError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_emails`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListEmailsError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_followers`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListFollowersError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_following`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListFollowingError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_gpg_keys`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListGpgKeysError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_hooks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListHooksError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_keys`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListKeysError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_quota_artifacts`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListQuotaArtifactsError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_quota_attachments`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListQuotaAttachmentsError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_quota_packages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListQuotaPackagesError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_repos`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListReposError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_starred`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListStarredError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_subscriptions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListSubscriptionsError { + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_list_teams`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserListTeamsError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_search`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserSearchError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_search_run_jobs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserSearchRunJobsError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_unblock_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserUnblockUserError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_update_avatar`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserUpdateAvatarError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_update_o_auth2_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserUpdateOAuth2ApplicationError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`user_verify_gpg_key`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserVerifyGpgKeyError { + Status401(models::ApiUnauthorizedError), + Status403(models::ApiForbiddenError), + Status404(models::ApiNotFound), + Status422(models::ApiValidationError), + UnknownValue(serde_json::Value), +} + + +pub async fn create_current_user_repo(configuration: &configuration::Configuration, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/user/repos", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_user_variable(configuration: &configuration::Configuration, variablename: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_variablename = variablename; + let p_body_body = body; + + let uri_str = format!("{}/user/actions/variables/{variablename}", configuration.base_path, variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_user_secret(configuration: &configuration::Configuration, secretname: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_secretname = secretname; + + let uri_str = format!("{}/user/actions/secrets/{secretname}", configuration.base_path, secretname=crate::apis::urlencode(p_path_secretname)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_user_variable(configuration: &configuration::Configuration, variablename: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_variablename = variablename; + + let uri_str = format!("{}/user/actions/variables/{variablename}", configuration.base_path, variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_user_settings(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/user/settings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserSettings`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserSettings`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_user_variable(configuration: &configuration::Configuration, variablename: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_variablename = variablename; + + let uri_str = format!("{}/user/actions/variables/{variablename}", configuration.base_path, variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActionVariable`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActionVariable`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_user_variables_list(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/actions/variables", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionVariable>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionVariable>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_verification_token(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/user/gpg_key_token", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Ok(content), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn update_user_secret(configuration: &configuration::Configuration, secretname: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_secretname = secretname; + let p_body_body = body; + + let uri_str = format!("{}/user/actions/secrets/{secretname}", configuration.base_path, secretname=crate::apis::urlencode(p_path_secretname)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn update_user_settings(configuration: &configuration::Configuration, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/user/settings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserSettings`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserSettings`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn update_user_variable(configuration: &configuration::Configuration, variablename: &str, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_variablename = variablename; + let p_body_body = body; + + let uri_str = format!("{}/user/actions/variables/{variablename}", configuration.base_path, variablename=crate::apis::urlencode(p_path_variablename)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_add_email(configuration: &configuration::Configuration, body: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/user/emails", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Email>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Email>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_block_user(configuration: &configuration::Configuration, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + + let uri_str = format!("{}/user/block/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_check_following(configuration: &configuration::Configuration, username: &str, target: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_path_target = target; + + let uri_str = format!("{}/users/{username}/following/{target}", configuration.base_path, username=crate::apis::urlencode(p_path_username), target=crate::apis::urlencode(p_path_target)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_check_quota(configuration: &configuration::Configuration, subject: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_subject = subject; + + let uri_str = format!("{}/user/quota/check", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("subject", &p_query_subject.to_string())]); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `bool`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `bool`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_create_hook(configuration: &configuration::Configuration, body: models::CreateHookOption) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/user/hooks", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_create_o_auth2_application(configuration: &configuration::Configuration, body: models::CreateOAuth2ApplicationOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/user/applications/oauth2", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OAuth2Application`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OAuth2Application`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_create_token(configuration: &configuration::Configuration, username: &str, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_body_body = body; + + let uri_str = format!("{}/users/{username}/tokens", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AccessToken`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AccessToken`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_check_following(configuration: &configuration::Configuration, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + + let uri_str = format!("{}/user/following/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_check_starring(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/user/starred/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_delete_follow(configuration: &configuration::Configuration, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + + let uri_str = format!("{}/user/following/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_delete_gpg_key(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/user/gpg_keys/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_delete_key(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/user/keys/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_delete_star(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/user/starred/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_get_gpg_key(configuration: &configuration::Configuration, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/user/gpg_keys/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GpgKey`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GpgKey`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_get_key(configuration: &configuration::Configuration, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/user/keys/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PublicKey`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PublicKey`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_list_followers(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/followers", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_list_following(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/following", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_list_gpg_keys(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/gpg_keys", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::GpgKey>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::GpgKey>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_list_keys(configuration: &configuration::Configuration, fingerprint: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_fingerprint = fingerprint; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/keys", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_fingerprint { + req_builder = req_builder.query(&[("fingerprint", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PublicKey>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PublicKey>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_list_repos(configuration: &configuration::Configuration, page: Option, limit: Option, order_by: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + let p_query_order_by = order_by; + + let uri_str = format!("{}/user/repos", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_order_by { + req_builder = req_builder.query(&[("order_by", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_list_starred(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/starred", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_list_subscriptions(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/subscriptions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_post_gpg_key(configuration: &configuration::Configuration, form: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_form = form; + + let uri_str = format!("{}/user/gpg_keys", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_form); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GpgKey`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GpgKey`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_post_key(configuration: &configuration::Configuration, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/user/keys", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PublicKey`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PublicKey`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_put_follow(configuration: &configuration::Configuration, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + + let uri_str = format!("{}/user/following/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_put_star(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_owner = owner; + let p_path_repo = repo; + + let uri_str = format!("{}/user/starred/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_current_tracked_times(configuration: &configuration::Configuration, page: Option, limit: Option, since: Option, before: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + let p_query_since = since; + let p_query_before = before; + + let uri_str = format!("{}/user/times", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_since { + req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TrackedTime>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TrackedTime>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_delete_access_token(configuration: &configuration::Configuration, username: &str, token: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_path_token = token; + + let uri_str = format!("{}/users/{username}/tokens/{token}", configuration.base_path, username=crate::apis::urlencode(p_path_username), token=crate::apis::urlencode(p_path_token)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_delete_avatar(configuration: &configuration::Configuration, ) -> Result<(), Error> { + + let uri_str = format!("{}/user/avatar", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_delete_email(configuration: &configuration::Configuration, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/user/emails", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_delete_hook(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/user/hooks/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_delete_o_auth2_application(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/user/applications/oauth2/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_edit_hook(configuration: &configuration::Configuration, id: i64, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/user/hooks/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_get(configuration: &configuration::Configuration, username: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + + let uri_str = format!("{}/users/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_get_current(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/user", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_get_heatmap_data(configuration: &configuration::Configuration, username: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + + let uri_str = format!("{}/users/{username}/heatmap", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::UserHeatmapData>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::UserHeatmapData>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_get_hook(configuration: &configuration::Configuration, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/user/hooks/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_get_o_auth2_application(configuration: &configuration::Configuration, id: i64) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + + let uri_str = format!("{}/user/applications/oauth2/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OAuth2Application`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OAuth2Application`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_get_o_auth2_applications(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/applications/oauth2", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::OAuth2Application>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::OAuth2Application>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_get_quota(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/user/quota", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_get_runner_registration_token(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/user/actions/runners/registration-token", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RegistrationToken`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RegistrationToken`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_get_stop_watches(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/stopwatches", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::StopWatch>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::StopWatch>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_get_tokens(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/users/{username}/tokens", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::AccessToken>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::AccessToken>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_activity_feeds(configuration: &configuration::Configuration, username: &str, only_performed_by: Option, date: Option, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_query_only_performed_by = only_performed_by; + let p_query_date = date; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/users/{username}/activities/feeds", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_only_performed_by { + req_builder = req_builder.query(&[("only-performed-by", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_date { + req_builder = req_builder.query(&[("date", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Activity>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Activity>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_blocked_users(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/list_blocked", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::BlockedUser>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::BlockedUser>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_emails(configuration: &configuration::Configuration, ) -> Result, Error> { + + let uri_str = format!("{}/user/emails", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Email>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Email>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_followers(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/users/{username}/followers", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_following(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/users/{username}/following", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_gpg_keys(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/users/{username}/gpg_keys", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::GpgKey>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::GpgKey>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_hooks(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/hooks", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Hook>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Hook>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_keys(configuration: &configuration::Configuration, username: &str, fingerprint: Option<&str>, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_query_fingerprint = fingerprint; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/users/{username}/keys", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_fingerprint { + req_builder = req_builder.query(&[("fingerprint", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PublicKey>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PublicKey>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_quota_artifacts(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/quota/artifacts", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedArtifact>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedArtifact>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_quota_attachments(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/quota/attachments", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedAttachment>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedAttachment>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_quota_packages(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/quota/packages", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedPackage>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedPackage>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_repos(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/users/{username}/repos", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_starred(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/users/{username}/starred", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_subscriptions(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/users/{username}/subscriptions", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_list_teams(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/user/teams", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Team>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Team>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_search(configuration: &configuration::Configuration, q: Option<&str>, uid: Option, sort: Option<&str>, page: Option, limit: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_q = q; + let p_query_uid = uid; + let p_query_sort = sort; + let p_query_page = page; + let p_query_limit = limit; + + let uri_str = format!("{}/users/search", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_q { + req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_uid { + req_builder = req_builder.query(&[("uid", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_sort { + req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_page { + req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserSearchResults`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserSearchResults`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_search_run_jobs(configuration: &configuration::Configuration, labels: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_labels = labels; + + let uri_str = format!("{}/user/actions/runners/jobs", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_labels { + req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionRunJob>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionRunJob>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_unblock_user(configuration: &configuration::Configuration, username: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_username = username; + + let uri_str = format!("{}/user/unblock/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_update_avatar(configuration: &configuration::Configuration, body: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/user/avatar", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_update_o_auth2_application(configuration: &configuration::Configuration, id: i64, body: models::CreateOAuth2ApplicationOptions) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_body_body = body; + + let uri_str = format!("{}/user/applications/oauth2/{id}", configuration.base_path, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OAuth2Application`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OAuth2Application`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn user_verify_gpg_key(configuration: &configuration::Configuration, body: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_body = body; + + let uri_str = format!("{}/user/gpg_key_verify", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("access_token", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("sudo", value)]); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.query(&[("token", value)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-FORGEJO-OTP", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Sudo", value); + }; + if let Some(ref auth_conf) = configuration.basic_auth { + req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); + }; + req_builder = req_builder.json(&p_body_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GpgKey`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GpgKey`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/forgejo-openapi/src/lib.rs b/forgejo-openapi/src/lib.rs new file mode 100644 index 0000000..e152062 --- /dev/null +++ b/forgejo-openapi/src/lib.rs @@ -0,0 +1,11 @@ +#![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] + +extern crate serde_repr; +extern crate serde; +extern crate serde_json; +extern crate url; +extern crate reqwest; + +pub mod apis; +pub mod models; diff --git a/forgejo-openapi/src/models/access_token.rs b/forgejo-openapi/src/models/access_token.rs new file mode 100644 index 0000000..415ba63 --- /dev/null +++ b/forgejo-openapi/src/models/access_token.rs @@ -0,0 +1,39 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AccessToken { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")] + pub scopes: Option>, + #[serde(rename = "sha1", skip_serializing_if = "Option::is_none")] + pub sha1: Option, + #[serde(rename = "token_last_eight", skip_serializing_if = "Option::is_none")] + pub token_last_eight: Option, +} + +impl AccessToken { + pub fn new() -> AccessToken { + AccessToken { + id: None, + name: None, + scopes: None, + sha1: None, + token_last_eight: None, + } + } +} + diff --git a/forgejo-openapi/src/models/action_run.rs b/forgejo-openapi/src/models/action_run.rs new file mode 100644 index 0000000..d2acb63 --- /dev/null +++ b/forgejo-openapi/src/models/action_run.rs @@ -0,0 +1,116 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ActionRun : ActionRun represents an action run +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ActionRun { + /// the cron id for the schedule trigger + #[serde(rename = "ScheduleID", skip_serializing_if = "Option::is_none")] + pub schedule_id: Option, + /// who approved this action run + #[serde(rename = "approved_by", skip_serializing_if = "Option::is_none")] + pub approved_by: Option, + /// the commit sha the action run ran on + #[serde(rename = "commit_sha", skip_serializing_if = "Option::is_none")] + pub commit_sha: Option, + /// when the action run was created + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + /// A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years. + #[serde(rename = "duration", skip_serializing_if = "Option::is_none")] + pub duration: Option, + /// the webhook event that causes the workflow to run + #[serde(rename = "event", skip_serializing_if = "Option::is_none")] + pub event: Option, + /// the payload of the webhook event that causes the workflow to run + #[serde(rename = "event_payload", skip_serializing_if = "Option::is_none")] + pub event_payload: Option, + /// the url of this action run + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + /// the action run id + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + /// a unique number for each run of a repository + #[serde(rename = "index_in_repo", skip_serializing_if = "Option::is_none")] + pub index_in_repo: Option, + /// If this is triggered by a PR from a forked repository or an untrusted user, we need to check if it is approved and limit permissions when running the workflow. + #[serde(rename = "is_fork_pull_request", skip_serializing_if = "Option::is_none")] + pub is_fork_pull_request: Option, + /// has the commit/tag/… the action run ran on been deleted + #[serde(rename = "is_ref_deleted", skip_serializing_if = "Option::is_none")] + pub is_ref_deleted: Option, + /// may need approval if it's a fork pull request + #[serde(rename = "need_approval", skip_serializing_if = "Option::is_none")] + pub need_approval: Option, + /// the commit/tag/… the action run ran on + #[serde(rename = "prettyref", skip_serializing_if = "Option::is_none")] + pub prettyref: Option, + #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] + pub repository: Option>, + /// when the action run was started + #[serde(rename = "started", skip_serializing_if = "Option::is_none")] + pub started: Option, + /// the current status of this run + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, + /// when the action run was stopped + #[serde(rename = "stopped", skip_serializing_if = "Option::is_none")] + pub stopped: Option, + /// the action run's title + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, + /// the trigger event defined in the `on` configuration of the triggered workflow + #[serde(rename = "trigger_event", skip_serializing_if = "Option::is_none")] + pub trigger_event: Option, + #[serde(rename = "trigger_user", skip_serializing_if = "Option::is_none")] + pub trigger_user: Option>, + /// when the action run was last updated + #[serde(rename = "updated", skip_serializing_if = "Option::is_none")] + pub updated: Option, + /// the name of workflow file + #[serde(rename = "workflow_id", skip_serializing_if = "Option::is_none")] + pub workflow_id: Option, +} + +impl ActionRun { + /// ActionRun represents an action run + pub fn new() -> ActionRun { + ActionRun { + schedule_id: None, + approved_by: None, + commit_sha: None, + created: None, + duration: None, + event: None, + event_payload: None, + html_url: None, + id: None, + index_in_repo: None, + is_fork_pull_request: None, + is_ref_deleted: None, + need_approval: None, + prettyref: None, + repository: None, + started: None, + status: None, + stopped: None, + title: None, + trigger_event: None, + trigger_user: None, + updated: None, + workflow_id: None, + } + } +} + diff --git a/forgejo-openapi/src/models/action_run_job.rs b/forgejo-openapi/src/models/action_run_job.rs new file mode 100644 index 0000000..8359d11 --- /dev/null +++ b/forgejo-openapi/src/models/action_run_job.rs @@ -0,0 +1,58 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ActionRunJob : ActionRunJob represents a job of a run +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ActionRunJob { + /// the action run job id + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + /// the action run job name + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// the action run job needed ids + #[serde(rename = "needs", skip_serializing_if = "Option::is_none")] + pub needs: Option>, + /// the owner id + #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")] + pub owner_id: Option, + /// the repository id + #[serde(rename = "repo_id", skip_serializing_if = "Option::is_none")] + pub repo_id: Option, + /// the action run job labels to run on + #[serde(rename = "runs_on", skip_serializing_if = "Option::is_none")] + pub runs_on: Option>, + /// the action run job status + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, + /// the action run job latest task id + #[serde(rename = "task_id", skip_serializing_if = "Option::is_none")] + pub task_id: Option, +} + +impl ActionRunJob { + /// ActionRunJob represents a job of a run + pub fn new() -> ActionRunJob { + ActionRunJob { + id: None, + name: None, + needs: None, + owner_id: None, + repo_id: None, + runs_on: None, + status: None, + task_id: None, + } + } +} + diff --git a/forgejo-openapi/src/models/action_task.rs b/forgejo-openapi/src/models/action_task.rs new file mode 100644 index 0000000..4575536 --- /dev/null +++ b/forgejo-openapi/src/models/action_task.rs @@ -0,0 +1,65 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ActionTask : ActionTask represents a ActionTask +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ActionTask { + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "display_title", skip_serializing_if = "Option::is_none")] + pub display_title: Option, + #[serde(rename = "event", skip_serializing_if = "Option::is_none")] + pub event: Option, + #[serde(rename = "head_branch", skip_serializing_if = "Option::is_none")] + pub head_branch: Option, + #[serde(rename = "head_sha", skip_serializing_if = "Option::is_none")] + pub head_sha: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "run_number", skip_serializing_if = "Option::is_none")] + pub run_number: Option, + #[serde(rename = "run_started_at", skip_serializing_if = "Option::is_none")] + pub run_started_at: Option, + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "workflow_id", skip_serializing_if = "Option::is_none")] + pub workflow_id: Option, +} + +impl ActionTask { + /// ActionTask represents a ActionTask + pub fn new() -> ActionTask { + ActionTask { + created_at: None, + display_title: None, + event: None, + head_branch: None, + head_sha: None, + id: None, + name: None, + run_number: None, + run_started_at: None, + status: None, + updated_at: None, + url: None, + workflow_id: None, + } + } +} + diff --git a/forgejo-openapi/src/models/action_task_response.rs b/forgejo-openapi/src/models/action_task_response.rs new file mode 100644 index 0000000..7e4643c --- /dev/null +++ b/forgejo-openapi/src/models/action_task_response.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ActionTaskResponse : ActionTaskResponse returns a ActionTask +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ActionTaskResponse { + #[serde(rename = "total_count", skip_serializing_if = "Option::is_none")] + pub total_count: Option, + #[serde(rename = "workflow_runs", skip_serializing_if = "Option::is_none")] + pub workflow_runs: Option>, +} + +impl ActionTaskResponse { + /// ActionTaskResponse returns a ActionTask + pub fn new() -> ActionTaskResponse { + ActionTaskResponse { + total_count: None, + workflow_runs: None, + } + } +} + diff --git a/forgejo-openapi/src/models/action_variable.rs b/forgejo-openapi/src/models/action_variable.rs new file mode 100644 index 0000000..75cf5e0 --- /dev/null +++ b/forgejo-openapi/src/models/action_variable.rs @@ -0,0 +1,42 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ActionVariable : ActionVariable return value of the query API +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ActionVariable { + /// the value of the variable + #[serde(rename = "data", skip_serializing_if = "Option::is_none")] + pub data: Option, + /// the name of the variable + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// the owner to which the variable belongs + #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")] + pub owner_id: Option, + /// the repository to which the variable belongs + #[serde(rename = "repo_id", skip_serializing_if = "Option::is_none")] + pub repo_id: Option, +} + +impl ActionVariable { + /// ActionVariable return value of the query API + pub fn new() -> ActionVariable { + ActionVariable { + data: None, + name: None, + owner_id: None, + repo_id: None, + } + } +} + diff --git a/forgejo-openapi/src/models/activity.rs b/forgejo-openapi/src/models/activity.rs new file mode 100644 index 0000000..e8a33bd --- /dev/null +++ b/forgejo-openapi/src/models/activity.rs @@ -0,0 +1,128 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Activity { + #[serde(rename = "act_user", skip_serializing_if = "Option::is_none")] + pub act_user: Option>, + #[serde(rename = "act_user_id", skip_serializing_if = "Option::is_none")] + pub act_user_id: Option, + #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] + pub comment: Option>, + #[serde(rename = "comment_id", skip_serializing_if = "Option::is_none")] + pub comment_id: Option, + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option, + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "is_private", skip_serializing_if = "Option::is_none")] + pub is_private: Option, + /// the type of action + #[serde(rename = "op_type", skip_serializing_if = "Option::is_none")] + pub op_type: Option, + #[serde(rename = "ref_name", skip_serializing_if = "Option::is_none")] + pub ref_name: Option, + #[serde(rename = "repo", skip_serializing_if = "Option::is_none")] + pub repo: Option>, + #[serde(rename = "repo_id", skip_serializing_if = "Option::is_none")] + pub repo_id: Option, + #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")] + pub user_id: Option, +} + +impl Activity { + pub fn new() -> Activity { + Activity { + act_user: None, + act_user_id: None, + comment: None, + comment_id: None, + content: None, + created: None, + id: None, + is_private: None, + op_type: None, + ref_name: None, + repo: None, + repo_id: None, + user_id: None, + } + } +} +/// the type of action +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum OpType { + #[serde(rename = "create_repo")] + CreateRepo, + #[serde(rename = "rename_repo")] + RenameRepo, + #[serde(rename = "star_repo")] + StarRepo, + #[serde(rename = "watch_repo")] + WatchRepo, + #[serde(rename = "commit_repo")] + CommitRepo, + #[serde(rename = "create_issue")] + CreateIssue, + #[serde(rename = "create_pull_request")] + CreatePullRequest, + #[serde(rename = "transfer_repo")] + TransferRepo, + #[serde(rename = "push_tag")] + PushTag, + #[serde(rename = "comment_issue")] + CommentIssue, + #[serde(rename = "merge_pull_request")] + MergePullRequest, + #[serde(rename = "close_issue")] + CloseIssue, + #[serde(rename = "reopen_issue")] + ReopenIssue, + #[serde(rename = "close_pull_request")] + ClosePullRequest, + #[serde(rename = "reopen_pull_request")] + ReopenPullRequest, + #[serde(rename = "delete_tag")] + DeleteTag, + #[serde(rename = "delete_branch")] + DeleteBranch, + #[serde(rename = "mirror_sync_push")] + MirrorSyncPush, + #[serde(rename = "mirror_sync_create")] + MirrorSyncCreate, + #[serde(rename = "mirror_sync_delete")] + MirrorSyncDelete, + #[serde(rename = "approve_pull_request")] + ApprovePullRequest, + #[serde(rename = "reject_pull_request")] + RejectPullRequest, + #[serde(rename = "comment_pull")] + CommentPull, + #[serde(rename = "publish_release")] + PublishRelease, + #[serde(rename = "pull_review_dismissed")] + PullReviewDismissed, + #[serde(rename = "pull_request_ready_for_review")] + PullRequestReadyForReview, + #[serde(rename = "auto_merge_pull_request")] + AutoMergePullRequest, +} + +impl Default for OpType { + fn default() -> OpType { + Self::CreateRepo + } +} + diff --git a/forgejo-openapi/src/models/activity_pub.rs b/forgejo-openapi/src/models/activity_pub.rs new file mode 100644 index 0000000..e4ddeec --- /dev/null +++ b/forgejo-openapi/src/models/activity_pub.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ActivityPub : ActivityPub type +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ActivityPub { + #[serde(rename = "@context", skip_serializing_if = "Option::is_none")] + pub at_context: Option, +} + +impl ActivityPub { + /// ActivityPub type + pub fn new() -> ActivityPub { + ActivityPub { + at_context: None, + } + } +} + diff --git a/forgejo-openapi/src/models/add_collaborator_option.rs b/forgejo-openapi/src/models/add_collaborator_option.rs new file mode 100644 index 0000000..822c87a --- /dev/null +++ b/forgejo-openapi/src/models/add_collaborator_option.rs @@ -0,0 +1,45 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// AddCollaboratorOption : AddCollaboratorOption options when adding a user as a collaborator of a repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AddCollaboratorOption { + #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] + pub permission: Option, +} + +impl AddCollaboratorOption { + /// AddCollaboratorOption options when adding a user as a collaborator of a repository + pub fn new() -> AddCollaboratorOption { + AddCollaboratorOption { + permission: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Permission { + #[serde(rename = "read")] + Read, + #[serde(rename = "write")] + Write, + #[serde(rename = "admin")] + Admin, +} + +impl Default for Permission { + fn default() -> Permission { + Self::Read + } +} + diff --git a/forgejo-openapi/src/models/add_time_option.rs b/forgejo-openapi/src/models/add_time_option.rs new file mode 100644 index 0000000..693c3da --- /dev/null +++ b/forgejo-openapi/src/models/add_time_option.rs @@ -0,0 +1,37 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// AddTimeOption : AddTimeOption options for adding time to an issue +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AddTimeOption { + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + /// time in seconds + #[serde(rename = "time")] + pub time: i64, + /// User who spent the time (optional) + #[serde(rename = "user_name", skip_serializing_if = "Option::is_none")] + pub user_name: Option, +} + +impl AddTimeOption { + /// AddTimeOption options for adding time to an issue + pub fn new(time: i64) -> AddTimeOption { + AddTimeOption { + created: None, + time, + user_name: None, + } + } +} + diff --git a/forgejo-openapi/src/models/annotated_tag.rs b/forgejo-openapi/src/models/annotated_tag.rs new file mode 100644 index 0000000..8dc3598 --- /dev/null +++ b/forgejo-openapi/src/models/annotated_tag.rs @@ -0,0 +1,50 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// AnnotatedTag : AnnotatedTag represents an annotated tag +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AnnotatedTag { + #[serde(rename = "archive_download_count", skip_serializing_if = "Option::is_none")] + pub archive_download_count: Option>, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "object", skip_serializing_if = "Option::is_none")] + pub object: Option>, + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, + #[serde(rename = "tag", skip_serializing_if = "Option::is_none")] + pub tag: Option, + #[serde(rename = "tagger", skip_serializing_if = "Option::is_none")] + pub tagger: Option>, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, +} + +impl AnnotatedTag { + /// AnnotatedTag represents an annotated tag + pub fn new() -> AnnotatedTag { + AnnotatedTag { + archive_download_count: None, + message: None, + object: None, + sha: None, + tag: None, + tagger: None, + url: None, + verification: None, + } + } +} + diff --git a/forgejo-openapi/src/models/annotated_tag_object.rs b/forgejo-openapi/src/models/annotated_tag_object.rs new file mode 100644 index 0000000..bbd67e3 --- /dev/null +++ b/forgejo-openapi/src/models/annotated_tag_object.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// AnnotatedTagObject : AnnotatedTagObject contains meta information of the tag object +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AnnotatedTagObject { + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl AnnotatedTagObject { + /// AnnotatedTagObject contains meta information of the tag object + pub fn new() -> AnnotatedTagObject { + AnnotatedTagObject { + sha: None, + r#type: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/api_error.rs b/forgejo-openapi/src/models/api_error.rs new file mode 100644 index 0000000..1108e3b --- /dev/null +++ b/forgejo-openapi/src/models/api_error.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ApiError : APIError is an api error with a message +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiError { + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl ApiError { + /// APIError is an api error with a message + pub fn new() -> ApiError { + ApiError { + message: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/api_forbidden_error.rs b/forgejo-openapi/src/models/api_forbidden_error.rs new file mode 100644 index 0000000..3b9dd74 --- /dev/null +++ b/forgejo-openapi/src/models/api_forbidden_error.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiForbiddenError { + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl ApiForbiddenError { + pub fn new() -> ApiForbiddenError { + ApiForbiddenError { + message: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/api_internal_server_error.rs b/forgejo-openapi/src/models/api_internal_server_error.rs new file mode 100644 index 0000000..fef2f7b --- /dev/null +++ b/forgejo-openapi/src/models/api_internal_server_error.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiInternalServerError { + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl ApiInternalServerError { + pub fn new() -> ApiInternalServerError { + ApiInternalServerError { + message: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/api_invalid_topics_error.rs b/forgejo-openapi/src/models/api_invalid_topics_error.rs new file mode 100644 index 0000000..ae0adbc --- /dev/null +++ b/forgejo-openapi/src/models/api_invalid_topics_error.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiInvalidTopicsError { + #[serde(rename = "invalidTopics", skip_serializing_if = "Option::is_none")] + pub invalid_topics: Option>, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +impl ApiInvalidTopicsError { + pub fn new() -> ApiInvalidTopicsError { + ApiInvalidTopicsError { + invalid_topics: None, + message: None, + } + } +} + diff --git a/forgejo-openapi/src/models/api_not_found.rs b/forgejo-openapi/src/models/api_not_found.rs new file mode 100644 index 0000000..73c3202 --- /dev/null +++ b/forgejo-openapi/src/models/api_not_found.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiNotFound { + #[serde(rename = "errors", skip_serializing_if = "Option::is_none")] + pub errors: Option>, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl ApiNotFound { + pub fn new() -> ApiNotFound { + ApiNotFound { + errors: None, + message: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/api_repo_archived_error.rs b/forgejo-openapi/src/models/api_repo_archived_error.rs new file mode 100644 index 0000000..b7c7ef8 --- /dev/null +++ b/forgejo-openapi/src/models/api_repo_archived_error.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiRepoArchivedError { + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl ApiRepoArchivedError { + pub fn new() -> ApiRepoArchivedError { + ApiRepoArchivedError { + message: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/api_unauthorized_error.rs b/forgejo-openapi/src/models/api_unauthorized_error.rs new file mode 100644 index 0000000..e1bb472 --- /dev/null +++ b/forgejo-openapi/src/models/api_unauthorized_error.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiUnauthorizedError { + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl ApiUnauthorizedError { + pub fn new() -> ApiUnauthorizedError { + ApiUnauthorizedError { + message: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/api_validation_error.rs b/forgejo-openapi/src/models/api_validation_error.rs new file mode 100644 index 0000000..44503f8 --- /dev/null +++ b/forgejo-openapi/src/models/api_validation_error.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiValidationError { + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl ApiValidationError { + pub fn new() -> ApiValidationError { + ApiValidationError { + message: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/attachment.rs b/forgejo-openapi/src/models/attachment.rs new file mode 100644 index 0000000..5a8c1cc --- /dev/null +++ b/forgejo-openapi/src/models/attachment.rs @@ -0,0 +1,64 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Attachment : Attachment a generic attachment +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Attachment { + #[serde(rename = "browser_download_url", skip_serializing_if = "Option::is_none")] + pub browser_download_url: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "download_count", skip_serializing_if = "Option::is_none")] + pub download_count: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "size", skip_serializing_if = "Option::is_none")] + pub size: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")] + pub uuid: Option, +} + +impl Attachment { + /// Attachment a generic attachment + pub fn new() -> Attachment { + Attachment { + browser_download_url: None, + created_at: None, + download_count: None, + id: None, + name: None, + size: None, + r#type: None, + uuid: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Type { + #[serde(rename = "attachment")] + Attachment, + #[serde(rename = "external")] + External, +} + +impl Default for Type { + fn default() -> Type { + Self::Attachment + } +} + diff --git a/forgejo-openapi/src/models/blocked_user.rs b/forgejo-openapi/src/models/blocked_user.rs new file mode 100644 index 0000000..49a5297 --- /dev/null +++ b/forgejo-openapi/src/models/blocked_user.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BlockedUser { + #[serde(rename = "block_id", skip_serializing_if = "Option::is_none")] + pub block_id: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, +} + +impl BlockedUser { + pub fn new() -> BlockedUser { + BlockedUser { + block_id: None, + created_at: None, + } + } +} + diff --git a/forgejo-openapi/src/models/branch.rs b/forgejo-openapi/src/models/branch.rs new file mode 100644 index 0000000..1369e8a --- /dev/null +++ b/forgejo-openapi/src/models/branch.rs @@ -0,0 +1,53 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Branch : Branch represents a repository branch +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Branch { + #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] + pub commit: Option>, + #[serde(rename = "effective_branch_protection_name", skip_serializing_if = "Option::is_none")] + pub effective_branch_protection_name: Option, + #[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")] + pub enable_status_check: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "protected", skip_serializing_if = "Option::is_none")] + pub protected: Option, + #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] + pub required_approvals: Option, + #[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")] + pub status_check_contexts: Option>, + #[serde(rename = "user_can_merge", skip_serializing_if = "Option::is_none")] + pub user_can_merge: Option, + #[serde(rename = "user_can_push", skip_serializing_if = "Option::is_none")] + pub user_can_push: Option, +} + +impl Branch { + /// Branch represents a repository branch + pub fn new() -> Branch { + Branch { + commit: None, + effective_branch_protection_name: None, + enable_status_check: None, + name: None, + protected: None, + required_approvals: None, + status_check_contexts: None, + user_can_merge: None, + user_can_push: None, + } + } +} + diff --git a/forgejo-openapi/src/models/branch_protection.rs b/forgejo-openapi/src/models/branch_protection.rs new file mode 100644 index 0000000..da03b8c --- /dev/null +++ b/forgejo-openapi/src/models/branch_protection.rs @@ -0,0 +1,108 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// BranchProtection : BranchProtection represents a branch protection for a repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BranchProtection { + #[serde(rename = "apply_to_admins", skip_serializing_if = "Option::is_none")] + pub apply_to_admins: Option, + #[serde(rename = "approvals_whitelist_teams", skip_serializing_if = "Option::is_none")] + pub approvals_whitelist_teams: Option>, + #[serde(rename = "approvals_whitelist_username", skip_serializing_if = "Option::is_none")] + pub approvals_whitelist_username: Option>, + #[serde(rename = "block_on_official_review_requests", skip_serializing_if = "Option::is_none")] + pub block_on_official_review_requests: Option, + #[serde(rename = "block_on_outdated_branch", skip_serializing_if = "Option::is_none")] + pub block_on_outdated_branch: Option, + #[serde(rename = "block_on_rejected_reviews", skip_serializing_if = "Option::is_none")] + pub block_on_rejected_reviews: Option, + /// Deprecated: true + #[serde(rename = "branch_name", skip_serializing_if = "Option::is_none")] + pub branch_name: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "dismiss_stale_approvals", skip_serializing_if = "Option::is_none")] + pub dismiss_stale_approvals: Option, + #[serde(rename = "enable_approvals_whitelist", skip_serializing_if = "Option::is_none")] + pub enable_approvals_whitelist: Option, + #[serde(rename = "enable_merge_whitelist", skip_serializing_if = "Option::is_none")] + pub enable_merge_whitelist: Option, + #[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")] + pub enable_push: Option, + #[serde(rename = "enable_push_whitelist", skip_serializing_if = "Option::is_none")] + pub enable_push_whitelist: Option, + #[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")] + pub enable_status_check: Option, + #[serde(rename = "ignore_stale_approvals", skip_serializing_if = "Option::is_none")] + pub ignore_stale_approvals: Option, + #[serde(rename = "merge_whitelist_teams", skip_serializing_if = "Option::is_none")] + pub merge_whitelist_teams: Option>, + #[serde(rename = "merge_whitelist_usernames", skip_serializing_if = "Option::is_none")] + pub merge_whitelist_usernames: Option>, + #[serde(rename = "protected_file_patterns", skip_serializing_if = "Option::is_none")] + pub protected_file_patterns: Option, + #[serde(rename = "push_whitelist_deploy_keys", skip_serializing_if = "Option::is_none")] + pub push_whitelist_deploy_keys: Option, + #[serde(rename = "push_whitelist_teams", skip_serializing_if = "Option::is_none")] + pub push_whitelist_teams: Option>, + #[serde(rename = "push_whitelist_usernames", skip_serializing_if = "Option::is_none")] + pub push_whitelist_usernames: Option>, + #[serde(rename = "require_signed_commits", skip_serializing_if = "Option::is_none")] + pub require_signed_commits: Option, + #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] + pub required_approvals: Option, + #[serde(rename = "rule_name", skip_serializing_if = "Option::is_none")] + pub rule_name: Option, + #[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")] + pub status_check_contexts: Option>, + #[serde(rename = "unprotected_file_patterns", skip_serializing_if = "Option::is_none")] + pub unprotected_file_patterns: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, +} + +impl BranchProtection { + /// BranchProtection represents a branch protection for a repository + pub fn new() -> BranchProtection { + BranchProtection { + apply_to_admins: None, + approvals_whitelist_teams: None, + approvals_whitelist_username: None, + block_on_official_review_requests: None, + block_on_outdated_branch: None, + block_on_rejected_reviews: None, + branch_name: None, + created_at: None, + dismiss_stale_approvals: None, + enable_approvals_whitelist: None, + enable_merge_whitelist: None, + enable_push: None, + enable_push_whitelist: None, + enable_status_check: None, + ignore_stale_approvals: None, + merge_whitelist_teams: None, + merge_whitelist_usernames: None, + protected_file_patterns: None, + push_whitelist_deploy_keys: None, + push_whitelist_teams: None, + push_whitelist_usernames: None, + require_signed_commits: None, + required_approvals: None, + rule_name: None, + status_check_contexts: None, + unprotected_file_patterns: None, + updated_at: None, + } + } +} + diff --git a/forgejo-openapi/src/models/change_file_operation.rs b/forgejo-openapi/src/models/change_file_operation.rs new file mode 100644 index 0000000..108bbc4 --- /dev/null +++ b/forgejo-openapi/src/models/change_file_operation.rs @@ -0,0 +1,62 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ChangeFileOperation : ChangeFileOperation for creating, updating or deleting a file +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ChangeFileOperation { + /// new or updated file content, must be base64 encoded + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option, + /// old path of the file to move + #[serde(rename = "from_path", skip_serializing_if = "Option::is_none")] + pub from_path: Option, + /// indicates what to do with the file + #[serde(rename = "operation")] + pub operation: Operation, + /// path to the existing or new file + #[serde(rename = "path")] + pub path: String, + /// sha is the SHA for the file that already exists, required for update or delete + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, +} + +impl ChangeFileOperation { + /// ChangeFileOperation for creating, updating or deleting a file + pub fn new(operation: Operation, path: String) -> ChangeFileOperation { + ChangeFileOperation { + content: None, + from_path: None, + operation, + path, + sha: None, + } + } +} +/// indicates what to do with the file +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Operation { + #[serde(rename = "create")] + Create, + #[serde(rename = "update")] + Update, + #[serde(rename = "delete")] + Delete, +} + +impl Default for Operation { + fn default() -> Operation { + Self::Create + } +} + diff --git a/forgejo-openapi/src/models/change_files_options.rs b/forgejo-openapi/src/models/change_files_options.rs new file mode 100644 index 0000000..4978e28 --- /dev/null +++ b/forgejo-openapi/src/models/change_files_options.rs @@ -0,0 +1,55 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ChangeFilesOptions : ChangeFilesOptions options for creating, updating or deleting multiple files 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) +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ChangeFilesOptions { + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option>, + /// branch (optional) to base this file from. if not given, the default branch is used + #[serde(rename = "branch", skip_serializing_if = "Option::is_none")] + pub branch: Option, + #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] + pub committer: Option>, + #[serde(rename = "dates", skip_serializing_if = "Option::is_none")] + pub dates: Option>, + /// list of file operations + #[serde(rename = "files")] + pub files: Vec, + /// message (optional) for the commit of this file. if not supplied, a default message will be used + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + /// new_branch (optional) will make a new branch from `branch` before creating the file + #[serde(rename = "new_branch", skip_serializing_if = "Option::is_none")] + pub new_branch: Option, + /// Add a Signed-off-by trailer by the committer at the end of the commit log message. + #[serde(rename = "signoff", skip_serializing_if = "Option::is_none")] + pub signoff: Option, +} + +impl ChangeFilesOptions { + /// ChangeFilesOptions options for creating, updating or deleting multiple files 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) + pub fn new(files: Vec) -> ChangeFilesOptions { + ChangeFilesOptions { + author: None, + branch: None, + committer: None, + dates: None, + files, + message: None, + new_branch: None, + signoff: None, + } + } +} + diff --git a/forgejo-openapi/src/models/changed_file.rs b/forgejo-openapi/src/models/changed_file.rs new file mode 100644 index 0000000..1208a9b --- /dev/null +++ b/forgejo-openapi/src/models/changed_file.rs @@ -0,0 +1,53 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ChangedFile : ChangedFile store information about files affected by the pull request +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ChangedFile { + #[serde(rename = "additions", skip_serializing_if = "Option::is_none")] + pub additions: Option, + #[serde(rename = "changes", skip_serializing_if = "Option::is_none")] + pub changes: Option, + #[serde(rename = "contents_url", skip_serializing_if = "Option::is_none")] + pub contents_url: Option, + #[serde(rename = "deletions", skip_serializing_if = "Option::is_none")] + pub deletions: Option, + #[serde(rename = "filename", skip_serializing_if = "Option::is_none")] + pub filename: Option, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "previous_filename", skip_serializing_if = "Option::is_none")] + pub previous_filename: Option, + #[serde(rename = "raw_url", skip_serializing_if = "Option::is_none")] + pub raw_url: Option, + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, +} + +impl ChangedFile { + /// ChangedFile store information about files affected by the pull request + pub fn new() -> ChangedFile { + ChangedFile { + additions: None, + changes: None, + contents_url: None, + deletions: None, + filename: None, + html_url: None, + previous_filename: None, + raw_url: None, + status: None, + } + } +} + diff --git a/forgejo-openapi/src/models/combined_status.rs b/forgejo-openapi/src/models/combined_status.rs new file mode 100644 index 0000000..5423fd9 --- /dev/null +++ b/forgejo-openapi/src/models/combined_status.rs @@ -0,0 +1,48 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CombinedStatus : CombinedStatus holds the combined state of several statuses for a single commit +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CombinedStatus { + #[serde(rename = "commit_url", skip_serializing_if = "Option::is_none")] + pub commit_url: Option, + #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] + pub repository: Option>, + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, + /// CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "statuses", skip_serializing_if = "Option::is_none")] + pub statuses: Option>, + #[serde(rename = "total_count", skip_serializing_if = "Option::is_none")] + pub total_count: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl CombinedStatus { + /// CombinedStatus holds the combined state of several statuses for a single commit + pub fn new() -> CombinedStatus { + CombinedStatus { + commit_url: None, + repository: None, + sha: None, + state: None, + statuses: None, + total_count: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/comment.rs b/forgejo-openapi/src/models/comment.rs new file mode 100644 index 0000000..81f2bf5 --- /dev/null +++ b/forgejo-openapi/src/models/comment.rs @@ -0,0 +1,59 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Comment : Comment represents a comment on a commit or issue +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Comment { + #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] + pub assets: Option>, + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "issue_url", skip_serializing_if = "Option::is_none")] + pub issue_url: Option, + #[serde(rename = "original_author", skip_serializing_if = "Option::is_none")] + pub original_author: Option, + #[serde(rename = "original_author_id", skip_serializing_if = "Option::is_none")] + pub original_author_id: Option, + #[serde(rename = "pull_request_url", skip_serializing_if = "Option::is_none")] + pub pull_request_url: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, +} + +impl Comment { + /// Comment represents a comment on a commit or issue + pub fn new() -> Comment { + Comment { + assets: None, + body: None, + created_at: None, + html_url: None, + id: None, + issue_url: None, + original_author: None, + original_author_id: None, + pull_request_url: None, + updated_at: None, + user: None, + } + } +} + diff --git a/forgejo-openapi/src/models/commit.rs b/forgejo-openapi/src/models/commit.rs new file mode 100644 index 0000000..41bf471 --- /dev/null +++ b/forgejo-openapi/src/models/commit.rs @@ -0,0 +1,54 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Commit { + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option>, + #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] + pub commit: Option>, + #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] + pub committer: Option>, + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + #[serde(rename = "files", skip_serializing_if = "Option::is_none")] + pub files: Option>, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "parents", skip_serializing_if = "Option::is_none")] + pub parents: Option>, + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, + #[serde(rename = "stats", skip_serializing_if = "Option::is_none")] + pub stats: Option>, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl Commit { + pub fn new() -> Commit { + Commit { + author: None, + commit: None, + committer: None, + created: None, + files: None, + html_url: None, + parents: None, + sha: None, + stats: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/commit_affected_files.rs b/forgejo-openapi/src/models/commit_affected_files.rs new file mode 100644 index 0000000..b52abd0 --- /dev/null +++ b/forgejo-openapi/src/models/commit_affected_files.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CommitAffectedFiles : CommitAffectedFiles store information about files affected by the commit +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CommitAffectedFiles { + #[serde(rename = "filename", skip_serializing_if = "Option::is_none")] + pub filename: Option, + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, +} + +impl CommitAffectedFiles { + /// CommitAffectedFiles store information about files affected by the commit + pub fn new() -> CommitAffectedFiles { + CommitAffectedFiles { + filename: None, + status: None, + } + } +} + diff --git a/forgejo-openapi/src/models/commit_date_options.rs b/forgejo-openapi/src/models/commit_date_options.rs new file mode 100644 index 0000000..4525539 --- /dev/null +++ b/forgejo-openapi/src/models/commit_date_options.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CommitDateOptions : CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CommitDateOptions { + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option, + #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] + pub committer: Option, +} + +impl CommitDateOptions { + /// CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE + pub fn new() -> CommitDateOptions { + CommitDateOptions { + author: None, + committer: None, + } + } +} + diff --git a/forgejo-openapi/src/models/commit_meta.rs b/forgejo-openapi/src/models/commit_meta.rs new file mode 100644 index 0000000..df9381c --- /dev/null +++ b/forgejo-openapi/src/models/commit_meta.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CommitMeta { + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl CommitMeta { + pub fn new() -> CommitMeta { + CommitMeta { + created: None, + sha: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/commit_stats.rs b/forgejo-openapi/src/models/commit_stats.rs new file mode 100644 index 0000000..5eae8e9 --- /dev/null +++ b/forgejo-openapi/src/models/commit_stats.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CommitStats : CommitStats is statistics for a RepoCommit +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CommitStats { + #[serde(rename = "additions", skip_serializing_if = "Option::is_none")] + pub additions: Option, + #[serde(rename = "deletions", skip_serializing_if = "Option::is_none")] + pub deletions: Option, + #[serde(rename = "total", skip_serializing_if = "Option::is_none")] + pub total: Option, +} + +impl CommitStats { + /// CommitStats is statistics for a RepoCommit + pub fn new() -> CommitStats { + CommitStats { + additions: None, + deletions: None, + total: None, + } + } +} + diff --git a/forgejo-openapi/src/models/commit_status.rs b/forgejo-openapi/src/models/commit_status.rs new file mode 100644 index 0000000..fcaadac --- /dev/null +++ b/forgejo-openapi/src/models/commit_status.rs @@ -0,0 +1,54 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CommitStatus : CommitStatus holds a single status of a single Commit +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CommitStatus { + #[serde(rename = "context", skip_serializing_if = "Option::is_none")] + pub context: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "creator", skip_serializing_if = "Option::is_none")] + pub creator: Option>, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + /// CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, + #[serde(rename = "target_url", skip_serializing_if = "Option::is_none")] + pub target_url: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl CommitStatus { + /// CommitStatus holds a single status of a single Commit + pub fn new() -> CommitStatus { + CommitStatus { + context: None, + created_at: None, + creator: None, + description: None, + id: None, + status: None, + target_url: None, + updated_at: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/commit_user.rs b/forgejo-openapi/src/models/commit_user.rs new file mode 100644 index 0000000..50a76d8 --- /dev/null +++ b/forgejo-openapi/src/models/commit_user.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CommitUser { + #[serde(rename = "date", skip_serializing_if = "Option::is_none")] + pub date: Option, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl CommitUser { + pub fn new() -> CommitUser { + CommitUser { + date: None, + email: None, + name: None, + } + } +} + diff --git a/forgejo-openapi/src/models/compare.rs b/forgejo-openapi/src/models/compare.rs new file mode 100644 index 0000000..ed48273 --- /dev/null +++ b/forgejo-openapi/src/models/compare.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Compare { + #[serde(rename = "commits", skip_serializing_if = "Option::is_none")] + pub commits: Option>, + #[serde(rename = "files", skip_serializing_if = "Option::is_none")] + pub files: Option>, + #[serde(rename = "total_commits", skip_serializing_if = "Option::is_none")] + pub total_commits: Option, +} + +impl Compare { + pub fn new() -> Compare { + Compare { + commits: None, + files: None, + total_commits: None, + } + } +} + diff --git a/forgejo-openapi/src/models/contents_response.rs b/forgejo-openapi/src/models/contents_response.rs new file mode 100644 index 0000000..9c683bb --- /dev/null +++ b/forgejo-openapi/src/models/contents_response.rs @@ -0,0 +1,79 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ContentsResponse : ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContentsResponse { + #[serde(rename = "_links", skip_serializing_if = "Option::is_none")] + pub _links: Option>, + /// `content` is populated when `type` is `file`, otherwise null + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option, + #[serde(rename = "download_url", skip_serializing_if = "Option::is_none")] + pub download_url: Option, + /// `encoding` is populated when `type` is `file`, otherwise null + #[serde(rename = "encoding", skip_serializing_if = "Option::is_none")] + pub encoding: Option, + #[serde(rename = "git_url", skip_serializing_if = "Option::is_none")] + pub git_url: Option, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "last_commit_sha", skip_serializing_if = "Option::is_none")] + pub last_commit_sha: Option, + #[serde(rename = "last_commit_when", skip_serializing_if = "Option::is_none")] + pub last_commit_when: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "path", skip_serializing_if = "Option::is_none")] + pub path: Option, + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, + #[serde(rename = "size", skip_serializing_if = "Option::is_none")] + pub size: Option, + /// `submodule_git_url` is populated when `type` is `submodule`, otherwise null + #[serde(rename = "submodule_git_url", skip_serializing_if = "Option::is_none")] + pub submodule_git_url: Option, + /// `target` is populated when `type` is `symlink`, otherwise null + #[serde(rename = "target", skip_serializing_if = "Option::is_none")] + pub target: Option, + /// `type` will be `file`, `dir`, `symlink`, or `submodule` + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl ContentsResponse { + /// ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content + pub fn new() -> ContentsResponse { + ContentsResponse { + _links: None, + content: None, + download_url: None, + encoding: None, + git_url: None, + html_url: None, + last_commit_sha: None, + last_commit_when: None, + name: None, + path: None, + sha: None, + size: None, + submodule_git_url: None, + target: None, + r#type: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_access_token_option.rs b/forgejo-openapi/src/models/create_access_token_option.rs new file mode 100644 index 0000000..a2d273e --- /dev/null +++ b/forgejo-openapi/src/models/create_access_token_option.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateAccessTokenOption : CreateAccessTokenOption options when create access token +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateAccessTokenOption { + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")] + pub scopes: Option>, +} + +impl CreateAccessTokenOption { + /// CreateAccessTokenOption options when create access token + pub fn new(name: String) -> CreateAccessTokenOption { + CreateAccessTokenOption { + name, + scopes: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_branch_protection_option.rs b/forgejo-openapi/src/models/create_branch_protection_option.rs new file mode 100644 index 0000000..a04658f --- /dev/null +++ b/forgejo-openapi/src/models/create_branch_protection_option.rs @@ -0,0 +1,102 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateBranchProtectionOption : CreateBranchProtectionOption options for creating a branch protection +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateBranchProtectionOption { + #[serde(rename = "apply_to_admins", skip_serializing_if = "Option::is_none")] + pub apply_to_admins: Option, + #[serde(rename = "approvals_whitelist_teams", skip_serializing_if = "Option::is_none")] + pub approvals_whitelist_teams: Option>, + #[serde(rename = "approvals_whitelist_username", skip_serializing_if = "Option::is_none")] + pub approvals_whitelist_username: Option>, + #[serde(rename = "block_on_official_review_requests", skip_serializing_if = "Option::is_none")] + pub block_on_official_review_requests: Option, + #[serde(rename = "block_on_outdated_branch", skip_serializing_if = "Option::is_none")] + pub block_on_outdated_branch: Option, + #[serde(rename = "block_on_rejected_reviews", skip_serializing_if = "Option::is_none")] + pub block_on_rejected_reviews: Option, + /// Deprecated: true + #[serde(rename = "branch_name", skip_serializing_if = "Option::is_none")] + pub branch_name: Option, + #[serde(rename = "dismiss_stale_approvals", skip_serializing_if = "Option::is_none")] + pub dismiss_stale_approvals: Option, + #[serde(rename = "enable_approvals_whitelist", skip_serializing_if = "Option::is_none")] + pub enable_approvals_whitelist: Option, + #[serde(rename = "enable_merge_whitelist", skip_serializing_if = "Option::is_none")] + pub enable_merge_whitelist: Option, + #[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")] + pub enable_push: Option, + #[serde(rename = "enable_push_whitelist", skip_serializing_if = "Option::is_none")] + pub enable_push_whitelist: Option, + #[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")] + pub enable_status_check: Option, + #[serde(rename = "ignore_stale_approvals", skip_serializing_if = "Option::is_none")] + pub ignore_stale_approvals: Option, + #[serde(rename = "merge_whitelist_teams", skip_serializing_if = "Option::is_none")] + pub merge_whitelist_teams: Option>, + #[serde(rename = "merge_whitelist_usernames", skip_serializing_if = "Option::is_none")] + pub merge_whitelist_usernames: Option>, + #[serde(rename = "protected_file_patterns", skip_serializing_if = "Option::is_none")] + pub protected_file_patterns: Option, + #[serde(rename = "push_whitelist_deploy_keys", skip_serializing_if = "Option::is_none")] + pub push_whitelist_deploy_keys: Option, + #[serde(rename = "push_whitelist_teams", skip_serializing_if = "Option::is_none")] + pub push_whitelist_teams: Option>, + #[serde(rename = "push_whitelist_usernames", skip_serializing_if = "Option::is_none")] + pub push_whitelist_usernames: Option>, + #[serde(rename = "require_signed_commits", skip_serializing_if = "Option::is_none")] + pub require_signed_commits: Option, + #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] + pub required_approvals: Option, + #[serde(rename = "rule_name", skip_serializing_if = "Option::is_none")] + pub rule_name: Option, + #[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")] + pub status_check_contexts: Option>, + #[serde(rename = "unprotected_file_patterns", skip_serializing_if = "Option::is_none")] + pub unprotected_file_patterns: Option, +} + +impl CreateBranchProtectionOption { + /// CreateBranchProtectionOption options for creating a branch protection + pub fn new() -> CreateBranchProtectionOption { + CreateBranchProtectionOption { + apply_to_admins: None, + approvals_whitelist_teams: None, + approvals_whitelist_username: None, + block_on_official_review_requests: None, + block_on_outdated_branch: None, + block_on_rejected_reviews: None, + branch_name: None, + dismiss_stale_approvals: None, + enable_approvals_whitelist: None, + enable_merge_whitelist: None, + enable_push: None, + enable_push_whitelist: None, + enable_status_check: None, + ignore_stale_approvals: None, + merge_whitelist_teams: None, + merge_whitelist_usernames: None, + protected_file_patterns: None, + push_whitelist_deploy_keys: None, + push_whitelist_teams: None, + push_whitelist_usernames: None, + require_signed_commits: None, + required_approvals: None, + rule_name: None, + status_check_contexts: None, + unprotected_file_patterns: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_branch_repo_option.rs b/forgejo-openapi/src/models/create_branch_repo_option.rs new file mode 100644 index 0000000..3db48aa --- /dev/null +++ b/forgejo-openapi/src/models/create_branch_repo_option.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateBranchRepoOption : CreateBranchRepoOption options when creating a branch in a repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateBranchRepoOption { + /// Name of the branch to create + #[serde(rename = "new_branch_name")] + pub new_branch_name: String, + /// Deprecated: true Name of the old branch to create from + #[serde(rename = "old_branch_name", skip_serializing_if = "Option::is_none")] + pub old_branch_name: Option, + /// Name of the old branch/tag/commit to create from + #[serde(rename = "old_ref_name", skip_serializing_if = "Option::is_none")] + pub old_ref_name: Option, +} + +impl CreateBranchRepoOption { + /// CreateBranchRepoOption options when creating a branch in a repository + pub fn new(new_branch_name: String) -> CreateBranchRepoOption { + CreateBranchRepoOption { + new_branch_name, + old_branch_name: None, + old_ref_name: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_email_option.rs b/forgejo-openapi/src/models/create_email_option.rs new file mode 100644 index 0000000..6ad8ab8 --- /dev/null +++ b/forgejo-openapi/src/models/create_email_option.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateEmailOption : CreateEmailOption options when creating email addresses +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateEmailOption { + /// email addresses to add + #[serde(rename = "emails", skip_serializing_if = "Option::is_none")] + pub emails: Option>, +} + +impl CreateEmailOption { + /// CreateEmailOption options when creating email addresses + pub fn new() -> CreateEmailOption { + CreateEmailOption { + emails: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_file_options.rs b/forgejo-openapi/src/models/create_file_options.rs new file mode 100644 index 0000000..72fab4a --- /dev/null +++ b/forgejo-openapi/src/models/create_file_options.rs @@ -0,0 +1,55 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateFileOptions : CreateFileOptions options for creating files 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) +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateFileOptions { + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option>, + /// branch (optional) to base this file from. if not given, the default branch is used + #[serde(rename = "branch", skip_serializing_if = "Option::is_none")] + pub branch: Option, + #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] + pub committer: Option>, + /// content must be base64 encoded + #[serde(rename = "content")] + pub content: String, + #[serde(rename = "dates", skip_serializing_if = "Option::is_none")] + pub dates: Option>, + /// message (optional) for the commit of this file. if not supplied, a default message will be used + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + /// new_branch (optional) will make a new branch from `branch` before creating the file + #[serde(rename = "new_branch", skip_serializing_if = "Option::is_none")] + pub new_branch: Option, + /// Add a Signed-off-by trailer by the committer at the end of the commit log message. + #[serde(rename = "signoff", skip_serializing_if = "Option::is_none")] + pub signoff: Option, +} + +impl CreateFileOptions { + /// CreateFileOptions options for creating files 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) + pub fn new(content: String) -> CreateFileOptions { + CreateFileOptions { + author: None, + branch: None, + committer: None, + content, + dates: None, + message: None, + new_branch: None, + signoff: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_fork_option.rs b/forgejo-openapi/src/models/create_fork_option.rs new file mode 100644 index 0000000..5a4b814 --- /dev/null +++ b/forgejo-openapi/src/models/create_fork_option.rs @@ -0,0 +1,34 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateForkOption : CreateForkOption options for creating a fork +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateForkOption { + /// name of the forked repository + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// organization name, if forking into an organization + #[serde(rename = "organization", skip_serializing_if = "Option::is_none")] + pub organization: Option, +} + +impl CreateForkOption { + /// CreateForkOption options for creating a fork + pub fn new() -> CreateForkOption { + CreateForkOption { + name: None, + organization: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_gpg_key_option.rs b/forgejo-openapi/src/models/create_gpg_key_option.rs new file mode 100644 index 0000000..ac27acc --- /dev/null +++ b/forgejo-openapi/src/models/create_gpg_key_option.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateGpgKeyOption : CreateGPGKeyOption options create user GPG key +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateGpgKeyOption { + /// An armored GPG key to add + #[serde(rename = "armored_public_key")] + pub armored_public_key: String, + #[serde(rename = "armored_signature", skip_serializing_if = "Option::is_none")] + pub armored_signature: Option, +} + +impl CreateGpgKeyOption { + /// CreateGPGKeyOption options create user GPG key + pub fn new(armored_public_key: String) -> CreateGpgKeyOption { + CreateGpgKeyOption { + armored_public_key, + armored_signature: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_hook_option.rs b/forgejo-openapi/src/models/create_hook_option.rs new file mode 100644 index 0000000..f03d92e --- /dev/null +++ b/forgejo-openapi/src/models/create_hook_option.rs @@ -0,0 +1,77 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateHookOption : CreateHookOption options when create a hook +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateHookOption { + #[serde(rename = "active", skip_serializing_if = "Option::is_none")] + pub active: Option, + #[serde(rename = "authorization_header", skip_serializing_if = "Option::is_none")] + pub authorization_header: Option, + #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] + pub branch_filter: Option, + /// CreateHookOptionConfig has all config options in it required are \"content_type\" and \"url\" Required + #[serde(rename = "config")] + pub config: std::collections::HashMap, + #[serde(rename = "events", skip_serializing_if = "Option::is_none")] + pub events: Option>, + #[serde(rename = "type")] + pub r#type: Type, +} + +impl CreateHookOption { + /// CreateHookOption options when create a hook + pub fn new(config: std::collections::HashMap, r#type: Type) -> CreateHookOption { + CreateHookOption { + active: None, + authorization_header: None, + branch_filter: None, + config, + events: None, + r#type, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Type { + #[serde(rename = "forgejo")] + Forgejo, + #[serde(rename = "dingtalk")] + Dingtalk, + #[serde(rename = "discord")] + Discord, + #[serde(rename = "gitea")] + Gitea, + #[serde(rename = "gogs")] + Gogs, + #[serde(rename = "msteams")] + Msteams, + #[serde(rename = "slack")] + Slack, + #[serde(rename = "telegram")] + Telegram, + #[serde(rename = "feishu")] + Feishu, + #[serde(rename = "wechatwork")] + Wechatwork, + #[serde(rename = "packagist")] + Packagist, +} + +impl Default for Type { + fn default() -> Type { + Self::Forgejo + } +} + diff --git a/forgejo-openapi/src/models/create_issue_comment_option.rs b/forgejo-openapi/src/models/create_issue_comment_option.rs new file mode 100644 index 0000000..8921fea --- /dev/null +++ b/forgejo-openapi/src/models/create_issue_comment_option.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateIssueCommentOption : CreateIssueCommentOption options for creating a comment on an issue +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateIssueCommentOption { + #[serde(rename = "body")] + pub body: String, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, +} + +impl CreateIssueCommentOption { + /// CreateIssueCommentOption options for creating a comment on an issue + pub fn new(body: String) -> CreateIssueCommentOption { + CreateIssueCommentOption { + body, + updated_at: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_issue_option.rs b/forgejo-openapi/src/models/create_issue_option.rs new file mode 100644 index 0000000..f9517d4 --- /dev/null +++ b/forgejo-openapi/src/models/create_issue_option.rs @@ -0,0 +1,56 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateIssueOption : CreateIssueOption options to create one issue +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateIssueOption { + /// deprecated + #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] + pub assignee: Option, + #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] + pub assignees: Option>, + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "closed", skip_serializing_if = "Option::is_none")] + pub closed: Option, + #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] + pub due_date: Option, + /// list of label ids + #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] + pub labels: Option>, + /// milestone id + #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] + pub milestone: Option, + #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] + pub r#ref: Option, + #[serde(rename = "title")] + pub title: String, +} + +impl CreateIssueOption { + /// CreateIssueOption options to create one issue + pub fn new(title: String) -> CreateIssueOption { + CreateIssueOption { + assignee: None, + assignees: None, + body: None, + closed: None, + due_date: None, + labels: None, + milestone: None, + r#ref: None, + title, + } + } +} + diff --git a/forgejo-openapi/src/models/create_key_option.rs b/forgejo-openapi/src/models/create_key_option.rs new file mode 100644 index 0000000..2bcde50 --- /dev/null +++ b/forgejo-openapi/src/models/create_key_option.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateKeyOption : CreateKeyOption options when creating a key +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateKeyOption { + /// An armored SSH key to add + #[serde(rename = "key")] + pub key: String, + /// Describe if the key has only read access or read/write + #[serde(rename = "read_only", skip_serializing_if = "Option::is_none")] + pub read_only: Option, + /// Title of the key to add + #[serde(rename = "title")] + pub title: String, +} + +impl CreateKeyOption { + /// CreateKeyOption options when creating a key + pub fn new(key: String, title: String) -> CreateKeyOption { + CreateKeyOption { + key, + read_only: None, + title, + } + } +} + diff --git a/forgejo-openapi/src/models/create_label_option.rs b/forgejo-openapi/src/models/create_label_option.rs new file mode 100644 index 0000000..5a787a8 --- /dev/null +++ b/forgejo-openapi/src/models/create_label_option.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateLabelOption : CreateLabelOption options for creating a label +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateLabelOption { + #[serde(rename = "color")] + pub color: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "exclusive", skip_serializing_if = "Option::is_none")] + pub exclusive: Option, + #[serde(rename = "is_archived", skip_serializing_if = "Option::is_none")] + pub is_archived: Option, + #[serde(rename = "name")] + pub name: String, +} + +impl CreateLabelOption { + /// CreateLabelOption options for creating a label + pub fn new(color: String, name: String) -> CreateLabelOption { + CreateLabelOption { + color, + description: None, + exclusive: None, + is_archived: None, + name, + } + } +} + diff --git a/forgejo-openapi/src/models/create_milestone_option.rs b/forgejo-openapi/src/models/create_milestone_option.rs new file mode 100644 index 0000000..18a6552 --- /dev/null +++ b/forgejo-openapi/src/models/create_milestone_option.rs @@ -0,0 +1,52 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateMilestoneOption : CreateMilestoneOption options for creating a milestone +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateMilestoneOption { + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "due_on", skip_serializing_if = "Option::is_none")] + pub due_on: Option, + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, +} + +impl CreateMilestoneOption { + /// CreateMilestoneOption options for creating a milestone + pub fn new() -> CreateMilestoneOption { + CreateMilestoneOption { + description: None, + due_on: None, + state: None, + title: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum State { + #[serde(rename = "open")] + Open, + #[serde(rename = "closed")] + Closed, +} + +impl Default for State { + fn default() -> State { + Self::Open + } +} + diff --git a/forgejo-openapi/src/models/create_o_auth2_application_options.rs b/forgejo-openapi/src/models/create_o_auth2_application_options.rs new file mode 100644 index 0000000..d2171cc --- /dev/null +++ b/forgejo-openapi/src/models/create_o_auth2_application_options.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateOAuth2ApplicationOptions : CreateOAuth2ApplicationOptions holds options to create an oauth2 application +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateOAuth2ApplicationOptions { + #[serde(rename = "confidential_client", skip_serializing_if = "Option::is_none")] + pub confidential_client: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "redirect_uris", skip_serializing_if = "Option::is_none")] + pub redirect_uris: Option>, +} + +impl CreateOAuth2ApplicationOptions { + /// CreateOAuth2ApplicationOptions holds options to create an oauth2 application + pub fn new() -> CreateOAuth2ApplicationOptions { + CreateOAuth2ApplicationOptions { + confidential_client: None, + name: None, + redirect_uris: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_or_update_secret_option.rs b/forgejo-openapi/src/models/create_or_update_secret_option.rs new file mode 100644 index 0000000..dc45871 --- /dev/null +++ b/forgejo-openapi/src/models/create_or_update_secret_option.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateOrUpdateSecretOption : CreateOrUpdateSecretOption options when creating or updating secret +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateOrUpdateSecretOption { + /// Data of the secret to update + #[serde(rename = "data")] + pub data: String, +} + +impl CreateOrUpdateSecretOption { + /// CreateOrUpdateSecretOption options when creating or updating secret + pub fn new(data: String) -> CreateOrUpdateSecretOption { + CreateOrUpdateSecretOption { + data, + } + } +} + diff --git a/forgejo-openapi/src/models/create_org_option.rs b/forgejo-openapi/src/models/create_org_option.rs new file mode 100644 index 0000000..2371bbd --- /dev/null +++ b/forgejo-openapi/src/models/create_org_option.rs @@ -0,0 +1,67 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateOrgOption : CreateOrgOption options for creating an organization +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateOrgOption { + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] + pub full_name: Option, + #[serde(rename = "location", skip_serializing_if = "Option::is_none")] + pub location: Option, + #[serde(rename = "repo_admin_change_team_access", skip_serializing_if = "Option::is_none")] + pub repo_admin_change_team_access: Option, + #[serde(rename = "username")] + pub username: String, + /// possible values are `public` (default), `limited` or `private` + #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] + pub visibility: Option, + #[serde(rename = "website", skip_serializing_if = "Option::is_none")] + pub website: Option, +} + +impl CreateOrgOption { + /// CreateOrgOption options for creating an organization + pub fn new(username: String) -> CreateOrgOption { + CreateOrgOption { + description: None, + email: None, + full_name: None, + location: None, + repo_admin_change_team_access: None, + username, + visibility: None, + website: None, + } + } +} +/// possible values are `public` (default), `limited` or `private` +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Visibility { + #[serde(rename = "public")] + Public, + #[serde(rename = "limited")] + Limited, + #[serde(rename = "private")] + Private, +} + +impl Default for Visibility { + fn default() -> Visibility { + Self::Public + } +} + diff --git a/forgejo-openapi/src/models/create_pull_request_option.rs b/forgejo-openapi/src/models/create_pull_request_option.rs new file mode 100644 index 0000000..67c6534 --- /dev/null +++ b/forgejo-openapi/src/models/create_pull_request_option.rs @@ -0,0 +1,53 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreatePullRequestOption : CreatePullRequestOption options when creating a pull request +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreatePullRequestOption { + #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] + pub assignee: Option, + #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] + pub assignees: Option>, + #[serde(rename = "base", skip_serializing_if = "Option::is_none")] + pub base: Option, + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] + pub due_date: Option, + #[serde(rename = "head", skip_serializing_if = "Option::is_none")] + pub head: Option, + #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] + pub labels: Option>, + #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] + pub milestone: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, +} + +impl CreatePullRequestOption { + /// CreatePullRequestOption options when creating a pull request + pub fn new() -> CreatePullRequestOption { + CreatePullRequestOption { + assignee: None, + assignees: None, + base: None, + body: None, + due_date: None, + head: None, + labels: None, + milestone: None, + title: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_pull_review_comment.rs b/forgejo-openapi/src/models/create_pull_review_comment.rs new file mode 100644 index 0000000..51abafb --- /dev/null +++ b/forgejo-openapi/src/models/create_pull_review_comment.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreatePullReviewComment : CreatePullReviewComment represent a review comment for creation api +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreatePullReviewComment { + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + /// if comment to new file line or 0 + #[serde(rename = "new_position", skip_serializing_if = "Option::is_none")] + pub new_position: Option, + /// if comment to old file line or 0 + #[serde(rename = "old_position", skip_serializing_if = "Option::is_none")] + pub old_position: Option, + /// the tree path + #[serde(rename = "path", skip_serializing_if = "Option::is_none")] + pub path: Option, +} + +impl CreatePullReviewComment { + /// CreatePullReviewComment represent a review comment for creation api + pub fn new() -> CreatePullReviewComment { + CreatePullReviewComment { + body: None, + new_position: None, + old_position: None, + path: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_pull_review_options.rs b/forgejo-openapi/src/models/create_pull_review_options.rs new file mode 100644 index 0000000..7bb3ea0 --- /dev/null +++ b/forgejo-openapi/src/models/create_pull_review_options.rs @@ -0,0 +1,39 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreatePullReviewOptions : CreatePullReviewOptions are options to create a pull review +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreatePullReviewOptions { + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "comments", skip_serializing_if = "Option::is_none")] + pub comments: Option>, + #[serde(rename = "commit_id", skip_serializing_if = "Option::is_none")] + pub commit_id: Option, + /// ReviewStateType review state type + #[serde(rename = "event", skip_serializing_if = "Option::is_none")] + pub event: Option, +} + +impl CreatePullReviewOptions { + /// CreatePullReviewOptions are options to create a pull review + pub fn new() -> CreatePullReviewOptions { + CreatePullReviewOptions { + body: None, + comments: None, + commit_id: None, + event: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_push_mirror_option.rs b/forgejo-openapi/src/models/create_push_mirror_option.rs new file mode 100644 index 0000000..9ec2736 --- /dev/null +++ b/forgejo-openapi/src/models/create_push_mirror_option.rs @@ -0,0 +1,45 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreatePushMirrorOption { + #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] + pub branch_filter: Option, + #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] + pub interval: Option, + #[serde(rename = "remote_address", skip_serializing_if = "Option::is_none")] + pub remote_address: Option, + #[serde(rename = "remote_password", skip_serializing_if = "Option::is_none")] + pub remote_password: Option, + #[serde(rename = "remote_username", skip_serializing_if = "Option::is_none")] + pub remote_username: Option, + #[serde(rename = "sync_on_commit", skip_serializing_if = "Option::is_none")] + pub sync_on_commit: Option, + #[serde(rename = "use_ssh", skip_serializing_if = "Option::is_none")] + pub use_ssh: Option, +} + +impl CreatePushMirrorOption { + pub fn new() -> CreatePushMirrorOption { + CreatePushMirrorOption { + branch_filter: None, + interval: None, + remote_address: None, + remote_password: None, + remote_username: None, + sync_on_commit: None, + use_ssh: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_quota_group_options.rs b/forgejo-openapi/src/models/create_quota_group_options.rs new file mode 100644 index 0000000..ed17ec2 --- /dev/null +++ b/forgejo-openapi/src/models/create_quota_group_options.rs @@ -0,0 +1,34 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateQuotaGroupOptions : CreateQutaGroupOptions represents the options for creating a quota group +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateQuotaGroupOptions { + /// Name of the quota group to create + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Rules to add to the newly created group. If a rule does not exist, it will be created. + #[serde(rename = "rules", skip_serializing_if = "Option::is_none")] + pub rules: Option>, +} + +impl CreateQuotaGroupOptions { + /// CreateQutaGroupOptions represents the options for creating a quota group + pub fn new() -> CreateQuotaGroupOptions { + CreateQuotaGroupOptions { + name: None, + rules: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_quota_rule_options.rs b/forgejo-openapi/src/models/create_quota_rule_options.rs new file mode 100644 index 0000000..9f664d2 --- /dev/null +++ b/forgejo-openapi/src/models/create_quota_rule_options.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateQuotaRuleOptions : CreateQuotaRuleOptions represents the options for creating a quota rule +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateQuotaRuleOptions { + /// The limit set by the rule + #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] + pub limit: Option, + /// Name of the rule to create + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The subjects affected by the rule + #[serde(rename = "subjects", skip_serializing_if = "Option::is_none")] + pub subjects: Option>, +} + +impl CreateQuotaRuleOptions { + /// CreateQuotaRuleOptions represents the options for creating a quota rule + pub fn new() -> CreateQuotaRuleOptions { + CreateQuotaRuleOptions { + limit: None, + name: None, + subjects: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_release_option.rs b/forgejo-openapi/src/models/create_release_option.rs new file mode 100644 index 0000000..e69ef70 --- /dev/null +++ b/forgejo-openapi/src/models/create_release_option.rs @@ -0,0 +1,47 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateReleaseOption : CreateReleaseOption options when creating a release +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateReleaseOption { + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "draft", skip_serializing_if = "Option::is_none")] + pub draft: Option, + #[serde(rename = "hide_archive_links", skip_serializing_if = "Option::is_none")] + pub hide_archive_links: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "prerelease", skip_serializing_if = "Option::is_none")] + pub prerelease: Option, + #[serde(rename = "tag_name")] + pub tag_name: String, + #[serde(rename = "target_commitish", skip_serializing_if = "Option::is_none")] + pub target_commitish: Option, +} + +impl CreateReleaseOption { + /// CreateReleaseOption options when creating a release + pub fn new(tag_name: String) -> CreateReleaseOption { + CreateReleaseOption { + body: None, + draft: None, + hide_archive_links: None, + name: None, + prerelease: None, + tag_name, + target_commitish: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_repo_option.rs b/forgejo-openapi/src/models/create_repo_option.rs new file mode 100644 index 0000000..1a843a1 --- /dev/null +++ b/forgejo-openapi/src/models/create_repo_option.rs @@ -0,0 +1,106 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateRepoOption : CreateRepoOption options when creating repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateRepoOption { + /// Whether the repository should be auto-initialized? + #[serde(rename = "auto_init", skip_serializing_if = "Option::is_none")] + pub auto_init: Option, + /// DefaultBranch of the repository (used when initializes and in template) + #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] + pub default_branch: Option, + /// Description of the repository to create + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + /// Gitignores to use + #[serde(rename = "gitignores", skip_serializing_if = "Option::is_none")] + pub gitignores: Option, + /// Label-Set to use + #[serde(rename = "issue_labels", skip_serializing_if = "Option::is_none")] + pub issue_labels: Option, + /// License to use + #[serde(rename = "license", skip_serializing_if = "Option::is_none")] + pub license: Option, + /// Name of the repository to create + #[serde(rename = "name")] + pub name: String, + /// ObjectFormatName of the underlying git repository + #[serde(rename = "object_format_name", skip_serializing_if = "Option::is_none")] + pub object_format_name: Option, + /// Whether the repository is private + #[serde(rename = "private", skip_serializing_if = "Option::is_none")] + pub private: Option, + /// Readme of the repository to create + #[serde(rename = "readme", skip_serializing_if = "Option::is_none")] + pub readme: Option, + /// Whether the repository is template + #[serde(rename = "template", skip_serializing_if = "Option::is_none")] + pub template: Option, + /// TrustModel of the repository + #[serde(rename = "trust_model", skip_serializing_if = "Option::is_none")] + pub trust_model: Option, +} + +impl CreateRepoOption { + /// CreateRepoOption options when creating repository + pub fn new(name: String) -> CreateRepoOption { + CreateRepoOption { + auto_init: None, + default_branch: None, + description: None, + gitignores: None, + issue_labels: None, + license: None, + name, + object_format_name: None, + private: None, + readme: None, + template: None, + trust_model: None, + } + } +} +/// ObjectFormatName of the underlying git repository +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ObjectFormatName { + #[serde(rename = "sha1")] + Sha1, + #[serde(rename = "sha256")] + Sha256, +} + +impl Default for ObjectFormatName { + fn default() -> ObjectFormatName { + Self::Sha1 + } +} +/// TrustModel of the repository +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TrustModel { + #[serde(rename = "default")] + Default, + #[serde(rename = "collaborator")] + Collaborator, + #[serde(rename = "committer")] + Committer, + #[serde(rename = "collaboratorcommitter")] + Collaboratorcommitter, +} + +impl Default for TrustModel { + fn default() -> TrustModel { + Self::Default + } +} + diff --git a/forgejo-openapi/src/models/create_status_option.rs b/forgejo-openapi/src/models/create_status_option.rs new file mode 100644 index 0000000..a5854f9 --- /dev/null +++ b/forgejo-openapi/src/models/create_status_option.rs @@ -0,0 +1,39 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateStatusOption : CreateStatusOption holds the information needed to create a new CommitStatus for a Commit +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateStatusOption { + #[serde(rename = "context", skip_serializing_if = "Option::is_none")] + pub context: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + /// CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "target_url", skip_serializing_if = "Option::is_none")] + pub target_url: Option, +} + +impl CreateStatusOption { + /// CreateStatusOption holds the information needed to create a new CommitStatus for a Commit + pub fn new() -> CreateStatusOption { + CreateStatusOption { + context: None, + description: None, + state: None, + target_url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_tag_option.rs b/forgejo-openapi/src/models/create_tag_option.rs new file mode 100644 index 0000000..af0a4a3 --- /dev/null +++ b/forgejo-openapi/src/models/create_tag_option.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateTagOption : CreateTagOption options when creating a tag +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateTagOption { + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "tag_name")] + pub tag_name: String, + #[serde(rename = "target", skip_serializing_if = "Option::is_none")] + pub target: Option, +} + +impl CreateTagOption { + /// CreateTagOption options when creating a tag + pub fn new(tag_name: String) -> CreateTagOption { + CreateTagOption { + message: None, + tag_name, + target: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_tag_protection_option.rs b/forgejo-openapi/src/models/create_tag_protection_option.rs new file mode 100644 index 0000000..b3c19c0 --- /dev/null +++ b/forgejo-openapi/src/models/create_tag_protection_option.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateTagProtectionOption : CreateTagProtectionOption options for creating a tag protection +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateTagProtectionOption { + #[serde(rename = "name_pattern", skip_serializing_if = "Option::is_none")] + pub name_pattern: Option, + #[serde(rename = "whitelist_teams", skip_serializing_if = "Option::is_none")] + pub whitelist_teams: Option>, + #[serde(rename = "whitelist_usernames", skip_serializing_if = "Option::is_none")] + pub whitelist_usernames: Option>, +} + +impl CreateTagProtectionOption { + /// CreateTagProtectionOption options for creating a tag protection + pub fn new() -> CreateTagProtectionOption { + CreateTagProtectionOption { + name_pattern: None, + whitelist_teams: None, + whitelist_usernames: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_team_option.rs b/forgejo-openapi/src/models/create_team_option.rs new file mode 100644 index 0000000..13ae528 --- /dev/null +++ b/forgejo-openapi/src/models/create_team_option.rs @@ -0,0 +1,63 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateTeamOption : CreateTeamOption options for creating a team +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateTeamOption { + #[serde(rename = "can_create_org_repo", skip_serializing_if = "Option::is_none")] + pub can_create_org_repo: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "includes_all_repositories", skip_serializing_if = "Option::is_none")] + pub includes_all_repositories: Option, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] + pub permission: Option, + #[serde(rename = "units", skip_serializing_if = "Option::is_none")] + pub units: Option>, + #[serde(rename = "units_map", skip_serializing_if = "Option::is_none")] + pub units_map: Option>, +} + +impl CreateTeamOption { + /// CreateTeamOption options for creating a team + pub fn new(name: String) -> CreateTeamOption { + CreateTeamOption { + can_create_org_repo: None, + description: None, + includes_all_repositories: None, + name, + permission: None, + units: None, + units_map: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Permission { + #[serde(rename = "read")] + Read, + #[serde(rename = "write")] + Write, + #[serde(rename = "admin")] + Admin, +} + +impl Default for Permission { + fn default() -> Permission { + Self::Read + } +} + diff --git a/forgejo-openapi/src/models/create_user_option.rs b/forgejo-openapi/src/models/create_user_option.rs new file mode 100644 index 0000000..d264771 --- /dev/null +++ b/forgejo-openapi/src/models/create_user_option.rs @@ -0,0 +1,60 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateUserOption : CreateUserOption create user options +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateUserOption { + /// For explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to \"now\". + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] + pub full_name: Option, + #[serde(rename = "login_name", skip_serializing_if = "Option::is_none")] + pub login_name: Option, + #[serde(rename = "must_change_password", skip_serializing_if = "Option::is_none")] + pub must_change_password: Option, + #[serde(rename = "password", skip_serializing_if = "Option::is_none")] + pub password: Option, + #[serde(rename = "restricted", skip_serializing_if = "Option::is_none")] + pub restricted: Option, + #[serde(rename = "send_notify", skip_serializing_if = "Option::is_none")] + pub send_notify: Option, + #[serde(rename = "source_id", skip_serializing_if = "Option::is_none")] + pub source_id: Option, + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] + pub visibility: Option, +} + +impl CreateUserOption { + /// CreateUserOption create user options + pub fn new(email: String, username: String) -> CreateUserOption { + CreateUserOption { + created_at: None, + email, + full_name: None, + login_name: None, + must_change_password: None, + password: None, + restricted: None, + send_notify: None, + source_id: None, + username, + visibility: None, + } + } +} + diff --git a/forgejo-openapi/src/models/create_variable_option.rs b/forgejo-openapi/src/models/create_variable_option.rs new file mode 100644 index 0000000..04f957c --- /dev/null +++ b/forgejo-openapi/src/models/create_variable_option.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateVariableOption : CreateVariableOption the option when creating variable +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateVariableOption { + /// Value of the variable to create + #[serde(rename = "value")] + pub value: String, +} + +impl CreateVariableOption { + /// CreateVariableOption the option when creating variable + pub fn new(value: String) -> CreateVariableOption { + CreateVariableOption { + value, + } + } +} + diff --git a/forgejo-openapi/src/models/create_wiki_page_options.rs b/forgejo-openapi/src/models/create_wiki_page_options.rs new file mode 100644 index 0000000..9d6722d --- /dev/null +++ b/forgejo-openapi/src/models/create_wiki_page_options.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateWikiPageOptions : CreateWikiPageOptions form for creating wiki +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateWikiPageOptions { + /// content must be base64 encoded + #[serde(rename = "content_base64", skip_serializing_if = "Option::is_none")] + pub content_base64: Option, + /// optional commit message summarizing the change + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + /// page title. leave empty to keep unchanged + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, +} + +impl CreateWikiPageOptions { + /// CreateWikiPageOptions form for creating wiki + pub fn new() -> CreateWikiPageOptions { + CreateWikiPageOptions { + content_base64: None, + message: None, + title: None, + } + } +} + diff --git a/forgejo-openapi/src/models/cron.rs b/forgejo-openapi/src/models/cron.rs new file mode 100644 index 0000000..3839027 --- /dev/null +++ b/forgejo-openapi/src/models/cron.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Cron : Cron represents a Cron task +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Cron { + #[serde(rename = "exec_times", skip_serializing_if = "Option::is_none")] + pub exec_times: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "next", skip_serializing_if = "Option::is_none")] + pub next: Option, + #[serde(rename = "prev", skip_serializing_if = "Option::is_none")] + pub prev: Option, + #[serde(rename = "schedule", skip_serializing_if = "Option::is_none")] + pub schedule: Option, +} + +impl Cron { + /// Cron represents a Cron task + pub fn new() -> Cron { + Cron { + exec_times: None, + name: None, + next: None, + prev: None, + schedule: None, + } + } +} + diff --git a/forgejo-openapi/src/models/delete_email_option.rs b/forgejo-openapi/src/models/delete_email_option.rs new file mode 100644 index 0000000..1f2e63f --- /dev/null +++ b/forgejo-openapi/src/models/delete_email_option.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// DeleteEmailOption : DeleteEmailOption options when deleting email addresses +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DeleteEmailOption { + /// email addresses to delete + #[serde(rename = "emails", skip_serializing_if = "Option::is_none")] + pub emails: Option>, +} + +impl DeleteEmailOption { + /// DeleteEmailOption options when deleting email addresses + pub fn new() -> DeleteEmailOption { + DeleteEmailOption { + emails: None, + } + } +} + diff --git a/forgejo-openapi/src/models/delete_file_options.rs b/forgejo-openapi/src/models/delete_file_options.rs new file mode 100644 index 0000000..3d8cd2a --- /dev/null +++ b/forgejo-openapi/src/models/delete_file_options.rs @@ -0,0 +1,55 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// DeleteFileOptions : DeleteFileOptions options for deleting files (used for other File structs below) 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) +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DeleteFileOptions { + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option>, + /// branch (optional) to base this file from. if not given, the default branch is used + #[serde(rename = "branch", skip_serializing_if = "Option::is_none")] + pub branch: Option, + #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] + pub committer: Option>, + #[serde(rename = "dates", skip_serializing_if = "Option::is_none")] + pub dates: Option>, + /// message (optional) for the commit of this file. if not supplied, a default message will be used + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + /// new_branch (optional) will make a new branch from `branch` before creating the file + #[serde(rename = "new_branch", skip_serializing_if = "Option::is_none")] + pub new_branch: Option, + /// sha is the SHA for the file that already exists + #[serde(rename = "sha")] + pub sha: String, + /// Add a Signed-off-by trailer by the committer at the end of the commit log message. + #[serde(rename = "signoff", skip_serializing_if = "Option::is_none")] + pub signoff: Option, +} + +impl DeleteFileOptions { + /// DeleteFileOptions options for deleting files (used for other File structs below) 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) + pub fn new(sha: String) -> DeleteFileOptions { + DeleteFileOptions { + author: None, + branch: None, + committer: None, + dates: None, + message: None, + new_branch: None, + sha, + signoff: None, + } + } +} + diff --git a/forgejo-openapi/src/models/delete_labels_option.rs b/forgejo-openapi/src/models/delete_labels_option.rs new file mode 100644 index 0000000..990413d --- /dev/null +++ b/forgejo-openapi/src/models/delete_labels_option.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// DeleteLabelsOption : DeleteLabelOption options for deleting a label +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DeleteLabelsOption { + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, +} + +impl DeleteLabelsOption { + /// DeleteLabelOption options for deleting a label + pub fn new() -> DeleteLabelsOption { + DeleteLabelsOption { + updated_at: None, + } + } +} + diff --git a/forgejo-openapi/src/models/deploy_key.rs b/forgejo-openapi/src/models/deploy_key.rs new file mode 100644 index 0000000..ef4c3d2 --- /dev/null +++ b/forgejo-openapi/src/models/deploy_key.rs @@ -0,0 +1,53 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// DeployKey : DeployKey a deploy key +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DeployKey { + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "fingerprint", skip_serializing_if = "Option::is_none")] + pub fingerprint: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "key", skip_serializing_if = "Option::is_none")] + pub key: Option, + #[serde(rename = "key_id", skip_serializing_if = "Option::is_none")] + pub key_id: Option, + #[serde(rename = "read_only", skip_serializing_if = "Option::is_none")] + pub read_only: Option, + #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] + pub repository: Option>, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl DeployKey { + /// DeployKey a deploy key + pub fn new() -> DeployKey { + DeployKey { + created_at: None, + fingerprint: None, + id: None, + key: None, + key_id: None, + read_only: None, + repository: None, + title: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/dismiss_pull_review_options.rs b/forgejo-openapi/src/models/dismiss_pull_review_options.rs new file mode 100644 index 0000000..4a83b25 --- /dev/null +++ b/forgejo-openapi/src/models/dismiss_pull_review_options.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// DismissPullReviewOptions : DismissPullReviewOptions are options to dismiss a pull review +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DismissPullReviewOptions { + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "priors", skip_serializing_if = "Option::is_none")] + pub priors: Option, +} + +impl DismissPullReviewOptions { + /// DismissPullReviewOptions are options to dismiss a pull review + pub fn new() -> DismissPullReviewOptions { + DismissPullReviewOptions { + message: None, + priors: None, + } + } +} + diff --git a/forgejo-openapi/src/models/dispatch_workflow_option.rs b/forgejo-openapi/src/models/dispatch_workflow_option.rs new file mode 100644 index 0000000..6cffa14 --- /dev/null +++ b/forgejo-openapi/src/models/dispatch_workflow_option.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// DispatchWorkflowOption : DispatchWorkflowOption options when dispatching a workflow +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DispatchWorkflowOption { + /// Input keys and values configured in the workflow file. + #[serde(rename = "inputs", skip_serializing_if = "Option::is_none")] + pub inputs: Option>, + /// Git reference for the workflow + #[serde(rename = "ref")] + pub r#ref: String, + /// Flag to return the run info + #[serde(rename = "return_run_info", skip_serializing_if = "Option::is_none")] + pub return_run_info: Option, +} + +impl DispatchWorkflowOption { + /// DispatchWorkflowOption options when dispatching a workflow + pub fn new(r#ref: String) -> DispatchWorkflowOption { + DispatchWorkflowOption { + inputs: None, + r#ref, + return_run_info: None, + } + } +} + diff --git a/forgejo-openapi/src/models/dispatch_workflow_run.rs b/forgejo-openapi/src/models/dispatch_workflow_run.rs new file mode 100644 index 0000000..f22dc12 --- /dev/null +++ b/forgejo-openapi/src/models/dispatch_workflow_run.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// DispatchWorkflowRun : DispatchWorkflowRun represents a workflow run +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DispatchWorkflowRun { + /// the workflow run id + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + /// the jobs name + #[serde(rename = "jobs", skip_serializing_if = "Option::is_none")] + pub jobs: Option>, + /// a unique number for each run of a repository + #[serde(rename = "run_number", skip_serializing_if = "Option::is_none")] + pub run_number: Option, +} + +impl DispatchWorkflowRun { + /// DispatchWorkflowRun represents a workflow run + pub fn new() -> DispatchWorkflowRun { + DispatchWorkflowRun { + id: None, + jobs: None, + run_number: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_attachment_options.rs b/forgejo-openapi/src/models/edit_attachment_options.rs new file mode 100644 index 0000000..28c8da8 --- /dev/null +++ b/forgejo-openapi/src/models/edit_attachment_options.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditAttachmentOptions : EditAttachmentOptions options for editing attachments +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditAttachmentOptions { + /// (Can only be set if existing attachment is of external type) + #[serde(rename = "browser_download_url", skip_serializing_if = "Option::is_none")] + pub browser_download_url: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl EditAttachmentOptions { + /// EditAttachmentOptions options for editing attachments + pub fn new() -> EditAttachmentOptions { + EditAttachmentOptions { + browser_download_url: None, + name: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_branch_protection_option.rs b/forgejo-openapi/src/models/edit_branch_protection_option.rs new file mode 100644 index 0000000..5fcdbce --- /dev/null +++ b/forgejo-openapi/src/models/edit_branch_protection_option.rs @@ -0,0 +1,95 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditBranchProtectionOption : EditBranchProtectionOption options for editing a branch protection +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditBranchProtectionOption { + #[serde(rename = "apply_to_admins", skip_serializing_if = "Option::is_none")] + pub apply_to_admins: Option, + #[serde(rename = "approvals_whitelist_teams", skip_serializing_if = "Option::is_none")] + pub approvals_whitelist_teams: Option>, + #[serde(rename = "approvals_whitelist_username", skip_serializing_if = "Option::is_none")] + pub approvals_whitelist_username: Option>, + #[serde(rename = "block_on_official_review_requests", skip_serializing_if = "Option::is_none")] + pub block_on_official_review_requests: Option, + #[serde(rename = "block_on_outdated_branch", skip_serializing_if = "Option::is_none")] + pub block_on_outdated_branch: Option, + #[serde(rename = "block_on_rejected_reviews", skip_serializing_if = "Option::is_none")] + pub block_on_rejected_reviews: Option, + #[serde(rename = "dismiss_stale_approvals", skip_serializing_if = "Option::is_none")] + pub dismiss_stale_approvals: Option, + #[serde(rename = "enable_approvals_whitelist", skip_serializing_if = "Option::is_none")] + pub enable_approvals_whitelist: Option, + #[serde(rename = "enable_merge_whitelist", skip_serializing_if = "Option::is_none")] + pub enable_merge_whitelist: Option, + #[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")] + pub enable_push: Option, + #[serde(rename = "enable_push_whitelist", skip_serializing_if = "Option::is_none")] + pub enable_push_whitelist: Option, + #[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")] + pub enable_status_check: Option, + #[serde(rename = "ignore_stale_approvals", skip_serializing_if = "Option::is_none")] + pub ignore_stale_approvals: Option, + #[serde(rename = "merge_whitelist_teams", skip_serializing_if = "Option::is_none")] + pub merge_whitelist_teams: Option>, + #[serde(rename = "merge_whitelist_usernames", skip_serializing_if = "Option::is_none")] + pub merge_whitelist_usernames: Option>, + #[serde(rename = "protected_file_patterns", skip_serializing_if = "Option::is_none")] + pub protected_file_patterns: Option, + #[serde(rename = "push_whitelist_deploy_keys", skip_serializing_if = "Option::is_none")] + pub push_whitelist_deploy_keys: Option, + #[serde(rename = "push_whitelist_teams", skip_serializing_if = "Option::is_none")] + pub push_whitelist_teams: Option>, + #[serde(rename = "push_whitelist_usernames", skip_serializing_if = "Option::is_none")] + pub push_whitelist_usernames: Option>, + #[serde(rename = "require_signed_commits", skip_serializing_if = "Option::is_none")] + pub require_signed_commits: Option, + #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] + pub required_approvals: Option, + #[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")] + pub status_check_contexts: Option>, + #[serde(rename = "unprotected_file_patterns", skip_serializing_if = "Option::is_none")] + pub unprotected_file_patterns: Option, +} + +impl EditBranchProtectionOption { + /// EditBranchProtectionOption options for editing a branch protection + pub fn new() -> EditBranchProtectionOption { + EditBranchProtectionOption { + apply_to_admins: None, + approvals_whitelist_teams: None, + approvals_whitelist_username: None, + block_on_official_review_requests: None, + block_on_outdated_branch: None, + block_on_rejected_reviews: None, + dismiss_stale_approvals: None, + enable_approvals_whitelist: None, + enable_merge_whitelist: None, + enable_push: None, + enable_push_whitelist: None, + enable_status_check: None, + ignore_stale_approvals: None, + merge_whitelist_teams: None, + merge_whitelist_usernames: None, + protected_file_patterns: None, + push_whitelist_deploy_keys: None, + push_whitelist_teams: None, + push_whitelist_usernames: None, + require_signed_commits: None, + required_approvals: None, + status_check_contexts: None, + unprotected_file_patterns: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_deadline_option.rs b/forgejo-openapi/src/models/edit_deadline_option.rs new file mode 100644 index 0000000..456e8dc --- /dev/null +++ b/forgejo-openapi/src/models/edit_deadline_option.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditDeadlineOption : EditDeadlineOption options for creating a deadline +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditDeadlineOption { + #[serde(rename = "due_date")] + pub due_date: String, +} + +impl EditDeadlineOption { + /// EditDeadlineOption options for creating a deadline + pub fn new(due_date: String) -> EditDeadlineOption { + EditDeadlineOption { + due_date, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_git_hook_option.rs b/forgejo-openapi/src/models/edit_git_hook_option.rs new file mode 100644 index 0000000..efbe27e --- /dev/null +++ b/forgejo-openapi/src/models/edit_git_hook_option.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditGitHookOption : EditGitHookOption options when modifying one Git hook +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditGitHookOption { + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option, +} + +impl EditGitHookOption { + /// EditGitHookOption options when modifying one Git hook + pub fn new() -> EditGitHookOption { + EditGitHookOption { + content: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_hook_option.rs b/forgejo-openapi/src/models/edit_hook_option.rs new file mode 100644 index 0000000..833bf4f --- /dev/null +++ b/forgejo-openapi/src/models/edit_hook_option.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditHookOption : EditHookOption options when modify one hook +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditHookOption { + #[serde(rename = "active", skip_serializing_if = "Option::is_none")] + pub active: Option, + #[serde(rename = "authorization_header", skip_serializing_if = "Option::is_none")] + pub authorization_header: Option, + #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] + pub branch_filter: Option, + #[serde(rename = "config", skip_serializing_if = "Option::is_none")] + pub config: Option>, + #[serde(rename = "events", skip_serializing_if = "Option::is_none")] + pub events: Option>, +} + +impl EditHookOption { + /// EditHookOption options when modify one hook + pub fn new() -> EditHookOption { + EditHookOption { + active: None, + authorization_header: None, + branch_filter: None, + config: None, + events: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_issue_comment_option.rs b/forgejo-openapi/src/models/edit_issue_comment_option.rs new file mode 100644 index 0000000..abf1758 --- /dev/null +++ b/forgejo-openapi/src/models/edit_issue_comment_option.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditIssueCommentOption : EditIssueCommentOption options for editing a comment +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditIssueCommentOption { + #[serde(rename = "body")] + pub body: String, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, +} + +impl EditIssueCommentOption { + /// EditIssueCommentOption options for editing a comment + pub fn new(body: String) -> EditIssueCommentOption { + EditIssueCommentOption { + body, + updated_at: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_issue_option.rs b/forgejo-openapi/src/models/edit_issue_option.rs new file mode 100644 index 0000000..6413942 --- /dev/null +++ b/forgejo-openapi/src/models/edit_issue_option.rs @@ -0,0 +1,57 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditIssueOption : EditIssueOption options for editing an issue +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditIssueOption { + /// deprecated + #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] + pub assignee: Option, + #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] + pub assignees: Option>, + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] + pub due_date: Option, + #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] + pub milestone: Option, + #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] + pub r#ref: Option, + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, + #[serde(rename = "unset_due_date", skip_serializing_if = "Option::is_none")] + pub unset_due_date: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, +} + +impl EditIssueOption { + /// EditIssueOption options for editing an issue + pub fn new() -> EditIssueOption { + EditIssueOption { + assignee: None, + assignees: None, + body: None, + due_date: None, + milestone: None, + r#ref: None, + state: None, + title: None, + unset_due_date: None, + updated_at: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_label_option.rs b/forgejo-openapi/src/models/edit_label_option.rs new file mode 100644 index 0000000..57a507c --- /dev/null +++ b/forgejo-openapi/src/models/edit_label_option.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditLabelOption : EditLabelOption options for editing a label +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditLabelOption { + #[serde(rename = "color", skip_serializing_if = "Option::is_none")] + pub color: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "exclusive", skip_serializing_if = "Option::is_none")] + pub exclusive: Option, + #[serde(rename = "is_archived", skip_serializing_if = "Option::is_none")] + pub is_archived: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl EditLabelOption { + /// EditLabelOption options for editing a label + pub fn new() -> EditLabelOption { + EditLabelOption { + color: None, + description: None, + exclusive: None, + is_archived: None, + name: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_milestone_option.rs b/forgejo-openapi/src/models/edit_milestone_option.rs new file mode 100644 index 0000000..0086424 --- /dev/null +++ b/forgejo-openapi/src/models/edit_milestone_option.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditMilestoneOption : EditMilestoneOption options for editing a milestone +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditMilestoneOption { + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "due_on", skip_serializing_if = "Option::is_none")] + pub due_on: Option, + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, +} + +impl EditMilestoneOption { + /// EditMilestoneOption options for editing a milestone + pub fn new() -> EditMilestoneOption { + EditMilestoneOption { + description: None, + due_on: None, + state: None, + title: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_org_option.rs b/forgejo-openapi/src/models/edit_org_option.rs new file mode 100644 index 0000000..0339cf0 --- /dev/null +++ b/forgejo-openapi/src/models/edit_org_option.rs @@ -0,0 +1,64 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditOrgOption : EditOrgOption options for editing an organization +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditOrgOption { + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] + pub full_name: Option, + #[serde(rename = "location", skip_serializing_if = "Option::is_none")] + pub location: Option, + #[serde(rename = "repo_admin_change_team_access", skip_serializing_if = "Option::is_none")] + pub repo_admin_change_team_access: Option, + /// possible values are `public`, `limited` or `private` + #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] + pub visibility: Option, + #[serde(rename = "website", skip_serializing_if = "Option::is_none")] + pub website: Option, +} + +impl EditOrgOption { + /// EditOrgOption options for editing an organization + pub fn new() -> EditOrgOption { + EditOrgOption { + description: None, + email: None, + full_name: None, + location: None, + repo_admin_change_team_access: None, + visibility: None, + website: None, + } + } +} +/// possible values are `public`, `limited` or `private` +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Visibility { + #[serde(rename = "public")] + Public, + #[serde(rename = "limited")] + Limited, + #[serde(rename = "private")] + Private, +} + +impl Default for Visibility { + fn default() -> Visibility { + Self::Public + } +} + diff --git a/forgejo-openapi/src/models/edit_pull_request_option.rs b/forgejo-openapi/src/models/edit_pull_request_option.rs new file mode 100644 index 0000000..97e794f --- /dev/null +++ b/forgejo-openapi/src/models/edit_pull_request_option.rs @@ -0,0 +1,59 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditPullRequestOption : EditPullRequestOption options when modify pull request +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditPullRequestOption { + #[serde(rename = "allow_maintainer_edit", skip_serializing_if = "Option::is_none")] + pub allow_maintainer_edit: Option, + #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] + pub assignee: Option, + #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] + pub assignees: Option>, + #[serde(rename = "base", skip_serializing_if = "Option::is_none")] + pub base: Option, + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] + pub due_date: Option, + #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] + pub labels: Option>, + #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] + pub milestone: Option, + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, + #[serde(rename = "unset_due_date", skip_serializing_if = "Option::is_none")] + pub unset_due_date: Option, +} + +impl EditPullRequestOption { + /// EditPullRequestOption options when modify pull request + pub fn new() -> EditPullRequestOption { + EditPullRequestOption { + allow_maintainer_edit: None, + assignee: None, + assignees: None, + base: None, + body: None, + due_date: None, + labels: None, + milestone: None, + state: None, + title: None, + unset_due_date: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_quota_rule_options.rs b/forgejo-openapi/src/models/edit_quota_rule_options.rs new file mode 100644 index 0000000..aa9138d --- /dev/null +++ b/forgejo-openapi/src/models/edit_quota_rule_options.rs @@ -0,0 +1,34 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditQuotaRuleOptions : EditQuotaRuleOptions represents the options for editing a quota rule +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditQuotaRuleOptions { + /// The limit set by the rule + #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] + pub limit: Option, + /// The subjects affected by the rule + #[serde(rename = "subjects", skip_serializing_if = "Option::is_none")] + pub subjects: Option>, +} + +impl EditQuotaRuleOptions { + /// EditQuotaRuleOptions represents the options for editing a quota rule + pub fn new() -> EditQuotaRuleOptions { + EditQuotaRuleOptions { + limit: None, + subjects: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_reaction_option.rs b/forgejo-openapi/src/models/edit_reaction_option.rs new file mode 100644 index 0000000..cf74424 --- /dev/null +++ b/forgejo-openapi/src/models/edit_reaction_option.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditReactionOption : EditReactionOption contain the reaction type +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditReactionOption { + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option, +} + +impl EditReactionOption { + /// EditReactionOption contain the reaction type + pub fn new() -> EditReactionOption { + EditReactionOption { + content: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_release_option.rs b/forgejo-openapi/src/models/edit_release_option.rs new file mode 100644 index 0000000..1667019 --- /dev/null +++ b/forgejo-openapi/src/models/edit_release_option.rs @@ -0,0 +1,47 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditReleaseOption : EditReleaseOption options when editing a release +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditReleaseOption { + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "draft", skip_serializing_if = "Option::is_none")] + pub draft: Option, + #[serde(rename = "hide_archive_links", skip_serializing_if = "Option::is_none")] + pub hide_archive_links: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "prerelease", skip_serializing_if = "Option::is_none")] + pub prerelease: Option, + #[serde(rename = "tag_name", skip_serializing_if = "Option::is_none")] + pub tag_name: Option, + #[serde(rename = "target_commitish", skip_serializing_if = "Option::is_none")] + pub target_commitish: Option, +} + +impl EditReleaseOption { + /// EditReleaseOption options when editing a release + pub fn new() -> EditReleaseOption { + EditReleaseOption { + body: None, + draft: None, + hide_archive_links: None, + name: None, + prerelease: None, + tag_name: None, + target_commitish: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_repo_option.rs b/forgejo-openapi/src/models/edit_repo_option.rs new file mode 100644 index 0000000..1f7726b --- /dev/null +++ b/forgejo-openapi/src/models/edit_repo_option.rs @@ -0,0 +1,159 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditRepoOption : EditRepoOption options when editing a repository's properties +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditRepoOption { + /// either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging. + #[serde(rename = "allow_fast_forward_only_merge", skip_serializing_if = "Option::is_none")] + pub allow_fast_forward_only_merge: Option, + /// either `true` to allow mark pr as merged manually, or `false` to prevent it. + #[serde(rename = "allow_manual_merge", skip_serializing_if = "Option::is_none")] + pub allow_manual_merge: Option, + /// either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + #[serde(rename = "allow_merge_commits", skip_serializing_if = "Option::is_none")] + pub allow_merge_commits: Option, + /// either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + #[serde(rename = "allow_rebase", skip_serializing_if = "Option::is_none")] + pub allow_rebase: Option, + /// either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. + #[serde(rename = "allow_rebase_explicit", skip_serializing_if = "Option::is_none")] + pub allow_rebase_explicit: Option, + /// either `true` to allow updating pull request branch by rebase, or `false` to prevent it. + #[serde(rename = "allow_rebase_update", skip_serializing_if = "Option::is_none")] + pub allow_rebase_update: Option, + /// either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + #[serde(rename = "allow_squash_merge", skip_serializing_if = "Option::is_none")] + pub allow_squash_merge: Option, + /// set to `true` to archive this repository. + #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] + pub archived: Option, + /// either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. + #[serde(rename = "autodetect_manual_merge", skip_serializing_if = "Option::is_none")] + pub autodetect_manual_merge: Option, + /// set to `true` to allow edits from maintainers by default + #[serde(rename = "default_allow_maintainer_edit", skip_serializing_if = "Option::is_none")] + pub default_allow_maintainer_edit: Option, + /// sets the default branch for this repository. + #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] + pub default_branch: Option, + /// set to `true` to delete pr branch after merge by default + #[serde(rename = "default_delete_branch_after_merge", skip_serializing_if = "Option::is_none")] + pub default_delete_branch_after_merge: Option, + /// set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", \"fast-forward-only\", \"manually-merged\", or \"rebase-update-only\". + #[serde(rename = "default_merge_style", skip_serializing_if = "Option::is_none")] + pub default_merge_style: Option, + /// set to a update style to be used by this repository: \"rebase\" or \"merge\" + #[serde(rename = "default_update_style", skip_serializing_if = "Option::is_none")] + pub default_update_style: Option, + /// a short description of the repository. + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + /// enable prune - remove obsolete remote-tracking references when mirroring + #[serde(rename = "enable_prune", skip_serializing_if = "Option::is_none")] + pub enable_prune: Option, + #[serde(rename = "external_tracker", skip_serializing_if = "Option::is_none")] + pub external_tracker: Option>, + #[serde(rename = "external_wiki", skip_serializing_if = "Option::is_none")] + pub external_wiki: Option>, + /// set the globally editable state of the wiki + #[serde(rename = "globally_editable_wiki", skip_serializing_if = "Option::is_none")] + pub globally_editable_wiki: Option, + /// either `true` to enable actions unit, or `false` to disable them. + #[serde(rename = "has_actions", skip_serializing_if = "Option::is_none")] + pub has_actions: Option, + /// either `true` to enable issues for this repository or `false` to disable them. + #[serde(rename = "has_issues", skip_serializing_if = "Option::is_none")] + pub has_issues: Option, + /// either `true` to enable packages unit, or `false` to disable them. + #[serde(rename = "has_packages", skip_serializing_if = "Option::is_none")] + pub has_packages: Option, + /// either `true` to enable project unit, or `false` to disable them. + #[serde(rename = "has_projects", skip_serializing_if = "Option::is_none")] + pub has_projects: Option, + /// either `true` to allow pull requests, or `false` to prevent pull request. + #[serde(rename = "has_pull_requests", skip_serializing_if = "Option::is_none")] + pub has_pull_requests: Option, + /// either `true` to enable releases unit, or `false` to disable them. + #[serde(rename = "has_releases", skip_serializing_if = "Option::is_none")] + pub has_releases: Option, + /// either `true` to enable the wiki for this repository or `false` to disable it. + #[serde(rename = "has_wiki", skip_serializing_if = "Option::is_none")] + pub has_wiki: Option, + /// either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. + #[serde(rename = "ignore_whitespace_conflicts", skip_serializing_if = "Option::is_none")] + pub ignore_whitespace_conflicts: Option, + #[serde(rename = "internal_tracker", skip_serializing_if = "Option::is_none")] + pub internal_tracker: Option>, + /// set to a string like `8h30m0s` to set the mirror interval time + #[serde(rename = "mirror_interval", skip_serializing_if = "Option::is_none")] + pub mirror_interval: Option, + /// name of the repository + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. + #[serde(rename = "private", skip_serializing_if = "Option::is_none")] + pub private: Option, + /// either `true` to make this repository a template or `false` to make it a normal repository + #[serde(rename = "template", skip_serializing_if = "Option::is_none")] + pub template: Option, + /// a URL with more information about the repository. + #[serde(rename = "website", skip_serializing_if = "Option::is_none")] + pub website: Option, + /// sets the branch used for this repository's wiki. + #[serde(rename = "wiki_branch", skip_serializing_if = "Option::is_none")] + pub wiki_branch: Option, +} + +impl EditRepoOption { + /// EditRepoOption options when editing a repository's properties + pub fn new() -> EditRepoOption { + EditRepoOption { + allow_fast_forward_only_merge: None, + allow_manual_merge: None, + allow_merge_commits: None, + allow_rebase: None, + allow_rebase_explicit: None, + allow_rebase_update: None, + allow_squash_merge: None, + archived: None, + autodetect_manual_merge: None, + default_allow_maintainer_edit: None, + default_branch: None, + default_delete_branch_after_merge: None, + default_merge_style: None, + default_update_style: None, + description: None, + enable_prune: None, + external_tracker: None, + external_wiki: None, + globally_editable_wiki: None, + has_actions: None, + has_issues: None, + has_packages: None, + has_projects: None, + has_pull_requests: None, + has_releases: None, + has_wiki: None, + ignore_whitespace_conflicts: None, + internal_tracker: None, + mirror_interval: None, + name: None, + private: None, + template: None, + website: None, + wiki_branch: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_tag_protection_option.rs b/forgejo-openapi/src/models/edit_tag_protection_option.rs new file mode 100644 index 0000000..e67ab21 --- /dev/null +++ b/forgejo-openapi/src/models/edit_tag_protection_option.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditTagProtectionOption : EditTagProtectionOption options for editing a tag protection +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditTagProtectionOption { + #[serde(rename = "name_pattern", skip_serializing_if = "Option::is_none")] + pub name_pattern: Option, + #[serde(rename = "whitelist_teams", skip_serializing_if = "Option::is_none")] + pub whitelist_teams: Option>, + #[serde(rename = "whitelist_usernames", skip_serializing_if = "Option::is_none")] + pub whitelist_usernames: Option>, +} + +impl EditTagProtectionOption { + /// EditTagProtectionOption options for editing a tag protection + pub fn new() -> EditTagProtectionOption { + EditTagProtectionOption { + name_pattern: None, + whitelist_teams: None, + whitelist_usernames: None, + } + } +} + diff --git a/forgejo-openapi/src/models/edit_team_option.rs b/forgejo-openapi/src/models/edit_team_option.rs new file mode 100644 index 0000000..c2c5bff --- /dev/null +++ b/forgejo-openapi/src/models/edit_team_option.rs @@ -0,0 +1,63 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditTeamOption : EditTeamOption options for editing a team +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditTeamOption { + #[serde(rename = "can_create_org_repo", skip_serializing_if = "Option::is_none")] + pub can_create_org_repo: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "includes_all_repositories", skip_serializing_if = "Option::is_none")] + pub includes_all_repositories: Option, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] + pub permission: Option, + #[serde(rename = "units", skip_serializing_if = "Option::is_none")] + pub units: Option>, + #[serde(rename = "units_map", skip_serializing_if = "Option::is_none")] + pub units_map: Option>, +} + +impl EditTeamOption { + /// EditTeamOption options for editing a team + pub fn new(name: String) -> EditTeamOption { + EditTeamOption { + can_create_org_repo: None, + description: None, + includes_all_repositories: None, + name, + permission: None, + units: None, + units_map: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Permission { + #[serde(rename = "read")] + Read, + #[serde(rename = "write")] + Write, + #[serde(rename = "admin")] + Admin, +} + +impl Default for Permission { + fn default() -> Permission { + Self::Read + } +} + diff --git a/forgejo-openapi/src/models/edit_user_option.rs b/forgejo-openapi/src/models/edit_user_option.rs new file mode 100644 index 0000000..5bb2e6b --- /dev/null +++ b/forgejo-openapi/src/models/edit_user_option.rs @@ -0,0 +1,86 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// EditUserOption : EditUserOption edit user options +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditUserOption { + #[serde(rename = "active", skip_serializing_if = "Option::is_none")] + pub active: Option, + #[serde(rename = "admin", skip_serializing_if = "Option::is_none")] + pub admin: Option, + #[serde(rename = "allow_create_organization", skip_serializing_if = "Option::is_none")] + pub allow_create_organization: Option, + #[serde(rename = "allow_git_hook", skip_serializing_if = "Option::is_none")] + pub allow_git_hook: Option, + #[serde(rename = "allow_import_local", skip_serializing_if = "Option::is_none")] + pub allow_import_local: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] + pub full_name: Option, + #[serde(rename = "hide_email", skip_serializing_if = "Option::is_none")] + pub hide_email: Option, + #[serde(rename = "location", skip_serializing_if = "Option::is_none")] + pub location: Option, + #[serde(rename = "login_name", skip_serializing_if = "Option::is_none")] + pub login_name: Option, + #[serde(rename = "max_repo_creation", skip_serializing_if = "Option::is_none")] + pub max_repo_creation: Option, + #[serde(rename = "must_change_password", skip_serializing_if = "Option::is_none")] + pub must_change_password: Option, + #[serde(rename = "password", skip_serializing_if = "Option::is_none")] + pub password: Option, + #[serde(rename = "prohibit_login", skip_serializing_if = "Option::is_none")] + pub prohibit_login: Option, + #[serde(rename = "pronouns", skip_serializing_if = "Option::is_none")] + pub pronouns: Option, + #[serde(rename = "restricted", skip_serializing_if = "Option::is_none")] + pub restricted: Option, + #[serde(rename = "source_id", skip_serializing_if = "Option::is_none")] + pub source_id: Option, + #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] + pub visibility: Option, + #[serde(rename = "website", skip_serializing_if = "Option::is_none")] + pub website: Option, +} + +impl EditUserOption { + /// EditUserOption edit user options + pub fn new() -> EditUserOption { + EditUserOption { + active: None, + admin: None, + allow_create_organization: None, + allow_git_hook: None, + allow_import_local: None, + description: None, + email: None, + full_name: None, + hide_email: None, + location: None, + login_name: None, + max_repo_creation: None, + must_change_password: None, + password: None, + prohibit_login: None, + pronouns: None, + restricted: None, + source_id: None, + visibility: None, + website: None, + } + } +} + diff --git a/forgejo-openapi/src/models/email.rs b/forgejo-openapi/src/models/email.rs new file mode 100644 index 0000000..400a38d --- /dev/null +++ b/forgejo-openapi/src/models/email.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Email : Email an email address belonging to a user +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Email { + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "primary", skip_serializing_if = "Option::is_none")] + pub primary: Option, + #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")] + pub user_id: Option, + #[serde(rename = "username", skip_serializing_if = "Option::is_none")] + pub username: Option, + #[serde(rename = "verified", skip_serializing_if = "Option::is_none")] + pub verified: Option, +} + +impl Email { + /// Email an email address belonging to a user + pub fn new() -> Email { + Email { + email: None, + primary: None, + user_id: None, + username: None, + verified: None, + } + } +} + diff --git a/forgejo-openapi/src/models/external_tracker.rs b/forgejo-openapi/src/models/external_tracker.rs new file mode 100644 index 0000000..4a2f949 --- /dev/null +++ b/forgejo-openapi/src/models/external_tracker.rs @@ -0,0 +1,42 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ExternalTracker : ExternalTracker represents settings for external tracker +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ExternalTracker { + /// External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. + #[serde(rename = "external_tracker_format", skip_serializing_if = "Option::is_none")] + pub external_tracker_format: Option, + /// External Issue Tracker issue regular expression + #[serde(rename = "external_tracker_regexp_pattern", skip_serializing_if = "Option::is_none")] + pub external_tracker_regexp_pattern: Option, + /// External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` + #[serde(rename = "external_tracker_style", skip_serializing_if = "Option::is_none")] + pub external_tracker_style: Option, + /// URL of external issue tracker. + #[serde(rename = "external_tracker_url", skip_serializing_if = "Option::is_none")] + pub external_tracker_url: Option, +} + +impl ExternalTracker { + /// ExternalTracker represents settings for external tracker + pub fn new() -> ExternalTracker { + ExternalTracker { + external_tracker_format: None, + external_tracker_regexp_pattern: None, + external_tracker_style: None, + external_tracker_url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/external_wiki.rs b/forgejo-openapi/src/models/external_wiki.rs new file mode 100644 index 0000000..7459065 --- /dev/null +++ b/forgejo-openapi/src/models/external_wiki.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ExternalWiki : ExternalWiki represents setting for external wiki +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ExternalWiki { + /// URL of external wiki. + #[serde(rename = "external_wiki_url", skip_serializing_if = "Option::is_none")] + pub external_wiki_url: Option, +} + +impl ExternalWiki { + /// ExternalWiki represents setting for external wiki + pub fn new() -> ExternalWiki { + ExternalWiki { + external_wiki_url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/file_commit_response.rs b/forgejo-openapi/src/models/file_commit_response.rs new file mode 100644 index 0000000..57b0bc9 --- /dev/null +++ b/forgejo-openapi/src/models/file_commit_response.rs @@ -0,0 +1,51 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FileCommitResponse { + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option>, + #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] + pub committer: Option>, + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "parents", skip_serializing_if = "Option::is_none")] + pub parents: Option>, + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, + #[serde(rename = "tree", skip_serializing_if = "Option::is_none")] + pub tree: Option>, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl FileCommitResponse { + pub fn new() -> FileCommitResponse { + FileCommitResponse { + author: None, + committer: None, + created: None, + html_url: None, + message: None, + parents: None, + sha: None, + tree: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/file_delete_response.rs b/forgejo-openapi/src/models/file_delete_response.rs new file mode 100644 index 0000000..d5d134c --- /dev/null +++ b/forgejo-openapi/src/models/file_delete_response.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// FileDeleteResponse : FileDeleteResponse contains information about a repo's file that was deleted +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FileDeleteResponse { + #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] + pub commit: Option>, + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, +} + +impl FileDeleteResponse { + /// FileDeleteResponse contains information about a repo's file that was deleted + pub fn new() -> FileDeleteResponse { + FileDeleteResponse { + commit: None, + content: None, + verification: None, + } + } +} + diff --git a/forgejo-openapi/src/models/file_links_response.rs b/forgejo-openapi/src/models/file_links_response.rs new file mode 100644 index 0000000..e3f8b13 --- /dev/null +++ b/forgejo-openapi/src/models/file_links_response.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// FileLinksResponse : FileLinksResponse contains the links for a repo's file +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FileLinksResponse { + #[serde(rename = "git", skip_serializing_if = "Option::is_none")] + pub git: Option, + #[serde(rename = "html", skip_serializing_if = "Option::is_none")] + pub html: Option, + #[serde(rename = "self", skip_serializing_if = "Option::is_none")] + pub param_self: Option, +} + +impl FileLinksResponse { + /// FileLinksResponse contains the links for a repo's file + pub fn new() -> FileLinksResponse { + FileLinksResponse { + git: None, + html: None, + param_self: None, + } + } +} + diff --git a/forgejo-openapi/src/models/file_response.rs b/forgejo-openapi/src/models/file_response.rs new file mode 100644 index 0000000..78990d2 --- /dev/null +++ b/forgejo-openapi/src/models/file_response.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// FileResponse : FileResponse contains information about a repo's file +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FileResponse { + #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] + pub commit: Option>, + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option>, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, +} + +impl FileResponse { + /// FileResponse contains information about a repo's file + pub fn new() -> FileResponse { + FileResponse { + commit: None, + content: None, + verification: None, + } + } +} + diff --git a/forgejo-openapi/src/models/files_response.rs b/forgejo-openapi/src/models/files_response.rs new file mode 100644 index 0000000..fc19d37 --- /dev/null +++ b/forgejo-openapi/src/models/files_response.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// FilesResponse : FilesResponse contains information about multiple files from a repo +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FilesResponse { + #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] + pub commit: Option>, + #[serde(rename = "files", skip_serializing_if = "Option::is_none")] + pub files: Option>, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, +} + +impl FilesResponse { + /// FilesResponse contains information about multiple files from a repo + pub fn new() -> FilesResponse { + FilesResponse { + commit: None, + files: None, + verification: None, + } + } +} + diff --git a/forgejo-openapi/src/models/general_api_settings.rs b/forgejo-openapi/src/models/general_api_settings.rs new file mode 100644 index 0000000..7b5d6c8 --- /dev/null +++ b/forgejo-openapi/src/models/general_api_settings.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GeneralApiSettings : GeneralAPISettings contains global api settings exposed by it +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GeneralApiSettings { + #[serde(rename = "default_git_trees_per_page", skip_serializing_if = "Option::is_none")] + pub default_git_trees_per_page: Option, + #[serde(rename = "default_max_blob_size", skip_serializing_if = "Option::is_none")] + pub default_max_blob_size: Option, + #[serde(rename = "default_paging_num", skip_serializing_if = "Option::is_none")] + pub default_paging_num: Option, + #[serde(rename = "max_response_items", skip_serializing_if = "Option::is_none")] + pub max_response_items: Option, +} + +impl GeneralApiSettings { + /// GeneralAPISettings contains global api settings exposed by it + pub fn new() -> GeneralApiSettings { + GeneralApiSettings { + default_git_trees_per_page: None, + default_max_blob_size: None, + default_paging_num: None, + max_response_items: None, + } + } +} + diff --git a/forgejo-openapi/src/models/general_attachment_settings.rs b/forgejo-openapi/src/models/general_attachment_settings.rs new file mode 100644 index 0000000..de9793e --- /dev/null +++ b/forgejo-openapi/src/models/general_attachment_settings.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GeneralAttachmentSettings : GeneralAttachmentSettings contains global Attachment settings exposed by API +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GeneralAttachmentSettings { + #[serde(rename = "allowed_types", skip_serializing_if = "Option::is_none")] + pub allowed_types: Option, + #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")] + pub enabled: Option, + #[serde(rename = "max_files", skip_serializing_if = "Option::is_none")] + pub max_files: Option, + #[serde(rename = "max_size", skip_serializing_if = "Option::is_none")] + pub max_size: Option, +} + +impl GeneralAttachmentSettings { + /// GeneralAttachmentSettings contains global Attachment settings exposed by API + pub fn new() -> GeneralAttachmentSettings { + GeneralAttachmentSettings { + allowed_types: None, + enabled: None, + max_files: None, + max_size: None, + } + } +} + diff --git a/forgejo-openapi/src/models/general_repo_settings.rs b/forgejo-openapi/src/models/general_repo_settings.rs new file mode 100644 index 0000000..8193fc5 --- /dev/null +++ b/forgejo-openapi/src/models/general_repo_settings.rs @@ -0,0 +1,47 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GeneralRepoSettings : GeneralRepoSettings contains global repository settings exposed by API +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GeneralRepoSettings { + #[serde(rename = "forks_disabled", skip_serializing_if = "Option::is_none")] + pub forks_disabled: Option, + #[serde(rename = "http_git_disabled", skip_serializing_if = "Option::is_none")] + pub http_git_disabled: Option, + #[serde(rename = "lfs_disabled", skip_serializing_if = "Option::is_none")] + pub lfs_disabled: Option, + #[serde(rename = "migrations_disabled", skip_serializing_if = "Option::is_none")] + pub migrations_disabled: Option, + #[serde(rename = "mirrors_disabled", skip_serializing_if = "Option::is_none")] + pub mirrors_disabled: Option, + #[serde(rename = "stars_disabled", skip_serializing_if = "Option::is_none")] + pub stars_disabled: Option, + #[serde(rename = "time_tracking_disabled", skip_serializing_if = "Option::is_none")] + pub time_tracking_disabled: Option, +} + +impl GeneralRepoSettings { + /// GeneralRepoSettings contains global repository settings exposed by API + pub fn new() -> GeneralRepoSettings { + GeneralRepoSettings { + forks_disabled: None, + http_git_disabled: None, + lfs_disabled: None, + migrations_disabled: None, + mirrors_disabled: None, + stars_disabled: None, + time_tracking_disabled: None, + } + } +} + diff --git a/forgejo-openapi/src/models/general_ui_settings.rs b/forgejo-openapi/src/models/general_ui_settings.rs new file mode 100644 index 0000000..ef91672 --- /dev/null +++ b/forgejo-openapi/src/models/general_ui_settings.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GeneralUiSettings : GeneralUISettings contains global ui settings exposed by API +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GeneralUiSettings { + #[serde(rename = "allowed_reactions", skip_serializing_if = "Option::is_none")] + pub allowed_reactions: Option>, + #[serde(rename = "custom_emojis", skip_serializing_if = "Option::is_none")] + pub custom_emojis: Option>, + #[serde(rename = "default_theme", skip_serializing_if = "Option::is_none")] + pub default_theme: Option, +} + +impl GeneralUiSettings { + /// GeneralUISettings contains global ui settings exposed by API + pub fn new() -> GeneralUiSettings { + GeneralUiSettings { + allowed_reactions: None, + custom_emojis: None, + default_theme: None, + } + } +} + diff --git a/forgejo-openapi/src/models/generate_repo_option.rs b/forgejo-openapi/src/models/generate_repo_option.rs new file mode 100644 index 0000000..7f64366 --- /dev/null +++ b/forgejo-openapi/src/models/generate_repo_option.rs @@ -0,0 +1,74 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GenerateRepoOption : GenerateRepoOption options when creating repository using a template +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GenerateRepoOption { + /// include avatar of the template repo + #[serde(rename = "avatar", skip_serializing_if = "Option::is_none")] + pub avatar: Option, + /// Default branch of the new repository + #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] + pub default_branch: Option, + /// Description of the repository to create + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + /// include git content of default branch in template repo + #[serde(rename = "git_content", skip_serializing_if = "Option::is_none")] + pub git_content: Option, + /// include git hooks in template repo + #[serde(rename = "git_hooks", skip_serializing_if = "Option::is_none")] + pub git_hooks: Option, + /// include labels in template repo + #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] + pub labels: Option, + /// Name of the repository to create + #[serde(rename = "name")] + pub name: String, + /// The organization or person who will own the new repository + #[serde(rename = "owner")] + pub owner: String, + /// Whether the repository is private + #[serde(rename = "private", skip_serializing_if = "Option::is_none")] + pub private: Option, + /// include protected branches in template repo + #[serde(rename = "protected_branch", skip_serializing_if = "Option::is_none")] + pub protected_branch: Option, + /// include topics in template repo + #[serde(rename = "topics", skip_serializing_if = "Option::is_none")] + pub topics: Option, + /// include webhooks in template repo + #[serde(rename = "webhooks", skip_serializing_if = "Option::is_none")] + pub webhooks: Option, +} + +impl GenerateRepoOption { + /// GenerateRepoOption options when creating repository using a template + pub fn new(name: String, owner: String) -> GenerateRepoOption { + GenerateRepoOption { + avatar: None, + default_branch: None, + description: None, + git_content: None, + git_hooks: None, + labels: None, + name, + owner, + private: None, + protected_branch: None, + topics: None, + webhooks: None, + } + } +} + diff --git a/forgejo-openapi/src/models/git_blob.rs b/forgejo-openapi/src/models/git_blob.rs new file mode 100644 index 0000000..710c4bc --- /dev/null +++ b/forgejo-openapi/src/models/git_blob.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GitBlob : GitBlob represents a git blob +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GitBlob { + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option, + #[serde(rename = "encoding", skip_serializing_if = "Option::is_none")] + pub encoding: Option, + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, + #[serde(rename = "size", skip_serializing_if = "Option::is_none")] + pub size: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl GitBlob { + /// GitBlob represents a git blob + pub fn new() -> GitBlob { + GitBlob { + content: None, + encoding: None, + sha: None, + size: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/git_entry.rs b/forgejo-openapi/src/models/git_entry.rs new file mode 100644 index 0000000..53808d8 --- /dev/null +++ b/forgejo-openapi/src/models/git_entry.rs @@ -0,0 +1,44 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GitEntry : GitEntry represents a git tree +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GitEntry { + #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] + pub mode: Option, + #[serde(rename = "path", skip_serializing_if = "Option::is_none")] + pub path: Option, + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, + #[serde(rename = "size", skip_serializing_if = "Option::is_none")] + pub size: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl GitEntry { + /// GitEntry represents a git tree + pub fn new() -> GitEntry { + GitEntry { + mode: None, + path: None, + sha: None, + size: None, + r#type: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/git_hook.rs b/forgejo-openapi/src/models/git_hook.rs new file mode 100644 index 0000000..ed6bdc9 --- /dev/null +++ b/forgejo-openapi/src/models/git_hook.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GitHook : GitHook represents a Git repository hook +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GitHook { + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option, + #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")] + pub is_active: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl GitHook { + /// GitHook represents a Git repository hook + pub fn new() -> GitHook { + GitHook { + content: None, + is_active: None, + name: None, + } + } +} + diff --git a/forgejo-openapi/src/models/git_object.rs b/forgejo-openapi/src/models/git_object.rs new file mode 100644 index 0000000..43c13bb --- /dev/null +++ b/forgejo-openapi/src/models/git_object.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GitObject { + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl GitObject { + pub fn new() -> GitObject { + GitObject { + sha: None, + r#type: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/git_tree_response.rs b/forgejo-openapi/src/models/git_tree_response.rs new file mode 100644 index 0000000..260a7d1 --- /dev/null +++ b/forgejo-openapi/src/models/git_tree_response.rs @@ -0,0 +1,44 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GitTreeResponse : GitTreeResponse returns a git tree +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GitTreeResponse { + #[serde(rename = "page", skip_serializing_if = "Option::is_none")] + pub page: Option, + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, + #[serde(rename = "total_count", skip_serializing_if = "Option::is_none")] + pub total_count: Option, + #[serde(rename = "tree", skip_serializing_if = "Option::is_none")] + pub tree: Option>, + #[serde(rename = "truncated", skip_serializing_if = "Option::is_none")] + pub truncated: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl GitTreeResponse { + /// GitTreeResponse returns a git tree + pub fn new() -> GitTreeResponse { + GitTreeResponse { + page: None, + sha: None, + total_count: None, + tree: None, + truncated: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/gitignore_template_info.rs b/forgejo-openapi/src/models/gitignore_template_info.rs new file mode 100644 index 0000000..dec3956 --- /dev/null +++ b/forgejo-openapi/src/models/gitignore_template_info.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GitignoreTemplateInfo : GitignoreTemplateInfo name and text of a gitignore template +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GitignoreTemplateInfo { + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "source", skip_serializing_if = "Option::is_none")] + pub source: Option, +} + +impl GitignoreTemplateInfo { + /// GitignoreTemplateInfo name and text of a gitignore template + pub fn new() -> GitignoreTemplateInfo { + GitignoreTemplateInfo { + name: None, + source: None, + } + } +} + diff --git a/forgejo-openapi/src/models/gpg_key.rs b/forgejo-openapi/src/models/gpg_key.rs new file mode 100644 index 0000000..44d4968 --- /dev/null +++ b/forgejo-openapi/src/models/gpg_key.rs @@ -0,0 +1,65 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GpgKey : GPGKey a user GPG key to sign commit and tag in repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GpgKey { + #[serde(rename = "can_certify", skip_serializing_if = "Option::is_none")] + pub can_certify: Option, + #[serde(rename = "can_encrypt_comms", skip_serializing_if = "Option::is_none")] + pub can_encrypt_comms: Option, + #[serde(rename = "can_encrypt_storage", skip_serializing_if = "Option::is_none")] + pub can_encrypt_storage: Option, + #[serde(rename = "can_sign", skip_serializing_if = "Option::is_none")] + pub can_sign: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "emails", skip_serializing_if = "Option::is_none")] + pub emails: Option>, + #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")] + pub expires_at: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "key_id", skip_serializing_if = "Option::is_none")] + pub key_id: Option, + #[serde(rename = "primary_key_id", skip_serializing_if = "Option::is_none")] + pub primary_key_id: Option, + #[serde(rename = "public_key", skip_serializing_if = "Option::is_none")] + pub public_key: Option, + #[serde(rename = "subkeys", skip_serializing_if = "Option::is_none")] + pub subkeys: Option>, + #[serde(rename = "verified", skip_serializing_if = "Option::is_none")] + pub verified: Option, +} + +impl GpgKey { + /// GPGKey a user GPG key to sign commit and tag in repository + pub fn new() -> GpgKey { + GpgKey { + can_certify: None, + can_encrypt_comms: None, + can_encrypt_storage: None, + can_sign: None, + created_at: None, + emails: None, + expires_at: None, + id: None, + key_id: None, + primary_key_id: None, + public_key: None, + subkeys: None, + verified: None, + } + } +} + diff --git a/forgejo-openapi/src/models/gpg_key_email.rs b/forgejo-openapi/src/models/gpg_key_email.rs new file mode 100644 index 0000000..19d4c08 --- /dev/null +++ b/forgejo-openapi/src/models/gpg_key_email.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// GpgKeyEmail : GPGKeyEmail an email attached to a GPGKey +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GpgKeyEmail { + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "verified", skip_serializing_if = "Option::is_none")] + pub verified: Option, +} + +impl GpgKeyEmail { + /// GPGKeyEmail an email attached to a GPGKey + pub fn new() -> GpgKeyEmail { + GpgKeyEmail { + email: None, + verified: None, + } + } +} + diff --git a/forgejo-openapi/src/models/hook.rs b/forgejo-openapi/src/models/hook.rs new file mode 100644 index 0000000..8280438 --- /dev/null +++ b/forgejo-openapi/src/models/hook.rs @@ -0,0 +1,63 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Hook : Hook a hook is a web hook when one repository changed +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Hook { + #[serde(rename = "active", skip_serializing_if = "Option::is_none")] + pub active: Option, + #[serde(rename = "authorization_header", skip_serializing_if = "Option::is_none")] + pub authorization_header: Option, + #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] + pub branch_filter: Option, + /// Deprecated: use Metadata instead + #[serde(rename = "config", skip_serializing_if = "Option::is_none")] + pub config: Option>, + #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] + pub content_type: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "events", skip_serializing_if = "Option::is_none")] + pub events: Option>, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + pub metadata: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl Hook { + /// Hook a hook is a web hook when one repository changed + pub fn new() -> Hook { + Hook { + active: None, + authorization_header: None, + branch_filter: None, + config: None, + content_type: None, + created_at: None, + events: None, + id: None, + metadata: None, + r#type: None, + updated_at: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/identity.rs b/forgejo-openapi/src/models/identity.rs new file mode 100644 index 0000000..2c7b1ec --- /dev/null +++ b/forgejo-openapi/src/models/identity.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Identity : Identity for a person's identity like an author or committer +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Identity { + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl Identity { + /// Identity for a person's identity like an author or committer + pub fn new() -> Identity { + Identity { + email: None, + name: None, + } + } +} + diff --git a/forgejo-openapi/src/models/internal_tracker.rs b/forgejo-openapi/src/models/internal_tracker.rs new file mode 100644 index 0000000..c05a04d --- /dev/null +++ b/forgejo-openapi/src/models/internal_tracker.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// InternalTracker : InternalTracker represents settings for internal tracker +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct InternalTracker { + /// Let only contributors track time (Built-in issue tracker) + #[serde(rename = "allow_only_contributors_to_track_time", skip_serializing_if = "Option::is_none")] + pub allow_only_contributors_to_track_time: Option, + /// Enable dependencies for issues and pull requests (Built-in issue tracker) + #[serde(rename = "enable_issue_dependencies", skip_serializing_if = "Option::is_none")] + pub enable_issue_dependencies: Option, + /// Enable time tracking (Built-in issue tracker) + #[serde(rename = "enable_time_tracker", skip_serializing_if = "Option::is_none")] + pub enable_time_tracker: Option, +} + +impl InternalTracker { + /// InternalTracker represents settings for internal tracker + pub fn new() -> InternalTracker { + InternalTracker { + allow_only_contributors_to_track_time: None, + enable_issue_dependencies: None, + enable_time_tracker: None, + } + } +} + diff --git a/forgejo-openapi/src/models/issue.rs b/forgejo-openapi/src/models/issue.rs new file mode 100644 index 0000000..69389b4 --- /dev/null +++ b/forgejo-openapi/src/models/issue.rs @@ -0,0 +1,102 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Issue : Issue represents an issue in a repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Issue { + #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] + pub assets: Option>, + #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] + pub assignee: Option>, + #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] + pub assignees: Option>, + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "closed_at", skip_serializing_if = "Option::is_none")] + pub closed_at: Option, + #[serde(rename = "comments", skip_serializing_if = "Option::is_none")] + pub comments: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] + pub due_date: Option, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "is_locked", skip_serializing_if = "Option::is_none")] + pub is_locked: Option, + #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] + pub labels: Option>, + #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] + pub milestone: Option>, + #[serde(rename = "number", skip_serializing_if = "Option::is_none")] + pub number: Option, + #[serde(rename = "original_author", skip_serializing_if = "Option::is_none")] + pub original_author: Option, + #[serde(rename = "original_author_id", skip_serializing_if = "Option::is_none")] + pub original_author_id: Option, + #[serde(rename = "pin_order", skip_serializing_if = "Option::is_none")] + pub pin_order: Option, + #[serde(rename = "pull_request", skip_serializing_if = "Option::is_none")] + pub pull_request: Option>, + #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] + pub r#ref: Option, + #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] + pub repository: Option>, + /// StateType issue state type + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, +} + +impl Issue { + /// Issue represents an issue in a repository + pub fn new() -> Issue { + Issue { + assets: None, + assignee: None, + assignees: None, + body: None, + closed_at: None, + comments: None, + created_at: None, + due_date: None, + html_url: None, + id: None, + is_locked: None, + labels: None, + milestone: None, + number: None, + original_author: None, + original_author_id: None, + pin_order: None, + pull_request: None, + r#ref: None, + repository: None, + state: None, + title: None, + updated_at: None, + url: None, + user: None, + } + } +} + diff --git a/forgejo-openapi/src/models/issue_config.rs b/forgejo-openapi/src/models/issue_config.rs new file mode 100644 index 0000000..5191eae --- /dev/null +++ b/forgejo-openapi/src/models/issue_config.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IssueConfig { + #[serde(rename = "blank_issues_enabled", skip_serializing_if = "Option::is_none")] + pub blank_issues_enabled: Option, + #[serde(rename = "contact_links", skip_serializing_if = "Option::is_none")] + pub contact_links: Option>, +} + +impl IssueConfig { + pub fn new() -> IssueConfig { + IssueConfig { + blank_issues_enabled: None, + contact_links: None, + } + } +} + diff --git a/forgejo-openapi/src/models/issue_config_contact_link.rs b/forgejo-openapi/src/models/issue_config_contact_link.rs new file mode 100644 index 0000000..e74f7e7 --- /dev/null +++ b/forgejo-openapi/src/models/issue_config_contact_link.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IssueConfigContactLink { + #[serde(rename = "about", skip_serializing_if = "Option::is_none")] + pub about: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl IssueConfigContactLink { + pub fn new() -> IssueConfigContactLink { + IssueConfigContactLink { + about: None, + name: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/issue_config_validation.rs b/forgejo-openapi/src/models/issue_config_validation.rs new file mode 100644 index 0000000..e8618bf --- /dev/null +++ b/forgejo-openapi/src/models/issue_config_validation.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IssueConfigValidation { + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "valid", skip_serializing_if = "Option::is_none")] + pub valid: Option, +} + +impl IssueConfigValidation { + pub fn new() -> IssueConfigValidation { + IssueConfigValidation { + message: None, + valid: None, + } + } +} + diff --git a/forgejo-openapi/src/models/issue_deadline.rs b/forgejo-openapi/src/models/issue_deadline.rs new file mode 100644 index 0000000..46eee0a --- /dev/null +++ b/forgejo-openapi/src/models/issue_deadline.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IssueDeadline : IssueDeadline represents an issue deadline +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IssueDeadline { + #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] + pub due_date: Option, +} + +impl IssueDeadline { + /// IssueDeadline represents an issue deadline + pub fn new() -> IssueDeadline { + IssueDeadline { + due_date: None, + } + } +} + diff --git a/forgejo-openapi/src/models/issue_form_field.rs b/forgejo-openapi/src/models/issue_form_field.rs new file mode 100644 index 0000000..4cdb652 --- /dev/null +++ b/forgejo-openapi/src/models/issue_form_field.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IssueFormField : IssueFormField represents a form field +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IssueFormField { + #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")] + pub attributes: Option>, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "validations", skip_serializing_if = "Option::is_none")] + pub validations: Option>, + #[serde(rename = "visible", skip_serializing_if = "Option::is_none")] + pub visible: Option>, +} + +impl IssueFormField { + /// IssueFormField represents a form field + pub fn new() -> IssueFormField { + IssueFormField { + attributes: None, + id: None, + r#type: None, + validations: None, + visible: None, + } + } +} + diff --git a/forgejo-openapi/src/models/issue_labels_option.rs b/forgejo-openapi/src/models/issue_labels_option.rs new file mode 100644 index 0000000..e8dec5f --- /dev/null +++ b/forgejo-openapi/src/models/issue_labels_option.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IssueLabelsOption : IssueLabelsOption a collection of labels +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IssueLabelsOption { + /// Labels can be a list of integers representing label IDs or a list of strings representing label names + #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] + pub labels: Option>, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, +} + +impl IssueLabelsOption { + /// IssueLabelsOption a collection of labels + pub fn new() -> IssueLabelsOption { + IssueLabelsOption { + labels: None, + updated_at: None, + } + } +} + diff --git a/forgejo-openapi/src/models/issue_meta.rs b/forgejo-openapi/src/models/issue_meta.rs new file mode 100644 index 0000000..8d64b52 --- /dev/null +++ b/forgejo-openapi/src/models/issue_meta.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IssueMeta : IssueMeta basic issue information +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IssueMeta { + #[serde(rename = "index", skip_serializing_if = "Option::is_none")] + pub index: Option, + #[serde(rename = "owner", skip_serializing_if = "Option::is_none")] + pub owner: Option, + #[serde(rename = "repo", skip_serializing_if = "Option::is_none")] + pub repo: Option, +} + +impl IssueMeta { + /// IssueMeta basic issue information + pub fn new() -> IssueMeta { + IssueMeta { + index: None, + owner: None, + repo: None, + } + } +} + diff --git a/forgejo-openapi/src/models/issue_template.rs b/forgejo-openapi/src/models/issue_template.rs new file mode 100644 index 0000000..3d5c6d3 --- /dev/null +++ b/forgejo-openapi/src/models/issue_template.rs @@ -0,0 +1,50 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IssueTemplate : IssueTemplate represents an issue template for a repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IssueTemplate { + #[serde(rename = "about", skip_serializing_if = "Option::is_none")] + pub about: Option, + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option>, + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option, + #[serde(rename = "file_name", skip_serializing_if = "Option::is_none")] + pub file_name: Option, + #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] + pub labels: Option>, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] + pub r#ref: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, +} + +impl IssueTemplate { + /// IssueTemplate represents an issue template for a repository + pub fn new() -> IssueTemplate { + IssueTemplate { + about: None, + body: None, + content: None, + file_name: None, + labels: None, + name: None, + r#ref: None, + title: None, + } + } +} + diff --git a/forgejo-openapi/src/models/label.rs b/forgejo-openapi/src/models/label.rs new file mode 100644 index 0000000..dbd29db --- /dev/null +++ b/forgejo-openapi/src/models/label.rs @@ -0,0 +1,47 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Label : Label a label to an issue or a pr +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Label { + #[serde(rename = "color", skip_serializing_if = "Option::is_none")] + pub color: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "exclusive", skip_serializing_if = "Option::is_none")] + pub exclusive: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "is_archived", skip_serializing_if = "Option::is_none")] + pub is_archived: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl Label { + /// Label a label to an issue or a pr + pub fn new() -> Label { + Label { + color: None, + description: None, + exclusive: None, + id: None, + is_archived: None, + name: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/label_template.rs b/forgejo-openapi/src/models/label_template.rs new file mode 100644 index 0000000..acd2d8a --- /dev/null +++ b/forgejo-openapi/src/models/label_template.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// LabelTemplate : LabelTemplate info of a Label template +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LabelTemplate { + #[serde(rename = "color", skip_serializing_if = "Option::is_none")] + pub color: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "exclusive", skip_serializing_if = "Option::is_none")] + pub exclusive: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl LabelTemplate { + /// LabelTemplate info of a Label template + pub fn new() -> LabelTemplate { + LabelTemplate { + color: None, + description: None, + exclusive: None, + name: None, + } + } +} + diff --git a/forgejo-openapi/src/models/license_template_info.rs b/forgejo-openapi/src/models/license_template_info.rs new file mode 100644 index 0000000..a648e3a --- /dev/null +++ b/forgejo-openapi/src/models/license_template_info.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// LicenseTemplateInfo : LicensesInfo contains information about a License +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LicenseTemplateInfo { + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "implementation", skip_serializing_if = "Option::is_none")] + pub implementation: Option, + #[serde(rename = "key", skip_serializing_if = "Option::is_none")] + pub key: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl LicenseTemplateInfo { + /// LicensesInfo contains information about a License + pub fn new() -> LicenseTemplateInfo { + LicenseTemplateInfo { + body: None, + implementation: None, + key: None, + name: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/licenses_template_list_entry.rs b/forgejo-openapi/src/models/licenses_template_list_entry.rs new file mode 100644 index 0000000..fc7b83f --- /dev/null +++ b/forgejo-openapi/src/models/licenses_template_list_entry.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// LicensesTemplateListEntry : LicensesListEntry is used for the API +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LicensesTemplateListEntry { + #[serde(rename = "key", skip_serializing_if = "Option::is_none")] + pub key: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl LicensesTemplateListEntry { + /// LicensesListEntry is used for the API + pub fn new() -> LicensesTemplateListEntry { + LicensesTemplateListEntry { + key: None, + name: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/list_action_run_response.rs b/forgejo-openapi/src/models/list_action_run_response.rs new file mode 100644 index 0000000..2edc726 --- /dev/null +++ b/forgejo-openapi/src/models/list_action_run_response.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ListActionRunResponse : ListActionRunResponse return a list of ActionRun +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListActionRunResponse { + #[serde(rename = "total_count", skip_serializing_if = "Option::is_none")] + pub total_count: Option, + #[serde(rename = "workflow_runs", skip_serializing_if = "Option::is_none")] + pub workflow_runs: Option>, +} + +impl ListActionRunResponse { + /// ListActionRunResponse return a list of ActionRun + pub fn new() -> ListActionRunResponse { + ListActionRunResponse { + total_count: None, + workflow_runs: None, + } + } +} + diff --git a/forgejo-openapi/src/models/markdown_option.rs b/forgejo-openapi/src/models/markdown_option.rs new file mode 100644 index 0000000..a423e31 --- /dev/null +++ b/forgejo-openapi/src/models/markdown_option.rs @@ -0,0 +1,42 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// MarkdownOption : MarkdownOption markdown options +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarkdownOption { + /// Context to render in: body + #[serde(rename = "Context", skip_serializing_if = "Option::is_none")] + pub context: Option, + /// Mode to render (comment, gfm, markdown) in: body + #[serde(rename = "Mode", skip_serializing_if = "Option::is_none")] + pub mode: Option, + /// Text markdown to render in: body + #[serde(rename = "Text", skip_serializing_if = "Option::is_none")] + pub text: Option, + /// Is it a wiki page ? in: body + #[serde(rename = "Wiki", skip_serializing_if = "Option::is_none")] + pub wiki: Option, +} + +impl MarkdownOption { + /// MarkdownOption markdown options + pub fn new() -> MarkdownOption { + MarkdownOption { + context: None, + mode: None, + text: None, + wiki: None, + } + } +} + diff --git a/forgejo-openapi/src/models/markup_option.rs b/forgejo-openapi/src/models/markup_option.rs new file mode 100644 index 0000000..8e662b1 --- /dev/null +++ b/forgejo-openapi/src/models/markup_option.rs @@ -0,0 +1,50 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// MarkupOption : MarkupOption markup options +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarkupOption { + /// The current branch path where the form gets posted in: body + #[serde(rename = "BranchPath", skip_serializing_if = "Option::is_none")] + pub branch_path: Option, + /// Context to render in: body + #[serde(rename = "Context", skip_serializing_if = "Option::is_none")] + pub context: Option, + /// File path for detecting extension in file mode in: body + #[serde(rename = "FilePath", skip_serializing_if = "Option::is_none")] + pub file_path: Option, + /// Mode to render (comment, gfm, markdown, file) in: body + #[serde(rename = "Mode", skip_serializing_if = "Option::is_none")] + pub mode: Option, + /// Text markup to render in: body + #[serde(rename = "Text", skip_serializing_if = "Option::is_none")] + pub text: Option, + /// Is it a wiki page ? in: body + #[serde(rename = "Wiki", skip_serializing_if = "Option::is_none")] + pub wiki: Option, +} + +impl MarkupOption { + /// MarkupOption markup options + pub fn new() -> MarkupOption { + MarkupOption { + branch_path: None, + context: None, + file_path: None, + mode: None, + text: None, + wiki: None, + } + } +} + diff --git a/forgejo-openapi/src/models/merge_pull_request_option.rs b/forgejo-openapi/src/models/merge_pull_request_option.rs new file mode 100644 index 0000000..4b5ff89 --- /dev/null +++ b/forgejo-openapi/src/models/merge_pull_request_option.rs @@ -0,0 +1,72 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// MergePullRequestOption : MergePullRequestForm form for merging Pull Request +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MergePullRequestOption { + #[serde(rename = "Do")] + pub r#do: Do, + #[serde(rename = "MergeCommitID", skip_serializing_if = "Option::is_none")] + pub merge_commit_id: Option, + #[serde(rename = "MergeMessageField", skip_serializing_if = "Option::is_none")] + pub merge_message_field: Option, + #[serde(rename = "MergeTitleField", skip_serializing_if = "Option::is_none")] + pub merge_title_field: Option, + #[serde(rename = "delete_branch_after_merge", skip_serializing_if = "Option::is_none")] + pub delete_branch_after_merge: Option, + #[serde(rename = "force_merge", skip_serializing_if = "Option::is_none")] + pub force_merge: Option, + #[serde(rename = "head_commit_id", skip_serializing_if = "Option::is_none")] + pub head_commit_id: Option, + #[serde(rename = "merge_when_checks_succeed", skip_serializing_if = "Option::is_none")] + pub merge_when_checks_succeed: Option, +} + +impl MergePullRequestOption { + /// MergePullRequestForm form for merging Pull Request + pub fn new(r#do: Do) -> MergePullRequestOption { + MergePullRequestOption { + r#do, + merge_commit_id: None, + merge_message_field: None, + merge_title_field: None, + delete_branch_after_merge: None, + force_merge: None, + head_commit_id: None, + merge_when_checks_succeed: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Do { + #[serde(rename = "merge")] + Merge, + #[serde(rename = "rebase")] + Rebase, + #[serde(rename = "rebase-merge")] + RebaseMerge, + #[serde(rename = "squash")] + Squash, + #[serde(rename = "fast-forward-only")] + FastForwardOnly, + #[serde(rename = "manually-merged")] + ManuallyMerged, +} + +impl Default for Do { + fn default() -> Do { + Self::Merge + } +} + diff --git a/forgejo-openapi/src/models/migrate_repo_options.rs b/forgejo-openapi/src/models/migrate_repo_options.rs new file mode 100644 index 0000000..698575d --- /dev/null +++ b/forgejo-openapi/src/models/migrate_repo_options.rs @@ -0,0 +1,114 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// MigrateRepoOptions : MigrateRepoOptions options for migrating repository's this is used to interact with api v1 +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MigrateRepoOptions { + #[serde(rename = "auth_password", skip_serializing_if = "Option::is_none")] + pub auth_password: Option, + #[serde(rename = "auth_token", skip_serializing_if = "Option::is_none")] + pub auth_token: Option, + #[serde(rename = "auth_username", skip_serializing_if = "Option::is_none")] + pub auth_username: Option, + #[serde(rename = "clone_addr")] + pub clone_addr: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "issues", skip_serializing_if = "Option::is_none")] + pub issues: Option, + #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] + pub labels: Option, + #[serde(rename = "lfs", skip_serializing_if = "Option::is_none")] + pub lfs: Option, + #[serde(rename = "lfs_endpoint", skip_serializing_if = "Option::is_none")] + pub lfs_endpoint: Option, + #[serde(rename = "milestones", skip_serializing_if = "Option::is_none")] + pub milestones: Option, + #[serde(rename = "mirror", skip_serializing_if = "Option::is_none")] + pub mirror: Option, + #[serde(rename = "mirror_interval", skip_serializing_if = "Option::is_none")] + pub mirror_interval: Option, + #[serde(rename = "private", skip_serializing_if = "Option::is_none")] + pub private: Option, + #[serde(rename = "pull_requests", skip_serializing_if = "Option::is_none")] + pub pull_requests: Option, + #[serde(rename = "releases", skip_serializing_if = "Option::is_none")] + pub releases: Option, + #[serde(rename = "repo_name")] + pub repo_name: String, + /// Name of User or Organisation who will own Repo after migration + #[serde(rename = "repo_owner", skip_serializing_if = "Option::is_none")] + pub repo_owner: Option, + #[serde(rename = "service", skip_serializing_if = "Option::is_none")] + pub service: Option, + /// deprecated (only for backwards compatibility) + #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] + pub uid: Option, + #[serde(rename = "wiki", skip_serializing_if = "Option::is_none")] + pub wiki: Option, +} + +impl MigrateRepoOptions { + /// MigrateRepoOptions options for migrating repository's this is used to interact with api v1 + pub fn new(clone_addr: String, repo_name: String) -> MigrateRepoOptions { + MigrateRepoOptions { + auth_password: None, + auth_token: None, + auth_username: None, + clone_addr, + description: None, + issues: None, + labels: None, + lfs: None, + lfs_endpoint: None, + milestones: None, + mirror: None, + mirror_interval: None, + private: None, + pull_requests: None, + releases: None, + repo_name, + repo_owner: None, + service: None, + uid: None, + wiki: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Service { + #[serde(rename = "git")] + Git, + #[serde(rename = "github")] + Github, + #[serde(rename = "gitea")] + Gitea, + #[serde(rename = "gitlab")] + Gitlab, + #[serde(rename = "gogs")] + Gogs, + #[serde(rename = "onedev")] + Onedev, + #[serde(rename = "gitbucket")] + Gitbucket, + #[serde(rename = "codebase")] + Codebase, +} + +impl Default for Service { + fn default() -> Service { + Self::Git + } +} + diff --git a/forgejo-openapi/src/models/milestone.rs b/forgejo-openapi/src/models/milestone.rs new file mode 100644 index 0000000..ac2e555 --- /dev/null +++ b/forgejo-openapi/src/models/milestone.rs @@ -0,0 +1,57 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Milestone : Milestone milestone is a collection of issues on one repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Milestone { + #[serde(rename = "closed_at", skip_serializing_if = "Option::is_none")] + pub closed_at: Option, + #[serde(rename = "closed_issues", skip_serializing_if = "Option::is_none")] + pub closed_issues: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "due_on", skip_serializing_if = "Option::is_none")] + pub due_on: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "open_issues", skip_serializing_if = "Option::is_none")] + pub open_issues: Option, + /// StateType issue state type + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, +} + +impl Milestone { + /// Milestone milestone is a collection of issues on one repository + pub fn new() -> Milestone { + Milestone { + closed_at: None, + closed_issues: None, + created_at: None, + description: None, + due_on: None, + id: None, + open_issues: None, + state: None, + title: None, + updated_at: None, + } + } +} + diff --git a/forgejo-openapi/src/models/mod.rs b/forgejo-openapi/src/models/mod.rs new file mode 100644 index 0000000..c4a24ec --- /dev/null +++ b/forgejo-openapi/src/models/mod.rs @@ -0,0 +1,456 @@ +pub mod access_token; +pub use self::access_token::AccessToken; +pub mod action_run; +pub use self::action_run::ActionRun; +pub mod action_run_job; +pub use self::action_run_job::ActionRunJob; +pub mod action_task; +pub use self::action_task::ActionTask; +pub mod action_task_response; +pub use self::action_task_response::ActionTaskResponse; +pub mod action_variable; +pub use self::action_variable::ActionVariable; +pub mod activity; +pub use self::activity::Activity; +pub mod activity_pub; +pub use self::activity_pub::ActivityPub; +pub mod add_collaborator_option; +pub use self::add_collaborator_option::AddCollaboratorOption; +pub mod add_time_option; +pub use self::add_time_option::AddTimeOption; +pub mod annotated_tag; +pub use self::annotated_tag::AnnotatedTag; +pub mod annotated_tag_object; +pub use self::annotated_tag_object::AnnotatedTagObject; +pub mod api_error; +pub use self::api_error::ApiError; +pub mod api_forbidden_error; +pub use self::api_forbidden_error::ApiForbiddenError; +pub mod api_internal_server_error; +pub use self::api_internal_server_error::ApiInternalServerError; +pub mod api_invalid_topics_error; +pub use self::api_invalid_topics_error::ApiInvalidTopicsError; +pub mod api_not_found; +pub use self::api_not_found::ApiNotFound; +pub mod api_repo_archived_error; +pub use self::api_repo_archived_error::ApiRepoArchivedError; +pub mod api_unauthorized_error; +pub use self::api_unauthorized_error::ApiUnauthorizedError; +pub mod api_validation_error; +pub use self::api_validation_error::ApiValidationError; +pub mod attachment; +pub use self::attachment::Attachment; +pub mod blocked_user; +pub use self::blocked_user::BlockedUser; +pub mod branch; +pub use self::branch::Branch; +pub mod branch_protection; +pub use self::branch_protection::BranchProtection; +pub mod change_file_operation; +pub use self::change_file_operation::ChangeFileOperation; +pub mod change_files_options; +pub use self::change_files_options::ChangeFilesOptions; +pub mod changed_file; +pub use self::changed_file::ChangedFile; +pub mod combined_status; +pub use self::combined_status::CombinedStatus; +pub mod comment; +pub use self::comment::Comment; +pub mod commit; +pub use self::commit::Commit; +pub mod commit_affected_files; +pub use self::commit_affected_files::CommitAffectedFiles; +pub mod commit_date_options; +pub use self::commit_date_options::CommitDateOptions; +pub mod commit_meta; +pub use self::commit_meta::CommitMeta; +pub mod commit_stats; +pub use self::commit_stats::CommitStats; +pub mod commit_status; +pub use self::commit_status::CommitStatus; +pub mod commit_user; +pub use self::commit_user::CommitUser; +pub mod compare; +pub use self::compare::Compare; +pub mod contents_response; +pub use self::contents_response::ContentsResponse; +pub mod create_access_token_option; +pub use self::create_access_token_option::CreateAccessTokenOption; +pub mod create_branch_protection_option; +pub use self::create_branch_protection_option::CreateBranchProtectionOption; +pub mod create_branch_repo_option; +pub use self::create_branch_repo_option::CreateBranchRepoOption; +pub mod create_email_option; +pub use self::create_email_option::CreateEmailOption; +pub mod create_file_options; +pub use self::create_file_options::CreateFileOptions; +pub mod create_fork_option; +pub use self::create_fork_option::CreateForkOption; +pub mod create_gpg_key_option; +pub use self::create_gpg_key_option::CreateGpgKeyOption; +pub mod create_hook_option; +pub use self::create_hook_option::CreateHookOption; +pub mod create_issue_comment_option; +pub use self::create_issue_comment_option::CreateIssueCommentOption; +pub mod create_issue_option; +pub use self::create_issue_option::CreateIssueOption; +pub mod create_key_option; +pub use self::create_key_option::CreateKeyOption; +pub mod create_label_option; +pub use self::create_label_option::CreateLabelOption; +pub mod create_milestone_option; +pub use self::create_milestone_option::CreateMilestoneOption; +pub mod create_o_auth2_application_options; +pub use self::create_o_auth2_application_options::CreateOAuth2ApplicationOptions; +pub mod create_or_update_secret_option; +pub use self::create_or_update_secret_option::CreateOrUpdateSecretOption; +pub mod create_org_option; +pub use self::create_org_option::CreateOrgOption; +pub mod create_pull_request_option; +pub use self::create_pull_request_option::CreatePullRequestOption; +pub mod create_pull_review_comment; +pub use self::create_pull_review_comment::CreatePullReviewComment; +pub mod create_pull_review_options; +pub use self::create_pull_review_options::CreatePullReviewOptions; +pub mod create_push_mirror_option; +pub use self::create_push_mirror_option::CreatePushMirrorOption; +pub mod create_quota_group_options; +pub use self::create_quota_group_options::CreateQuotaGroupOptions; +pub mod create_quota_rule_options; +pub use self::create_quota_rule_options::CreateQuotaRuleOptions; +pub mod create_release_option; +pub use self::create_release_option::CreateReleaseOption; +pub mod create_repo_option; +pub use self::create_repo_option::CreateRepoOption; +pub mod create_status_option; +pub use self::create_status_option::CreateStatusOption; +pub mod create_tag_option; +pub use self::create_tag_option::CreateTagOption; +pub mod create_tag_protection_option; +pub use self::create_tag_protection_option::CreateTagProtectionOption; +pub mod create_team_option; +pub use self::create_team_option::CreateTeamOption; +pub mod create_user_option; +pub use self::create_user_option::CreateUserOption; +pub mod create_variable_option; +pub use self::create_variable_option::CreateVariableOption; +pub mod create_wiki_page_options; +pub use self::create_wiki_page_options::CreateWikiPageOptions; +pub mod cron; +pub use self::cron::Cron; +pub mod delete_email_option; +pub use self::delete_email_option::DeleteEmailOption; +pub mod delete_file_options; +pub use self::delete_file_options::DeleteFileOptions; +pub mod delete_labels_option; +pub use self::delete_labels_option::DeleteLabelsOption; +pub mod deploy_key; +pub use self::deploy_key::DeployKey; +pub mod dismiss_pull_review_options; +pub use self::dismiss_pull_review_options::DismissPullReviewOptions; +pub mod dispatch_workflow_option; +pub use self::dispatch_workflow_option::DispatchWorkflowOption; +pub mod dispatch_workflow_run; +pub use self::dispatch_workflow_run::DispatchWorkflowRun; +pub mod edit_attachment_options; +pub use self::edit_attachment_options::EditAttachmentOptions; +pub mod edit_branch_protection_option; +pub use self::edit_branch_protection_option::EditBranchProtectionOption; +pub mod edit_deadline_option; +pub use self::edit_deadline_option::EditDeadlineOption; +pub mod edit_git_hook_option; +pub use self::edit_git_hook_option::EditGitHookOption; +pub mod edit_hook_option; +pub use self::edit_hook_option::EditHookOption; +pub mod edit_issue_comment_option; +pub use self::edit_issue_comment_option::EditIssueCommentOption; +pub mod edit_issue_option; +pub use self::edit_issue_option::EditIssueOption; +pub mod edit_label_option; +pub use self::edit_label_option::EditLabelOption; +pub mod edit_milestone_option; +pub use self::edit_milestone_option::EditMilestoneOption; +pub mod edit_org_option; +pub use self::edit_org_option::EditOrgOption; +pub mod edit_pull_request_option; +pub use self::edit_pull_request_option::EditPullRequestOption; +pub mod edit_quota_rule_options; +pub use self::edit_quota_rule_options::EditQuotaRuleOptions; +pub mod edit_reaction_option; +pub use self::edit_reaction_option::EditReactionOption; +pub mod edit_release_option; +pub use self::edit_release_option::EditReleaseOption; +pub mod edit_repo_option; +pub use self::edit_repo_option::EditRepoOption; +pub mod edit_tag_protection_option; +pub use self::edit_tag_protection_option::EditTagProtectionOption; +pub mod edit_team_option; +pub use self::edit_team_option::EditTeamOption; +pub mod edit_user_option; +pub use self::edit_user_option::EditUserOption; +pub mod email; +pub use self::email::Email; +pub mod external_tracker; +pub use self::external_tracker::ExternalTracker; +pub mod external_wiki; +pub use self::external_wiki::ExternalWiki; +pub mod file_commit_response; +pub use self::file_commit_response::FileCommitResponse; +pub mod file_delete_response; +pub use self::file_delete_response::FileDeleteResponse; +pub mod file_links_response; +pub use self::file_links_response::FileLinksResponse; +pub mod file_response; +pub use self::file_response::FileResponse; +pub mod files_response; +pub use self::files_response::FilesResponse; +pub mod general_api_settings; +pub use self::general_api_settings::GeneralApiSettings; +pub mod general_attachment_settings; +pub use self::general_attachment_settings::GeneralAttachmentSettings; +pub mod general_repo_settings; +pub use self::general_repo_settings::GeneralRepoSettings; +pub mod general_ui_settings; +pub use self::general_ui_settings::GeneralUiSettings; +pub mod generate_repo_option; +pub use self::generate_repo_option::GenerateRepoOption; +pub mod git_blob; +pub use self::git_blob::GitBlob; +pub mod git_entry; +pub use self::git_entry::GitEntry; +pub mod git_hook; +pub use self::git_hook::GitHook; +pub mod git_object; +pub use self::git_object::GitObject; +pub mod git_tree_response; +pub use self::git_tree_response::GitTreeResponse; +pub mod gitignore_template_info; +pub use self::gitignore_template_info::GitignoreTemplateInfo; +pub mod gpg_key; +pub use self::gpg_key::GpgKey; +pub mod gpg_key_email; +pub use self::gpg_key_email::GpgKeyEmail; +pub mod hook; +pub use self::hook::Hook; +pub mod identity; +pub use self::identity::Identity; +pub mod internal_tracker; +pub use self::internal_tracker::InternalTracker; +pub mod issue; +pub use self::issue::Issue; +pub mod issue_config; +pub use self::issue_config::IssueConfig; +pub mod issue_config_contact_link; +pub use self::issue_config_contact_link::IssueConfigContactLink; +pub mod issue_config_validation; +pub use self::issue_config_validation::IssueConfigValidation; +pub mod issue_deadline; +pub use self::issue_deadline::IssueDeadline; +pub mod issue_form_field; +pub use self::issue_form_field::IssueFormField; +pub mod issue_labels_option; +pub use self::issue_labels_option::IssueLabelsOption; +pub mod issue_meta; +pub use self::issue_meta::IssueMeta; +pub mod issue_template; +pub use self::issue_template::IssueTemplate; +pub mod label; +pub use self::label::Label; +pub mod label_template; +pub use self::label_template::LabelTemplate; +pub mod license_template_info; +pub use self::license_template_info::LicenseTemplateInfo; +pub mod licenses_template_list_entry; +pub use self::licenses_template_list_entry::LicensesTemplateListEntry; +pub mod list_action_run_response; +pub use self::list_action_run_response::ListActionRunResponse; +pub mod markdown_option; +pub use self::markdown_option::MarkdownOption; +pub mod markup_option; +pub use self::markup_option::MarkupOption; +pub mod merge_pull_request_option; +pub use self::merge_pull_request_option::MergePullRequestOption; +pub mod migrate_repo_options; +pub use self::migrate_repo_options::MigrateRepoOptions; +pub mod milestone; +pub use self::milestone::Milestone; +pub mod new_issue_pins_allowed; +pub use self::new_issue_pins_allowed::NewIssuePinsAllowed; +pub mod node_info; +pub use self::node_info::NodeInfo; +pub mod node_info_services; +pub use self::node_info_services::NodeInfoServices; +pub mod node_info_software; +pub use self::node_info_software::NodeInfoSoftware; +pub mod node_info_usage; +pub use self::node_info_usage::NodeInfoUsage; +pub mod node_info_usage_users; +pub use self::node_info_usage_users::NodeInfoUsageUsers; +pub mod note; +pub use self::note::Note; +pub mod note_options; +pub use self::note_options::NoteOptions; +pub mod notification_count; +pub use self::notification_count::NotificationCount; +pub mod notification_subject; +pub use self::notification_subject::NotificationSubject; +pub mod notification_thread; +pub use self::notification_thread::NotificationThread; +pub mod o_auth2_application; +pub use self::o_auth2_application::OAuth2Application; +pub mod organization; +pub use self::organization::Organization; +pub mod organization_permissions; +pub use self::organization_permissions::OrganizationPermissions; +pub mod package; +pub use self::package::Package; +pub mod package_file; +pub use self::package_file::PackageFile; +pub mod payload_commit; +pub use self::payload_commit::PayloadCommit; +pub mod payload_commit_verification; +pub use self::payload_commit_verification::PayloadCommitVerification; +pub mod payload_user; +pub use self::payload_user::PayloadUser; +pub mod permission; +pub use self::permission::Permission; +pub mod pr_branch_info; +pub use self::pr_branch_info::PrBranchInfo; +pub mod public_key; +pub use self::public_key::PublicKey; +pub mod pull_request; +pub use self::pull_request::PullRequest; +pub mod pull_request_meta; +pub use self::pull_request_meta::PullRequestMeta; +pub mod pull_review; +pub use self::pull_review::PullReview; +pub mod pull_review_comment; +pub use self::pull_review_comment::PullReviewComment; +pub mod pull_review_request_options; +pub use self::pull_review_request_options::PullReviewRequestOptions; +pub mod push_mirror; +pub use self::push_mirror::PushMirror; +pub mod quota_group; +pub use self::quota_group::QuotaGroup; +pub mod quota_info; +pub use self::quota_info::QuotaInfo; +pub mod quota_rule_info; +pub use self::quota_rule_info::QuotaRuleInfo; +pub mod quota_used; +pub use self::quota_used::QuotaUsed; +pub mod quota_used_artifact; +pub use self::quota_used_artifact::QuotaUsedArtifact; +pub mod quota_used_attachment; +pub use self::quota_used_attachment::QuotaUsedAttachment; +pub mod quota_used_attachment_contained_in; +pub use self::quota_used_attachment_contained_in::QuotaUsedAttachmentContainedIn; +pub mod quota_used_package; +pub use self::quota_used_package::QuotaUsedPackage; +pub mod quota_used_size; +pub use self::quota_used_size::QuotaUsedSize; +pub mod quota_used_size_assets; +pub use self::quota_used_size_assets::QuotaUsedSizeAssets; +pub mod quota_used_size_assets_attachments; +pub use self::quota_used_size_assets_attachments::QuotaUsedSizeAssetsAttachments; +pub mod quota_used_size_assets_packages; +pub use self::quota_used_size_assets_packages::QuotaUsedSizeAssetsPackages; +pub mod quota_used_size_git; +pub use self::quota_used_size_git::QuotaUsedSizeGit; +pub mod quota_used_size_repos; +pub use self::quota_used_size_repos::QuotaUsedSizeRepos; +pub mod reaction; +pub use self::reaction::Reaction; +pub mod reference; +pub use self::reference::Reference; +pub mod registration_token; +pub use self::registration_token::RegistrationToken; +pub mod release; +pub use self::release::Release; +pub mod rename_org_option; +pub use self::rename_org_option::RenameOrgOption; +pub mod rename_user_option; +pub use self::rename_user_option::RenameUserOption; +pub mod replace_flags_option; +pub use self::replace_flags_option::ReplaceFlagsOption; +pub mod repo_collaborator_permission; +pub use self::repo_collaborator_permission::RepoCollaboratorPermission; +pub mod repo_commit; +pub use self::repo_commit::RepoCommit; +pub mod repo_create_release_attachment_request; +pub use self::repo_create_release_attachment_request::RepoCreateReleaseAttachmentRequest; +pub mod repo_topic_options; +pub use self::repo_topic_options::RepoTopicOptions; +pub mod repo_transfer; +pub use self::repo_transfer::RepoTransfer; +pub mod repository; +pub use self::repository::Repository; +pub mod repository_meta; +pub use self::repository_meta::RepositoryMeta; +pub mod search_results; +pub use self::search_results::SearchResults; +pub mod secret; +pub use self::secret::Secret; +pub mod server_version; +pub use self::server_version::ServerVersion; +pub mod set_user_quota_groups_options; +pub use self::set_user_quota_groups_options::SetUserQuotaGroupsOptions; +pub mod stop_watch; +pub use self::stop_watch::StopWatch; +pub mod submit_pull_review_options; +pub use self::submit_pull_review_options::SubmitPullReviewOptions; +pub mod sync_fork_info; +pub use self::sync_fork_info::SyncForkInfo; +pub mod tag; +pub use self::tag::Tag; +pub mod tag_archive_download_count; +pub use self::tag_archive_download_count::TagArchiveDownloadCount; +pub mod tag_protection; +pub use self::tag_protection::TagProtection; +pub mod team; +pub use self::team::Team; +pub mod team_search_results; +pub use self::team_search_results::TeamSearchResults; +pub mod timeline_comment; +pub use self::timeline_comment::TimelineComment; +pub mod topic_name; +pub use self::topic_name::TopicName; +pub mod topic_response; +pub use self::topic_response::TopicResponse; +pub mod topic_search_results; +pub use self::topic_search_results::TopicSearchResults; +pub mod tracked_time; +pub use self::tracked_time::TrackedTime; +pub mod transfer_repo_option; +pub use self::transfer_repo_option::TransferRepoOption; +pub mod update_branch_repo_option; +pub use self::update_branch_repo_option::UpdateBranchRepoOption; +pub mod update_file_options; +pub use self::update_file_options::UpdateFileOptions; +pub mod update_repo_avatar_option; +pub use self::update_repo_avatar_option::UpdateRepoAvatarOption; +pub mod update_user_avatar_option; +pub use self::update_user_avatar_option::UpdateUserAvatarOption; +pub mod update_variable_option; +pub use self::update_variable_option::UpdateVariableOption; +pub mod user; +pub use self::user::User; +pub mod user_heatmap_data; +pub use self::user_heatmap_data::UserHeatmapData; +pub mod user_search_results; +pub use self::user_search_results::UserSearchResults; +pub mod user_settings; +pub use self::user_settings::UserSettings; +pub mod user_settings_options; +pub use self::user_settings_options::UserSettingsOptions; +pub mod verify_gpg_key_option; +pub use self::verify_gpg_key_option::VerifyGpgKeyOption; +pub mod watch_info; +pub use self::watch_info::WatchInfo; +pub mod wiki_commit; +pub use self::wiki_commit::WikiCommit; +pub mod wiki_commit_list; +pub use self::wiki_commit_list::WikiCommitList; +pub mod wiki_page; +pub use self::wiki_page::WikiPage; +pub mod wiki_page_meta_data; +pub use self::wiki_page_meta_data::WikiPageMetaData; diff --git a/forgejo-openapi/src/models/new_issue_pins_allowed.rs b/forgejo-openapi/src/models/new_issue_pins_allowed.rs new file mode 100644 index 0000000..21ff7c4 --- /dev/null +++ b/forgejo-openapi/src/models/new_issue_pins_allowed.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// NewIssuePinsAllowed : NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NewIssuePinsAllowed { + #[serde(rename = "issues", skip_serializing_if = "Option::is_none")] + pub issues: Option, + #[serde(rename = "pull_requests", skip_serializing_if = "Option::is_none")] + pub pull_requests: Option, +} + +impl NewIssuePinsAllowed { + /// NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed + pub fn new() -> NewIssuePinsAllowed { + NewIssuePinsAllowed { + issues: None, + pull_requests: None, + } + } +} + diff --git a/forgejo-openapi/src/models/node_info.rs b/forgejo-openapi/src/models/node_info.rs new file mode 100644 index 0000000..672d8a5 --- /dev/null +++ b/forgejo-openapi/src/models/node_info.rs @@ -0,0 +1,47 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// NodeInfo : NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeInfo { + #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + pub metadata: Option, + #[serde(rename = "openRegistrations", skip_serializing_if = "Option::is_none")] + pub open_registrations: Option, + #[serde(rename = "protocols", skip_serializing_if = "Option::is_none")] + pub protocols: Option>, + #[serde(rename = "services", skip_serializing_if = "Option::is_none")] + pub services: Option>, + #[serde(rename = "software", skip_serializing_if = "Option::is_none")] + pub software: Option>, + #[serde(rename = "usage", skip_serializing_if = "Option::is_none")] + pub usage: Option>, + #[serde(rename = "version", skip_serializing_if = "Option::is_none")] + pub version: Option, +} + +impl NodeInfo { + /// NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks + pub fn new() -> NodeInfo { + NodeInfo { + metadata: None, + open_registrations: None, + protocols: None, + services: None, + software: None, + usage: None, + version: None, + } + } +} + diff --git a/forgejo-openapi/src/models/node_info_services.rs b/forgejo-openapi/src/models/node_info_services.rs new file mode 100644 index 0000000..f273516 --- /dev/null +++ b/forgejo-openapi/src/models/node_info_services.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// NodeInfoServices : NodeInfoServices contains the third party sites this server can connect to via their application API +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeInfoServices { + #[serde(rename = "inbound", skip_serializing_if = "Option::is_none")] + pub inbound: Option>, + #[serde(rename = "outbound", skip_serializing_if = "Option::is_none")] + pub outbound: Option>, +} + +impl NodeInfoServices { + /// NodeInfoServices contains the third party sites this server can connect to via their application API + pub fn new() -> NodeInfoServices { + NodeInfoServices { + inbound: None, + outbound: None, + } + } +} + diff --git a/forgejo-openapi/src/models/node_info_software.rs b/forgejo-openapi/src/models/node_info_software.rs new file mode 100644 index 0000000..c609313 --- /dev/null +++ b/forgejo-openapi/src/models/node_info_software.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// NodeInfoSoftware : NodeInfoSoftware contains Metadata about server software in use +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeInfoSoftware { + #[serde(rename = "homepage", skip_serializing_if = "Option::is_none")] + pub homepage: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] + pub repository: Option, + #[serde(rename = "version", skip_serializing_if = "Option::is_none")] + pub version: Option, +} + +impl NodeInfoSoftware { + /// NodeInfoSoftware contains Metadata about server software in use + pub fn new() -> NodeInfoSoftware { + NodeInfoSoftware { + homepage: None, + name: None, + repository: None, + version: None, + } + } +} + diff --git a/forgejo-openapi/src/models/node_info_usage.rs b/forgejo-openapi/src/models/node_info_usage.rs new file mode 100644 index 0000000..7aa0920 --- /dev/null +++ b/forgejo-openapi/src/models/node_info_usage.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// NodeInfoUsage : NodeInfoUsage contains usage statistics for this server +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeInfoUsage { + #[serde(rename = "localComments", skip_serializing_if = "Option::is_none")] + pub local_comments: Option, + #[serde(rename = "localPosts", skip_serializing_if = "Option::is_none")] + pub local_posts: Option, + #[serde(rename = "users", skip_serializing_if = "Option::is_none")] + pub users: Option>, +} + +impl NodeInfoUsage { + /// NodeInfoUsage contains usage statistics for this server + pub fn new() -> NodeInfoUsage { + NodeInfoUsage { + local_comments: None, + local_posts: None, + users: None, + } + } +} + diff --git a/forgejo-openapi/src/models/node_info_usage_users.rs b/forgejo-openapi/src/models/node_info_usage_users.rs new file mode 100644 index 0000000..0938af9 --- /dev/null +++ b/forgejo-openapi/src/models/node_info_usage_users.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// NodeInfoUsageUsers : NodeInfoUsageUsers contains statistics about the users of this server +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NodeInfoUsageUsers { + #[serde(rename = "activeHalfyear", skip_serializing_if = "Option::is_none")] + pub active_halfyear: Option, + #[serde(rename = "activeMonth", skip_serializing_if = "Option::is_none")] + pub active_month: Option, + #[serde(rename = "total", skip_serializing_if = "Option::is_none")] + pub total: Option, +} + +impl NodeInfoUsageUsers { + /// NodeInfoUsageUsers contains statistics about the users of this server + pub fn new() -> NodeInfoUsageUsers { + NodeInfoUsageUsers { + active_halfyear: None, + active_month: None, + total: None, + } + } +} + diff --git a/forgejo-openapi/src/models/note.rs b/forgejo-openapi/src/models/note.rs new file mode 100644 index 0000000..846fee6 --- /dev/null +++ b/forgejo-openapi/src/models/note.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Note : Note contains information related to a git note +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Note { + #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] + pub commit: Option>, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +impl Note { + /// Note contains information related to a git note + pub fn new() -> Note { + Note { + commit: None, + message: None, + } + } +} + diff --git a/forgejo-openapi/src/models/note_options.rs b/forgejo-openapi/src/models/note_options.rs new file mode 100644 index 0000000..569cf65 --- /dev/null +++ b/forgejo-openapi/src/models/note_options.rs @@ -0,0 +1,27 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NoteOptions { + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +impl NoteOptions { + pub fn new() -> NoteOptions { + NoteOptions { + message: None, + } + } +} + diff --git a/forgejo-openapi/src/models/notification_count.rs b/forgejo-openapi/src/models/notification_count.rs new file mode 100644 index 0000000..7b819bd --- /dev/null +++ b/forgejo-openapi/src/models/notification_count.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// NotificationCount : NotificationCount number of unread notifications +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotificationCount { + #[serde(rename = "new", skip_serializing_if = "Option::is_none")] + pub new: Option, +} + +impl NotificationCount { + /// NotificationCount number of unread notifications + pub fn new() -> NotificationCount { + NotificationCount { + new: None, + } + } +} + diff --git a/forgejo-openapi/src/models/notification_subject.rs b/forgejo-openapi/src/models/notification_subject.rs new file mode 100644 index 0000000..447b86e --- /dev/null +++ b/forgejo-openapi/src/models/notification_subject.rs @@ -0,0 +1,49 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// NotificationSubject : NotificationSubject contains the notification subject (Issue/Pull/Commit) +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotificationSubject { + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "latest_comment_html_url", skip_serializing_if = "Option::is_none")] + pub latest_comment_html_url: Option, + #[serde(rename = "latest_comment_url", skip_serializing_if = "Option::is_none")] + pub latest_comment_url: Option, + /// StateType issue state type + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, + /// NotifySubjectType represent type of notification subject + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl NotificationSubject { + /// NotificationSubject contains the notification subject (Issue/Pull/Commit) + pub fn new() -> NotificationSubject { + NotificationSubject { + html_url: None, + latest_comment_html_url: None, + latest_comment_url: None, + state: None, + title: None, + r#type: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/notification_thread.rs b/forgejo-openapi/src/models/notification_thread.rs new file mode 100644 index 0000000..ddf7ee1 --- /dev/null +++ b/forgejo-openapi/src/models/notification_thread.rs @@ -0,0 +1,47 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// NotificationThread : NotificationThread expose Notification on API +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotificationThread { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "pinned", skip_serializing_if = "Option::is_none")] + pub pinned: Option, + #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] + pub repository: Option>, + #[serde(rename = "subject", skip_serializing_if = "Option::is_none")] + pub subject: Option>, + #[serde(rename = "unread", skip_serializing_if = "Option::is_none")] + pub unread: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl NotificationThread { + /// NotificationThread expose Notification on API + pub fn new() -> NotificationThread { + NotificationThread { + id: None, + pinned: None, + repository: None, + subject: None, + unread: None, + updated_at: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/o_auth2_application.rs b/forgejo-openapi/src/models/o_auth2_application.rs new file mode 100644 index 0000000..62b086c --- /dev/null +++ b/forgejo-openapi/src/models/o_auth2_application.rs @@ -0,0 +1,45 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OAuth2Application { + #[serde(rename = "client_id", skip_serializing_if = "Option::is_none")] + pub client_id: Option, + #[serde(rename = "client_secret", skip_serializing_if = "Option::is_none")] + pub client_secret: Option, + #[serde(rename = "confidential_client", skip_serializing_if = "Option::is_none")] + pub confidential_client: Option, + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "redirect_uris", skip_serializing_if = "Option::is_none")] + pub redirect_uris: Option>, +} + +impl OAuth2Application { + pub fn new() -> OAuth2Application { + OAuth2Application { + client_id: None, + client_secret: None, + confidential_client: None, + created: None, + id: None, + name: None, + redirect_uris: None, + } + } +} + diff --git a/forgejo-openapi/src/models/organization.rs b/forgejo-openapi/src/models/organization.rs new file mode 100644 index 0000000..b218006 --- /dev/null +++ b/forgejo-openapi/src/models/organization.rs @@ -0,0 +1,60 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Organization : Organization represents an organization +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Organization { + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] + pub full_name: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "location", skip_serializing_if = "Option::is_none")] + pub location: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "repo_admin_change_team_access", skip_serializing_if = "Option::is_none")] + pub repo_admin_change_team_access: Option, + /// deprecated + #[serde(rename = "username", skip_serializing_if = "Option::is_none")] + pub username: Option, + #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] + pub visibility: Option, + #[serde(rename = "website", skip_serializing_if = "Option::is_none")] + pub website: Option, +} + +impl Organization { + /// Organization represents an organization + pub fn new() -> Organization { + Organization { + avatar_url: None, + description: None, + email: None, + full_name: None, + id: None, + location: None, + name: None, + repo_admin_change_team_access: None, + username: None, + visibility: None, + website: None, + } + } +} + diff --git a/forgejo-openapi/src/models/organization_permissions.rs b/forgejo-openapi/src/models/organization_permissions.rs new file mode 100644 index 0000000..b12cc99 --- /dev/null +++ b/forgejo-openapi/src/models/organization_permissions.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// OrganizationPermissions : OrganizationPermissions list different users permissions on an organization +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OrganizationPermissions { + #[serde(rename = "can_create_repository", skip_serializing_if = "Option::is_none")] + pub can_create_repository: Option, + #[serde(rename = "can_read", skip_serializing_if = "Option::is_none")] + pub can_read: Option, + #[serde(rename = "can_write", skip_serializing_if = "Option::is_none")] + pub can_write: Option, + #[serde(rename = "is_admin", skip_serializing_if = "Option::is_none")] + pub is_admin: Option, + #[serde(rename = "is_owner", skip_serializing_if = "Option::is_none")] + pub is_owner: Option, +} + +impl OrganizationPermissions { + /// OrganizationPermissions list different users permissions on an organization + pub fn new() -> OrganizationPermissions { + OrganizationPermissions { + can_create_repository: None, + can_read: None, + can_write: None, + is_admin: None, + is_owner: None, + } + } +} + diff --git a/forgejo-openapi/src/models/package.rs b/forgejo-openapi/src/models/package.rs new file mode 100644 index 0000000..a0f2132 --- /dev/null +++ b/forgejo-openapi/src/models/package.rs @@ -0,0 +1,53 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Package : Package represents a package +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Package { + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "creator", skip_serializing_if = "Option::is_none")] + pub creator: Option>, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "owner", skip_serializing_if = "Option::is_none")] + pub owner: Option>, + #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] + pub repository: Option>, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "version", skip_serializing_if = "Option::is_none")] + pub version: Option, +} + +impl Package { + /// Package represents a package + pub fn new() -> Package { + Package { + created_at: None, + creator: None, + html_url: None, + id: None, + name: None, + owner: None, + repository: None, + r#type: None, + version: None, + } + } +} + diff --git a/forgejo-openapi/src/models/package_file.rs b/forgejo-openapi/src/models/package_file.rs new file mode 100644 index 0000000..37c5027 --- /dev/null +++ b/forgejo-openapi/src/models/package_file.rs @@ -0,0 +1,47 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PackageFile : PackageFile represents a package file +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PackageFile { + #[serde(rename = "Size", skip_serializing_if = "Option::is_none")] + pub size: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "md5", skip_serializing_if = "Option::is_none")] + pub md5: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "sha1", skip_serializing_if = "Option::is_none")] + pub sha1: Option, + #[serde(rename = "sha256", skip_serializing_if = "Option::is_none")] + pub sha256: Option, + #[serde(rename = "sha512", skip_serializing_if = "Option::is_none")] + pub sha512: Option, +} + +impl PackageFile { + /// PackageFile represents a package file + pub fn new() -> PackageFile { + PackageFile { + size: None, + id: None, + md5: None, + name: None, + sha1: None, + sha256: None, + sha512: None, + } + } +} + diff --git a/forgejo-openapi/src/models/payload_commit.rs b/forgejo-openapi/src/models/payload_commit.rs new file mode 100644 index 0000000..23678cc --- /dev/null +++ b/forgejo-openapi/src/models/payload_commit.rs @@ -0,0 +1,57 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PayloadCommit : PayloadCommit represents a commit +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PayloadCommit { + #[serde(rename = "added", skip_serializing_if = "Option::is_none")] + pub added: Option>, + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option>, + #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] + pub committer: Option>, + /// sha1 hash of the commit + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "modified", skip_serializing_if = "Option::is_none")] + pub modified: Option>, + #[serde(rename = "removed", skip_serializing_if = "Option::is_none")] + pub removed: Option>, + #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] + pub timestamp: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, +} + +impl PayloadCommit { + /// PayloadCommit represents a commit + pub fn new() -> PayloadCommit { + PayloadCommit { + added: None, + author: None, + committer: None, + id: None, + message: None, + modified: None, + removed: None, + timestamp: None, + url: None, + verification: None, + } + } +} + diff --git a/forgejo-openapi/src/models/payload_commit_verification.rs b/forgejo-openapi/src/models/payload_commit_verification.rs new file mode 100644 index 0000000..09c1eca --- /dev/null +++ b/forgejo-openapi/src/models/payload_commit_verification.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PayloadCommitVerification : PayloadCommitVerification represents the GPG verification of a commit +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PayloadCommitVerification { + #[serde(rename = "payload", skip_serializing_if = "Option::is_none")] + pub payload: Option, + #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] + pub reason: Option, + #[serde(rename = "signature", skip_serializing_if = "Option::is_none")] + pub signature: Option, + #[serde(rename = "signer", skip_serializing_if = "Option::is_none")] + pub signer: Option>, + #[serde(rename = "verified", skip_serializing_if = "Option::is_none")] + pub verified: Option, +} + +impl PayloadCommitVerification { + /// PayloadCommitVerification represents the GPG verification of a commit + pub fn new() -> PayloadCommitVerification { + PayloadCommitVerification { + payload: None, + reason: None, + signature: None, + signer: None, + verified: None, + } + } +} + diff --git a/forgejo-openapi/src/models/payload_user.rs b/forgejo-openapi/src/models/payload_user.rs new file mode 100644 index 0000000..832e4a1 --- /dev/null +++ b/forgejo-openapi/src/models/payload_user.rs @@ -0,0 +1,36 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PayloadUser : PayloadUser represents the author or committer of a commit +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PayloadUser { + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + /// Full name of the commit author + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "username", skip_serializing_if = "Option::is_none")] + pub username: Option, +} + +impl PayloadUser { + /// PayloadUser represents the author or committer of a commit + pub fn new() -> PayloadUser { + PayloadUser { + email: None, + name: None, + username: None, + } + } +} + diff --git a/forgejo-openapi/src/models/permission.rs b/forgejo-openapi/src/models/permission.rs new file mode 100644 index 0000000..bc6b27d --- /dev/null +++ b/forgejo-openapi/src/models/permission.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Permission : Permission represents a set of permissions +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Permission { + #[serde(rename = "admin", skip_serializing_if = "Option::is_none")] + pub admin: Option, + #[serde(rename = "pull", skip_serializing_if = "Option::is_none")] + pub pull: Option, + #[serde(rename = "push", skip_serializing_if = "Option::is_none")] + pub push: Option, +} + +impl Permission { + /// Permission represents a set of permissions + pub fn new() -> Permission { + Permission { + admin: None, + pull: None, + push: None, + } + } +} + diff --git a/forgejo-openapi/src/models/pr_branch_info.rs b/forgejo-openapi/src/models/pr_branch_info.rs new file mode 100644 index 0000000..8596cd3 --- /dev/null +++ b/forgejo-openapi/src/models/pr_branch_info.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PrBranchInfo : PRBranchInfo information about a branch +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PrBranchInfo { + #[serde(rename = "label", skip_serializing_if = "Option::is_none")] + pub label: Option, + #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] + pub r#ref: Option, + #[serde(rename = "repo", skip_serializing_if = "Option::is_none")] + pub repo: Option>, + #[serde(rename = "repo_id", skip_serializing_if = "Option::is_none")] + pub repo_id: Option, + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, +} + +impl PrBranchInfo { + /// PRBranchInfo information about a branch + pub fn new() -> PrBranchInfo { + PrBranchInfo { + label: None, + r#ref: None, + repo: None, + repo_id: None, + sha: None, + } + } +} + diff --git a/forgejo-openapi/src/models/public_key.rs b/forgejo-openapi/src/models/public_key.rs new file mode 100644 index 0000000..86ff75a --- /dev/null +++ b/forgejo-openapi/src/models/public_key.rs @@ -0,0 +1,53 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PublicKey : PublicKey publickey is a user key to push code to repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PublicKey { + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "fingerprint", skip_serializing_if = "Option::is_none")] + pub fingerprint: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "key", skip_serializing_if = "Option::is_none")] + pub key: Option, + #[serde(rename = "key_type", skip_serializing_if = "Option::is_none")] + pub key_type: Option, + #[serde(rename = "read_only", skip_serializing_if = "Option::is_none")] + pub read_only: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, +} + +impl PublicKey { + /// PublicKey publickey is a user key to push code to repository + pub fn new() -> PublicKey { + PublicKey { + created_at: None, + fingerprint: None, + id: None, + key: None, + key_type: None, + read_only: None, + title: None, + url: None, + user: None, + } + } +} + diff --git a/forgejo-openapi/src/models/pull_request.rs b/forgejo-openapi/src/models/pull_request.rs new file mode 100644 index 0000000..b10aa6a --- /dev/null +++ b/forgejo-openapi/src/models/pull_request.rs @@ -0,0 +1,142 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PullRequest : PullRequest represents a pull request +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PullRequest { + #[serde(rename = "additions", skip_serializing_if = "Option::is_none")] + pub additions: Option, + #[serde(rename = "allow_maintainer_edit", skip_serializing_if = "Option::is_none")] + pub allow_maintainer_edit: Option, + #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] + pub assignee: Option>, + #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] + pub assignees: Option>, + #[serde(rename = "base", skip_serializing_if = "Option::is_none")] + pub base: Option>, + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "changed_files", skip_serializing_if = "Option::is_none")] + pub changed_files: Option, + #[serde(rename = "closed_at", skip_serializing_if = "Option::is_none")] + pub closed_at: Option, + #[serde(rename = "comments", skip_serializing_if = "Option::is_none")] + pub comments: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "deletions", skip_serializing_if = "Option::is_none")] + pub deletions: Option, + #[serde(rename = "diff_url", skip_serializing_if = "Option::is_none")] + pub diff_url: Option, + #[serde(rename = "draft", skip_serializing_if = "Option::is_none")] + pub draft: Option, + #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] + pub due_date: Option, + #[serde(rename = "flow", skip_serializing_if = "Option::is_none")] + pub flow: Option, + #[serde(rename = "head", skip_serializing_if = "Option::is_none")] + pub head: Option>, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "is_locked", skip_serializing_if = "Option::is_none")] + pub is_locked: Option, + #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] + pub labels: Option>, + #[serde(rename = "merge_base", skip_serializing_if = "Option::is_none")] + pub merge_base: Option, + #[serde(rename = "merge_commit_sha", skip_serializing_if = "Option::is_none")] + pub merge_commit_sha: Option, + #[serde(rename = "mergeable", skip_serializing_if = "Option::is_none")] + pub mergeable: Option, + #[serde(rename = "merged", skip_serializing_if = "Option::is_none")] + pub merged: Option, + #[serde(rename = "merged_at", skip_serializing_if = "Option::is_none")] + pub merged_at: Option, + #[serde(rename = "merged_by", skip_serializing_if = "Option::is_none")] + pub merged_by: Option>, + #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] + pub milestone: Option>, + #[serde(rename = "number", skip_serializing_if = "Option::is_none")] + pub number: Option, + #[serde(rename = "patch_url", skip_serializing_if = "Option::is_none")] + pub patch_url: Option, + #[serde(rename = "pin_order", skip_serializing_if = "Option::is_none")] + pub pin_order: Option, + #[serde(rename = "requested_reviewers", skip_serializing_if = "Option::is_none")] + pub requested_reviewers: Option>, + #[serde(rename = "requested_reviewers_teams", skip_serializing_if = "Option::is_none")] + pub requested_reviewers_teams: Option>, + /// number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) + #[serde(rename = "review_comments", skip_serializing_if = "Option::is_none")] + pub review_comments: Option, + /// StateType issue state type + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, +} + +impl PullRequest { + /// PullRequest represents a pull request + pub fn new() -> PullRequest { + PullRequest { + additions: None, + allow_maintainer_edit: None, + assignee: None, + assignees: None, + base: None, + body: None, + changed_files: None, + closed_at: None, + comments: None, + created_at: None, + deletions: None, + diff_url: None, + draft: None, + due_date: None, + flow: None, + head: None, + html_url: None, + id: None, + is_locked: None, + labels: None, + merge_base: None, + merge_commit_sha: None, + mergeable: None, + merged: None, + merged_at: None, + merged_by: None, + milestone: None, + number: None, + patch_url: None, + pin_order: None, + requested_reviewers: None, + requested_reviewers_teams: None, + review_comments: None, + state: None, + title: None, + updated_at: None, + url: None, + user: None, + } + } +} + diff --git a/forgejo-openapi/src/models/pull_request_meta.rs b/forgejo-openapi/src/models/pull_request_meta.rs new file mode 100644 index 0000000..c3200a4 --- /dev/null +++ b/forgejo-openapi/src/models/pull_request_meta.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PullRequestMeta : PullRequestMeta PR info if an issue is a PR +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PullRequestMeta { + #[serde(rename = "draft", skip_serializing_if = "Option::is_none")] + pub draft: Option, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "merged", skip_serializing_if = "Option::is_none")] + pub merged: Option, + #[serde(rename = "merged_at", skip_serializing_if = "Option::is_none")] + pub merged_at: Option, +} + +impl PullRequestMeta { + /// PullRequestMeta PR info if an issue is a PR + pub fn new() -> PullRequestMeta { + PullRequestMeta { + draft: None, + html_url: None, + merged: None, + merged_at: None, + } + } +} + diff --git a/forgejo-openapi/src/models/pull_review.rs b/forgejo-openapi/src/models/pull_review.rs new file mode 100644 index 0000000..8433b39 --- /dev/null +++ b/forgejo-openapi/src/models/pull_review.rs @@ -0,0 +1,69 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PullReview : PullReview represents a pull request review +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PullReview { + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "comments_count", skip_serializing_if = "Option::is_none")] + pub comments_count: Option, + #[serde(rename = "commit_id", skip_serializing_if = "Option::is_none")] + pub commit_id: Option, + #[serde(rename = "dismissed", skip_serializing_if = "Option::is_none")] + pub dismissed: Option, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "official", skip_serializing_if = "Option::is_none")] + pub official: Option, + #[serde(rename = "pull_request_url", skip_serializing_if = "Option::is_none")] + pub pull_request_url: Option, + #[serde(rename = "stale", skip_serializing_if = "Option::is_none")] + pub stale: Option, + /// ReviewStateType review state type + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "submitted_at", skip_serializing_if = "Option::is_none")] + pub submitted_at: Option, + #[serde(rename = "team", skip_serializing_if = "Option::is_none")] + pub team: Option>, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, +} + +impl PullReview { + /// PullReview represents a pull request review + pub fn new() -> PullReview { + PullReview { + body: None, + comments_count: None, + commit_id: None, + dismissed: None, + html_url: None, + id: None, + official: None, + pull_request_url: None, + stale: None, + state: None, + submitted_at: None, + team: None, + updated_at: None, + user: None, + } + } +} + diff --git a/forgejo-openapi/src/models/pull_review_comment.rs b/forgejo-openapi/src/models/pull_review_comment.rs new file mode 100644 index 0000000..21570aa --- /dev/null +++ b/forgejo-openapi/src/models/pull_review_comment.rs @@ -0,0 +1,71 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PullReviewComment : PullReviewComment represents a comment on a pull request review +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PullReviewComment { + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "commit_id", skip_serializing_if = "Option::is_none")] + pub commit_id: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "diff_hunk", skip_serializing_if = "Option::is_none")] + pub diff_hunk: Option, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "original_commit_id", skip_serializing_if = "Option::is_none")] + pub original_commit_id: Option, + #[serde(rename = "original_position", skip_serializing_if = "Option::is_none")] + pub original_position: Option, + #[serde(rename = "path", skip_serializing_if = "Option::is_none")] + pub path: Option, + #[serde(rename = "position", skip_serializing_if = "Option::is_none")] + pub position: Option, + #[serde(rename = "pull_request_review_id", skip_serializing_if = "Option::is_none")] + pub pull_request_review_id: Option, + #[serde(rename = "pull_request_url", skip_serializing_if = "Option::is_none")] + pub pull_request_url: Option, + #[serde(rename = "resolver", skip_serializing_if = "Option::is_none")] + pub resolver: Option>, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, +} + +impl PullReviewComment { + /// PullReviewComment represents a comment on a pull request review + pub fn new() -> PullReviewComment { + PullReviewComment { + body: None, + commit_id: None, + created_at: None, + diff_hunk: None, + html_url: None, + id: None, + original_commit_id: None, + original_position: None, + path: None, + position: None, + pull_request_review_id: None, + pull_request_url: None, + resolver: None, + updated_at: None, + user: None, + } + } +} + diff --git a/forgejo-openapi/src/models/pull_review_request_options.rs b/forgejo-openapi/src/models/pull_review_request_options.rs new file mode 100644 index 0000000..910b053 --- /dev/null +++ b/forgejo-openapi/src/models/pull_review_request_options.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PullReviewRequestOptions : PullReviewRequestOptions are options to add or remove pull review requests +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PullReviewRequestOptions { + #[serde(rename = "reviewers", skip_serializing_if = "Option::is_none")] + pub reviewers: Option>, + #[serde(rename = "team_reviewers", skip_serializing_if = "Option::is_none")] + pub team_reviewers: Option>, +} + +impl PullReviewRequestOptions { + /// PullReviewRequestOptions are options to add or remove pull review requests + pub fn new() -> PullReviewRequestOptions { + PullReviewRequestOptions { + reviewers: None, + team_reviewers: None, + } + } +} + diff --git a/forgejo-openapi/src/models/push_mirror.rs b/forgejo-openapi/src/models/push_mirror.rs new file mode 100644 index 0000000..bce4115 --- /dev/null +++ b/forgejo-openapi/src/models/push_mirror.rs @@ -0,0 +1,56 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// PushMirror : PushMirror represents information of a push mirror +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PushMirror { + #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] + pub branch_filter: Option, + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] + pub interval: Option, + #[serde(rename = "last_error", skip_serializing_if = "Option::is_none")] + pub last_error: Option, + #[serde(rename = "last_update", skip_serializing_if = "Option::is_none")] + pub last_update: Option, + #[serde(rename = "public_key", skip_serializing_if = "Option::is_none")] + pub public_key: Option, + #[serde(rename = "remote_address", skip_serializing_if = "Option::is_none")] + pub remote_address: Option, + #[serde(rename = "remote_name", skip_serializing_if = "Option::is_none")] + pub remote_name: Option, + #[serde(rename = "repo_name", skip_serializing_if = "Option::is_none")] + pub repo_name: Option, + #[serde(rename = "sync_on_commit", skip_serializing_if = "Option::is_none")] + pub sync_on_commit: Option, +} + +impl PushMirror { + /// PushMirror represents information of a push mirror + pub fn new() -> PushMirror { + PushMirror { + branch_filter: None, + created: None, + interval: None, + last_error: None, + last_update: None, + public_key: None, + remote_address: None, + remote_name: None, + repo_name: None, + sync_on_commit: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_group.rs b/forgejo-openapi/src/models/quota_group.rs new file mode 100644 index 0000000..d0f8fa9 --- /dev/null +++ b/forgejo-openapi/src/models/quota_group.rs @@ -0,0 +1,34 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaGroup : QuotaGroup represents a quota group +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaGroup { + /// Name of the group + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Rules associated with the group + #[serde(rename = "rules", skip_serializing_if = "Option::is_none")] + pub rules: Option>, +} + +impl QuotaGroup { + /// QuotaGroup represents a quota group + pub fn new() -> QuotaGroup { + QuotaGroup { + name: None, + rules: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_info.rs b/forgejo-openapi/src/models/quota_info.rs new file mode 100644 index 0000000..d684535 --- /dev/null +++ b/forgejo-openapi/src/models/quota_info.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaInfo : QuotaInfo represents information about a user's quota +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaInfo { + /// QuotaGroupList represents a list of quota groups + #[serde(rename = "groups", skip_serializing_if = "Option::is_none")] + pub groups: Option>, + #[serde(rename = "used", skip_serializing_if = "Option::is_none")] + pub used: Option>, +} + +impl QuotaInfo { + /// QuotaInfo represents information about a user's quota + pub fn new() -> QuotaInfo { + QuotaInfo { + groups: None, + used: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_rule_info.rs b/forgejo-openapi/src/models/quota_rule_info.rs new file mode 100644 index 0000000..c0fbd5e --- /dev/null +++ b/forgejo-openapi/src/models/quota_rule_info.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaRuleInfo : QuotaRuleInfo contains information about a quota rule +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaRuleInfo { + /// The limit set by the rule + #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] + pub limit: Option, + /// Name of the rule (only shown to admins) + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Subjects the rule affects + #[serde(rename = "subjects", skip_serializing_if = "Option::is_none")] + pub subjects: Option>, +} + +impl QuotaRuleInfo { + /// QuotaRuleInfo contains information about a quota rule + pub fn new() -> QuotaRuleInfo { + QuotaRuleInfo { + limit: None, + name: None, + subjects: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_used.rs b/forgejo-openapi/src/models/quota_used.rs new file mode 100644 index 0000000..38c10bc --- /dev/null +++ b/forgejo-openapi/src/models/quota_used.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaUsed : QuotaUsed represents the quota usage of a user +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaUsed { + #[serde(rename = "size", skip_serializing_if = "Option::is_none")] + pub size: Option>, +} + +impl QuotaUsed { + /// QuotaUsed represents the quota usage of a user + pub fn new() -> QuotaUsed { + QuotaUsed { + size: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_used_artifact.rs b/forgejo-openapi/src/models/quota_used_artifact.rs new file mode 100644 index 0000000..70c983c --- /dev/null +++ b/forgejo-openapi/src/models/quota_used_artifact.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaUsedArtifact : QuotaUsedArtifact represents an artifact counting towards a user's quota +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaUsedArtifact { + /// HTML URL to the action run containing the artifact + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + /// Name of the artifact + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Size of the artifact (compressed) + #[serde(rename = "size", skip_serializing_if = "Option::is_none")] + pub size: Option, +} + +impl QuotaUsedArtifact { + /// QuotaUsedArtifact represents an artifact counting towards a user's quota + pub fn new() -> QuotaUsedArtifact { + QuotaUsedArtifact { + html_url: None, + name: None, + size: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_used_attachment.rs b/forgejo-openapi/src/models/quota_used_attachment.rs new file mode 100644 index 0000000..2158ac4 --- /dev/null +++ b/forgejo-openapi/src/models/quota_used_attachment.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaUsedAttachment : QuotaUsedAttachment represents an attachment counting towards a user's quota +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaUsedAttachment { + /// API URL for the attachment + #[serde(rename = "api_url", skip_serializing_if = "Option::is_none")] + pub api_url: Option, + #[serde(rename = "contained_in", skip_serializing_if = "Option::is_none")] + pub contained_in: Option>, + /// Filename of the attachment + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Size of the attachment (in bytes) + #[serde(rename = "size", skip_serializing_if = "Option::is_none")] + pub size: Option, +} + +impl QuotaUsedAttachment { + /// QuotaUsedAttachment represents an attachment counting towards a user's quota + pub fn new() -> QuotaUsedAttachment { + QuotaUsedAttachment { + api_url: None, + contained_in: None, + name: None, + size: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_used_attachment_contained_in.rs b/forgejo-openapi/src/models/quota_used_attachment_contained_in.rs new file mode 100644 index 0000000..1f2e683 --- /dev/null +++ b/forgejo-openapi/src/models/quota_used_attachment_contained_in.rs @@ -0,0 +1,34 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaUsedAttachmentContainedIn : Context for the attachment: URLs to the containing object +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaUsedAttachmentContainedIn { + /// API URL for the object that contains this attachment + #[serde(rename = "api_url", skip_serializing_if = "Option::is_none")] + pub api_url: Option, + /// HTML URL for the object that contains this attachment + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, +} + +impl QuotaUsedAttachmentContainedIn { + /// Context for the attachment: URLs to the containing object + pub fn new() -> QuotaUsedAttachmentContainedIn { + QuotaUsedAttachmentContainedIn { + api_url: None, + html_url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_used_package.rs b/forgejo-openapi/src/models/quota_used_package.rs new file mode 100644 index 0000000..5aff47b --- /dev/null +++ b/forgejo-openapi/src/models/quota_used_package.rs @@ -0,0 +1,46 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaUsedPackage : QuotaUsedPackage represents a package counting towards a user's quota +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaUsedPackage { + /// HTML URL to the package version + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + /// Name of the package + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Size of the package version + #[serde(rename = "size", skip_serializing_if = "Option::is_none")] + pub size: Option, + /// Type of the package + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + /// Version of the package + #[serde(rename = "version", skip_serializing_if = "Option::is_none")] + pub version: Option, +} + +impl QuotaUsedPackage { + /// QuotaUsedPackage represents a package counting towards a user's quota + pub fn new() -> QuotaUsedPackage { + QuotaUsedPackage { + html_url: None, + name: None, + size: None, + r#type: None, + version: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_used_size.rs b/forgejo-openapi/src/models/quota_used_size.rs new file mode 100644 index 0000000..fa00a8d --- /dev/null +++ b/forgejo-openapi/src/models/quota_used_size.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaUsedSize : QuotaUsedSize represents the size-based quota usage of a user +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaUsedSize { + #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] + pub assets: Option>, + #[serde(rename = "git", skip_serializing_if = "Option::is_none")] + pub git: Option>, + #[serde(rename = "repos", skip_serializing_if = "Option::is_none")] + pub repos: Option>, +} + +impl QuotaUsedSize { + /// QuotaUsedSize represents the size-based quota usage of a user + pub fn new() -> QuotaUsedSize { + QuotaUsedSize { + assets: None, + git: None, + repos: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_used_size_assets.rs b/forgejo-openapi/src/models/quota_used_size_assets.rs new file mode 100644 index 0000000..cecc5a4 --- /dev/null +++ b/forgejo-openapi/src/models/quota_used_size_assets.rs @@ -0,0 +1,36 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaUsedSizeAssets : QuotaUsedSizeAssets represents the size-based asset usage of a user +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaUsedSizeAssets { + /// Storage size used for the user's artifacts + #[serde(rename = "artifacts", skip_serializing_if = "Option::is_none")] + pub artifacts: Option, + #[serde(rename = "attachments", skip_serializing_if = "Option::is_none")] + pub attachments: Option>, + #[serde(rename = "packages", skip_serializing_if = "Option::is_none")] + pub packages: Option>, +} + +impl QuotaUsedSizeAssets { + /// QuotaUsedSizeAssets represents the size-based asset usage of a user + pub fn new() -> QuotaUsedSizeAssets { + QuotaUsedSizeAssets { + artifacts: None, + attachments: None, + packages: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_used_size_assets_attachments.rs b/forgejo-openapi/src/models/quota_used_size_assets_attachments.rs new file mode 100644 index 0000000..b13c428 --- /dev/null +++ b/forgejo-openapi/src/models/quota_used_size_assets_attachments.rs @@ -0,0 +1,34 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaUsedSizeAssetsAttachments : QuotaUsedSizeAssetsAttachments represents the size-based attachment quota usage of a user +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaUsedSizeAssetsAttachments { + /// Storage size used for the user's issue & comment attachments + #[serde(rename = "issues", skip_serializing_if = "Option::is_none")] + pub issues: Option, + /// Storage size used for the user's release attachments + #[serde(rename = "releases", skip_serializing_if = "Option::is_none")] + pub releases: Option, +} + +impl QuotaUsedSizeAssetsAttachments { + /// QuotaUsedSizeAssetsAttachments represents the size-based attachment quota usage of a user + pub fn new() -> QuotaUsedSizeAssetsAttachments { + QuotaUsedSizeAssetsAttachments { + issues: None, + releases: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_used_size_assets_packages.rs b/forgejo-openapi/src/models/quota_used_size_assets_packages.rs new file mode 100644 index 0000000..0d62c25 --- /dev/null +++ b/forgejo-openapi/src/models/quota_used_size_assets_packages.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaUsedSizeAssetsPackages : QuotaUsedSizeAssetsPackages represents the size-based package quota usage of a user +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaUsedSizeAssetsPackages { + /// Storage suze used for the user's packages + #[serde(rename = "all", skip_serializing_if = "Option::is_none")] + pub all: Option, +} + +impl QuotaUsedSizeAssetsPackages { + /// QuotaUsedSizeAssetsPackages represents the size-based package quota usage of a user + pub fn new() -> QuotaUsedSizeAssetsPackages { + QuotaUsedSizeAssetsPackages { + all: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_used_size_git.rs b/forgejo-openapi/src/models/quota_used_size_git.rs new file mode 100644 index 0000000..0df2336 --- /dev/null +++ b/forgejo-openapi/src/models/quota_used_size_git.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaUsedSizeGit : QuotaUsedSizeGit represents the size-based git (lfs) quota usage of a user +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaUsedSizeGit { + /// Storage size of the user's Git LFS objects + #[serde(rename = "LFS", skip_serializing_if = "Option::is_none")] + pub lfs: Option, +} + +impl QuotaUsedSizeGit { + /// QuotaUsedSizeGit represents the size-based git (lfs) quota usage of a user + pub fn new() -> QuotaUsedSizeGit { + QuotaUsedSizeGit { + lfs: None, + } + } +} + diff --git a/forgejo-openapi/src/models/quota_used_size_repos.rs b/forgejo-openapi/src/models/quota_used_size_repos.rs new file mode 100644 index 0000000..e1793f7 --- /dev/null +++ b/forgejo-openapi/src/models/quota_used_size_repos.rs @@ -0,0 +1,34 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// QuotaUsedSizeRepos : QuotaUsedSizeRepos represents the size-based repository quota usage of a user +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct QuotaUsedSizeRepos { + /// Storage size of the user's private repositories + #[serde(rename = "private", skip_serializing_if = "Option::is_none")] + pub private: Option, + /// Storage size of the user's public repositories + #[serde(rename = "public", skip_serializing_if = "Option::is_none")] + pub public: Option, +} + +impl QuotaUsedSizeRepos { + /// QuotaUsedSizeRepos represents the size-based repository quota usage of a user + pub fn new() -> QuotaUsedSizeRepos { + QuotaUsedSizeRepos { + private: None, + public: None, + } + } +} + diff --git a/forgejo-openapi/src/models/reaction.rs b/forgejo-openapi/src/models/reaction.rs new file mode 100644 index 0000000..6e4ead5 --- /dev/null +++ b/forgejo-openapi/src/models/reaction.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Reaction : Reaction contain one reaction +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Reaction { + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, +} + +impl Reaction { + /// Reaction contain one reaction + pub fn new() -> Reaction { + Reaction { + content: None, + created_at: None, + user: None, + } + } +} + diff --git a/forgejo-openapi/src/models/reference.rs b/forgejo-openapi/src/models/reference.rs new file mode 100644 index 0000000..e31fa4e --- /dev/null +++ b/forgejo-openapi/src/models/reference.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Reference { + #[serde(rename = "object", skip_serializing_if = "Option::is_none")] + pub object: Option>, + #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] + pub r#ref: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl Reference { + pub fn new() -> Reference { + Reference { + object: None, + r#ref: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/registration_token.rs b/forgejo-openapi/src/models/registration_token.rs new file mode 100644 index 0000000..46d728d --- /dev/null +++ b/forgejo-openapi/src/models/registration_token.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// RegistrationToken : RegistrationToken is a string used to register a runner with a server +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RegistrationToken { + #[serde(rename = "token", skip_serializing_if = "Option::is_none")] + pub token: Option, +} + +impl RegistrationToken { + /// RegistrationToken is a string used to register a runner with a server + pub fn new() -> RegistrationToken { + RegistrationToken { + token: None, + } + } +} + diff --git a/forgejo-openapi/src/models/release.rs b/forgejo-openapi/src/models/release.rs new file mode 100644 index 0000000..e4e7887 --- /dev/null +++ b/forgejo-openapi/src/models/release.rs @@ -0,0 +1,80 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Release : Release represents a repository release +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Release { + #[serde(rename = "archive_download_count", skip_serializing_if = "Option::is_none")] + pub archive_download_count: Option>, + #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] + pub assets: Option>, + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option>, + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "draft", skip_serializing_if = "Option::is_none")] + pub draft: Option, + #[serde(rename = "hide_archive_links", skip_serializing_if = "Option::is_none")] + pub hide_archive_links: Option, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "prerelease", skip_serializing_if = "Option::is_none")] + pub prerelease: Option, + #[serde(rename = "published_at", skip_serializing_if = "Option::is_none")] + pub published_at: Option, + #[serde(rename = "tag_name", skip_serializing_if = "Option::is_none")] + pub tag_name: Option, + #[serde(rename = "tarball_url", skip_serializing_if = "Option::is_none")] + pub tarball_url: Option, + #[serde(rename = "target_commitish", skip_serializing_if = "Option::is_none")] + pub target_commitish: Option, + #[serde(rename = "upload_url", skip_serializing_if = "Option::is_none")] + pub upload_url: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "zipball_url", skip_serializing_if = "Option::is_none")] + pub zipball_url: Option, +} + +impl Release { + /// Release represents a repository release + pub fn new() -> Release { + Release { + archive_download_count: None, + assets: None, + author: None, + body: None, + created_at: None, + draft: None, + hide_archive_links: None, + html_url: None, + id: None, + name: None, + prerelease: None, + published_at: None, + tag_name: None, + tarball_url: None, + target_commitish: None, + upload_url: None, + url: None, + zipball_url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/rename_org_option.rs b/forgejo-openapi/src/models/rename_org_option.rs new file mode 100644 index 0000000..59f0049 --- /dev/null +++ b/forgejo-openapi/src/models/rename_org_option.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// RenameOrgOption : RenameOrgOption options when renaming an organization +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RenameOrgOption { + /// New username for this org. This name cannot be in use yet by any other user. + #[serde(rename = "new_name")] + pub new_name: String, +} + +impl RenameOrgOption { + /// RenameOrgOption options when renaming an organization + pub fn new(new_name: String) -> RenameOrgOption { + RenameOrgOption { + new_name, + } + } +} + diff --git a/forgejo-openapi/src/models/rename_user_option.rs b/forgejo-openapi/src/models/rename_user_option.rs new file mode 100644 index 0000000..d24d53c --- /dev/null +++ b/forgejo-openapi/src/models/rename_user_option.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// RenameUserOption : RenameUserOption options when renaming a user +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RenameUserOption { + /// New username for this user. This name cannot be in use yet by any other user. + #[serde(rename = "new_username")] + pub new_username: String, +} + +impl RenameUserOption { + /// RenameUserOption options when renaming a user + pub fn new(new_username: String) -> RenameUserOption { + RenameUserOption { + new_username, + } + } +} + diff --git a/forgejo-openapi/src/models/replace_flags_option.rs b/forgejo-openapi/src/models/replace_flags_option.rs new file mode 100644 index 0000000..b530cd4 --- /dev/null +++ b/forgejo-openapi/src/models/replace_flags_option.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ReplaceFlagsOption : ReplaceFlagsOption options when replacing the flags of a repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ReplaceFlagsOption { + #[serde(rename = "flags", skip_serializing_if = "Option::is_none")] + pub flags: Option>, +} + +impl ReplaceFlagsOption { + /// ReplaceFlagsOption options when replacing the flags of a repository + pub fn new() -> ReplaceFlagsOption { + ReplaceFlagsOption { + flags: None, + } + } +} + diff --git a/forgejo-openapi/src/models/repo_collaborator_permission.rs b/forgejo-openapi/src/models/repo_collaborator_permission.rs new file mode 100644 index 0000000..6ef6aca --- /dev/null +++ b/forgejo-openapi/src/models/repo_collaborator_permission.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// RepoCollaboratorPermission : RepoCollaboratorPermission to get repository permission for a collaborator +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RepoCollaboratorPermission { + #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] + pub permission: Option, + #[serde(rename = "role_name", skip_serializing_if = "Option::is_none")] + pub role_name: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, +} + +impl RepoCollaboratorPermission { + /// RepoCollaboratorPermission to get repository permission for a collaborator + pub fn new() -> RepoCollaboratorPermission { + RepoCollaboratorPermission { + permission: None, + role_name: None, + user: None, + } + } +} + diff --git a/forgejo-openapi/src/models/repo_commit.rs b/forgejo-openapi/src/models/repo_commit.rs new file mode 100644 index 0000000..14b16c9 --- /dev/null +++ b/forgejo-openapi/src/models/repo_commit.rs @@ -0,0 +1,42 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RepoCommit { + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option>, + #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] + pub committer: Option>, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "tree", skip_serializing_if = "Option::is_none")] + pub tree: Option>, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, +} + +impl RepoCommit { + pub fn new() -> RepoCommit { + RepoCommit { + author: None, + committer: None, + message: None, + tree: None, + url: None, + verification: None, + } + } +} + diff --git a/forgejo-openapi/src/models/repo_create_release_attachment_request.rs b/forgejo-openapi/src/models/repo_create_release_attachment_request.rs new file mode 100644 index 0000000..5cfc89f --- /dev/null +++ b/forgejo-openapi/src/models/repo_create_release_attachment_request.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RepoCreateReleaseAttachmentRequest { + /// attachment to upload (this parameter is incompatible with `external_url`) + #[serde(rename = "attachment", skip_serializing_if = "Option::is_none")] + pub attachment: Option, + /// url to external asset (this parameter is incompatible with `attachment`) + #[serde(rename = "external_url", skip_serializing_if = "Option::is_none")] + pub external_url: Option, +} + +impl RepoCreateReleaseAttachmentRequest { + pub fn new() -> RepoCreateReleaseAttachmentRequest { + RepoCreateReleaseAttachmentRequest { + attachment: None, + external_url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/repo_topic_options.rs b/forgejo-openapi/src/models/repo_topic_options.rs new file mode 100644 index 0000000..1447f48 --- /dev/null +++ b/forgejo-openapi/src/models/repo_topic_options.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// RepoTopicOptions : RepoTopicOptions a collection of repo topic names +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RepoTopicOptions { + /// list of topic names + #[serde(rename = "topics", skip_serializing_if = "Option::is_none")] + pub topics: Option>, +} + +impl RepoTopicOptions { + /// RepoTopicOptions a collection of repo topic names + pub fn new() -> RepoTopicOptions { + RepoTopicOptions { + topics: None, + } + } +} + diff --git a/forgejo-openapi/src/models/repo_transfer.rs b/forgejo-openapi/src/models/repo_transfer.rs new file mode 100644 index 0000000..e390147 --- /dev/null +++ b/forgejo-openapi/src/models/repo_transfer.rs @@ -0,0 +1,35 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// RepoTransfer : RepoTransfer represents a pending repo transfer +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RepoTransfer { + #[serde(rename = "doer", skip_serializing_if = "Option::is_none")] + pub doer: Option>, + #[serde(rename = "recipient", skip_serializing_if = "Option::is_none")] + pub recipient: Option>, + #[serde(rename = "teams", skip_serializing_if = "Option::is_none")] + pub teams: Option>, +} + +impl RepoTransfer { + /// RepoTransfer represents a pending repo transfer + pub fn new() -> RepoTransfer { + RepoTransfer { + doer: None, + recipient: None, + teams: None, + } + } +} + diff --git a/forgejo-openapi/src/models/repository.rs b/forgejo-openapi/src/models/repository.rs new file mode 100644 index 0000000..683100e --- /dev/null +++ b/forgejo-openapi/src/models/repository.rs @@ -0,0 +1,230 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Repository : Repository represents a repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Repository { + #[serde(rename = "allow_fast_forward_only_merge", skip_serializing_if = "Option::is_none")] + pub allow_fast_forward_only_merge: Option, + #[serde(rename = "allow_merge_commits", skip_serializing_if = "Option::is_none")] + pub allow_merge_commits: Option, + #[serde(rename = "allow_rebase", skip_serializing_if = "Option::is_none")] + pub allow_rebase: Option, + #[serde(rename = "allow_rebase_explicit", skip_serializing_if = "Option::is_none")] + pub allow_rebase_explicit: Option, + #[serde(rename = "allow_rebase_update", skip_serializing_if = "Option::is_none")] + pub allow_rebase_update: Option, + #[serde(rename = "allow_squash_merge", skip_serializing_if = "Option::is_none")] + pub allow_squash_merge: Option, + #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] + pub archived: Option, + #[serde(rename = "archived_at", skip_serializing_if = "Option::is_none")] + pub archived_at: Option, + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + #[serde(rename = "clone_url", skip_serializing_if = "Option::is_none")] + pub clone_url: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "default_allow_maintainer_edit", skip_serializing_if = "Option::is_none")] + pub default_allow_maintainer_edit: Option, + #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] + pub default_branch: Option, + #[serde(rename = "default_delete_branch_after_merge", skip_serializing_if = "Option::is_none")] + pub default_delete_branch_after_merge: Option, + #[serde(rename = "default_merge_style", skip_serializing_if = "Option::is_none")] + pub default_merge_style: Option, + #[serde(rename = "default_update_style", skip_serializing_if = "Option::is_none")] + pub default_update_style: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "empty", skip_serializing_if = "Option::is_none")] + pub empty: Option, + #[serde(rename = "external_tracker", skip_serializing_if = "Option::is_none")] + pub external_tracker: Option>, + #[serde(rename = "external_wiki", skip_serializing_if = "Option::is_none")] + pub external_wiki: Option>, + #[serde(rename = "fork", skip_serializing_if = "Option::is_none")] + pub fork: Option, + #[serde(rename = "forks_count", skip_serializing_if = "Option::is_none")] + pub forks_count: Option, + #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] + pub full_name: Option, + #[serde(rename = "globally_editable_wiki", skip_serializing_if = "Option::is_none")] + pub globally_editable_wiki: Option, + #[serde(rename = "has_actions", skip_serializing_if = "Option::is_none")] + pub has_actions: Option, + #[serde(rename = "has_issues", skip_serializing_if = "Option::is_none")] + pub has_issues: Option, + #[serde(rename = "has_packages", skip_serializing_if = "Option::is_none")] + pub has_packages: Option, + #[serde(rename = "has_projects", skip_serializing_if = "Option::is_none")] + pub has_projects: Option, + #[serde(rename = "has_pull_requests", skip_serializing_if = "Option::is_none")] + pub has_pull_requests: Option, + #[serde(rename = "has_releases", skip_serializing_if = "Option::is_none")] + pub has_releases: Option, + #[serde(rename = "has_wiki", skip_serializing_if = "Option::is_none")] + pub has_wiki: Option, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "ignore_whitespace_conflicts", skip_serializing_if = "Option::is_none")] + pub ignore_whitespace_conflicts: Option, + #[serde(rename = "internal", skip_serializing_if = "Option::is_none")] + pub internal: Option, + #[serde(rename = "internal_tracker", skip_serializing_if = "Option::is_none")] + pub internal_tracker: Option>, + #[serde(rename = "language", skip_serializing_if = "Option::is_none")] + pub language: Option, + #[serde(rename = "languages_url", skip_serializing_if = "Option::is_none")] + pub languages_url: Option, + #[serde(rename = "link", skip_serializing_if = "Option::is_none")] + pub link: Option, + #[serde(rename = "mirror", skip_serializing_if = "Option::is_none")] + pub mirror: Option, + #[serde(rename = "mirror_interval", skip_serializing_if = "Option::is_none")] + pub mirror_interval: Option, + #[serde(rename = "mirror_updated", skip_serializing_if = "Option::is_none")] + pub mirror_updated: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// ObjectFormatName of the underlying git repository + #[serde(rename = "object_format_name", skip_serializing_if = "Option::is_none")] + pub object_format_name: Option, + #[serde(rename = "open_issues_count", skip_serializing_if = "Option::is_none")] + pub open_issues_count: Option, + #[serde(rename = "open_pr_counter", skip_serializing_if = "Option::is_none")] + pub open_pr_counter: Option, + #[serde(rename = "original_url", skip_serializing_if = "Option::is_none")] + pub original_url: Option, + #[serde(rename = "owner", skip_serializing_if = "Option::is_none")] + pub owner: Option>, + #[serde(rename = "parent", skip_serializing_if = "Option::is_none")] + pub parent: Option>, + #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")] + pub permissions: Option>, + #[serde(rename = "private", skip_serializing_if = "Option::is_none")] + pub private: Option, + #[serde(rename = "release_counter", skip_serializing_if = "Option::is_none")] + pub release_counter: Option, + #[serde(rename = "repo_transfer", skip_serializing_if = "Option::is_none")] + pub repo_transfer: Option>, + #[serde(rename = "size", skip_serializing_if = "Option::is_none")] + pub size: Option, + #[serde(rename = "ssh_url", skip_serializing_if = "Option::is_none")] + pub ssh_url: Option, + #[serde(rename = "stars_count", skip_serializing_if = "Option::is_none")] + pub stars_count: Option, + #[serde(rename = "template", skip_serializing_if = "Option::is_none")] + pub template: Option, + #[serde(rename = "topics", skip_serializing_if = "Option::is_none")] + pub topics: Option>, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "watchers_count", skip_serializing_if = "Option::is_none")] + pub watchers_count: Option, + #[serde(rename = "website", skip_serializing_if = "Option::is_none")] + pub website: Option, + #[serde(rename = "wiki_branch", skip_serializing_if = "Option::is_none")] + pub wiki_branch: Option, +} + +impl Repository { + /// Repository represents a repository + pub fn new() -> Repository { + Repository { + allow_fast_forward_only_merge: None, + allow_merge_commits: None, + allow_rebase: None, + allow_rebase_explicit: None, + allow_rebase_update: None, + allow_squash_merge: None, + archived: None, + archived_at: None, + avatar_url: None, + clone_url: None, + created_at: None, + default_allow_maintainer_edit: None, + default_branch: None, + default_delete_branch_after_merge: None, + default_merge_style: None, + default_update_style: None, + description: None, + empty: None, + external_tracker: None, + external_wiki: None, + fork: None, + forks_count: None, + full_name: None, + globally_editable_wiki: None, + has_actions: None, + has_issues: None, + has_packages: None, + has_projects: None, + has_pull_requests: None, + has_releases: None, + has_wiki: None, + html_url: None, + id: None, + ignore_whitespace_conflicts: None, + internal: None, + internal_tracker: None, + language: None, + languages_url: None, + link: None, + mirror: None, + mirror_interval: None, + mirror_updated: None, + name: None, + object_format_name: None, + open_issues_count: None, + open_pr_counter: None, + original_url: None, + owner: None, + parent: None, + permissions: None, + private: None, + release_counter: None, + repo_transfer: None, + size: None, + ssh_url: None, + stars_count: None, + template: None, + topics: None, + updated_at: None, + url: None, + watchers_count: None, + website: None, + wiki_branch: None, + } + } +} +/// ObjectFormatName of the underlying git repository +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ObjectFormatName { + #[serde(rename = "sha1")] + Sha1, + #[serde(rename = "sha256")] + Sha256, +} + +impl Default for ObjectFormatName { + fn default() -> ObjectFormatName { + Self::Sha1 + } +} + diff --git a/forgejo-openapi/src/models/repository_meta.rs b/forgejo-openapi/src/models/repository_meta.rs new file mode 100644 index 0000000..6a10294 --- /dev/null +++ b/forgejo-openapi/src/models/repository_meta.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// RepositoryMeta : RepositoryMeta basic repository information +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RepositoryMeta { + #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] + pub full_name: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "owner", skip_serializing_if = "Option::is_none")] + pub owner: Option, +} + +impl RepositoryMeta { + /// RepositoryMeta basic repository information + pub fn new() -> RepositoryMeta { + RepositoryMeta { + full_name: None, + id: None, + name: None, + owner: None, + } + } +} + diff --git a/forgejo-openapi/src/models/search_results.rs b/forgejo-openapi/src/models/search_results.rs new file mode 100644 index 0000000..6fd8a31 --- /dev/null +++ b/forgejo-openapi/src/models/search_results.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// SearchResults : SearchResults results of a successful search +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SearchResults { + #[serde(rename = "data", skip_serializing_if = "Option::is_none")] + pub data: Option>, + #[serde(rename = "ok", skip_serializing_if = "Option::is_none")] + pub ok: Option, +} + +impl SearchResults { + /// SearchResults results of a successful search + pub fn new() -> SearchResults { + SearchResults { + data: None, + ok: None, + } + } +} + diff --git a/forgejo-openapi/src/models/secret.rs b/forgejo-openapi/src/models/secret.rs new file mode 100644 index 0000000..4665d8e --- /dev/null +++ b/forgejo-openapi/src/models/secret.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Secret : Secret represents a secret +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Secret { + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + /// the secret's name + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl Secret { + /// Secret represents a secret + pub fn new() -> Secret { + Secret { + created_at: None, + name: None, + } + } +} + diff --git a/forgejo-openapi/src/models/server_version.rs b/forgejo-openapi/src/models/server_version.rs new file mode 100644 index 0000000..6f51b29 --- /dev/null +++ b/forgejo-openapi/src/models/server_version.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ServerVersion : ServerVersion wraps the version of the server +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerVersion { + #[serde(rename = "version", skip_serializing_if = "Option::is_none")] + pub version: Option, +} + +impl ServerVersion { + /// ServerVersion wraps the version of the server + pub fn new() -> ServerVersion { + ServerVersion { + version: None, + } + } +} + diff --git a/forgejo-openapi/src/models/set_user_quota_groups_options.rs b/forgejo-openapi/src/models/set_user_quota_groups_options.rs new file mode 100644 index 0000000..d2508e9 --- /dev/null +++ b/forgejo-openapi/src/models/set_user_quota_groups_options.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// SetUserQuotaGroupsOptions : SetUserQuotaGroupsOptions represents the quota groups of a user +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SetUserQuotaGroupsOptions { + /// Quota groups the user shall have + #[serde(rename = "groups")] + pub groups: Vec, +} + +impl SetUserQuotaGroupsOptions { + /// SetUserQuotaGroupsOptions represents the quota groups of a user + pub fn new(groups: Vec) -> SetUserQuotaGroupsOptions { + SetUserQuotaGroupsOptions { + groups, + } + } +} + diff --git a/forgejo-openapi/src/models/stop_watch.rs b/forgejo-openapi/src/models/stop_watch.rs new file mode 100644 index 0000000..c70f5b4 --- /dev/null +++ b/forgejo-openapi/src/models/stop_watch.rs @@ -0,0 +1,47 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// StopWatch : StopWatch represent a running stopwatch +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StopWatch { + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + #[serde(rename = "duration", skip_serializing_if = "Option::is_none")] + pub duration: Option, + #[serde(rename = "issue_index", skip_serializing_if = "Option::is_none")] + pub issue_index: Option, + #[serde(rename = "issue_title", skip_serializing_if = "Option::is_none")] + pub issue_title: Option, + #[serde(rename = "repo_name", skip_serializing_if = "Option::is_none")] + pub repo_name: Option, + #[serde(rename = "repo_owner_name", skip_serializing_if = "Option::is_none")] + pub repo_owner_name: Option, + #[serde(rename = "seconds", skip_serializing_if = "Option::is_none")] + pub seconds: Option, +} + +impl StopWatch { + /// StopWatch represent a running stopwatch + pub fn new() -> StopWatch { + StopWatch { + created: None, + duration: None, + issue_index: None, + issue_title: None, + repo_name: None, + repo_owner_name: None, + seconds: None, + } + } +} + diff --git a/forgejo-openapi/src/models/submit_pull_review_options.rs b/forgejo-openapi/src/models/submit_pull_review_options.rs new file mode 100644 index 0000000..1b47894 --- /dev/null +++ b/forgejo-openapi/src/models/submit_pull_review_options.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// SubmitPullReviewOptions : SubmitPullReviewOptions are options to submit a pending pull review +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubmitPullReviewOptions { + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + /// ReviewStateType review state type + #[serde(rename = "event", skip_serializing_if = "Option::is_none")] + pub event: Option, +} + +impl SubmitPullReviewOptions { + /// SubmitPullReviewOptions are options to submit a pending pull review + pub fn new() -> SubmitPullReviewOptions { + SubmitPullReviewOptions { + body: None, + event: None, + } + } +} + diff --git a/forgejo-openapi/src/models/sync_fork_info.rs b/forgejo-openapi/src/models/sync_fork_info.rs new file mode 100644 index 0000000..8962bb9 --- /dev/null +++ b/forgejo-openapi/src/models/sync_fork_info.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// SyncForkInfo : SyncForkInfo information about syncing a fork +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyncForkInfo { + #[serde(rename = "allowed", skip_serializing_if = "Option::is_none")] + pub allowed: Option, + #[serde(rename = "base_commit", skip_serializing_if = "Option::is_none")] + pub base_commit: Option, + #[serde(rename = "commits_behind", skip_serializing_if = "Option::is_none")] + pub commits_behind: Option, + #[serde(rename = "fork_commit", skip_serializing_if = "Option::is_none")] + pub fork_commit: Option, +} + +impl SyncForkInfo { + /// SyncForkInfo information about syncing a fork + pub fn new() -> SyncForkInfo { + SyncForkInfo { + allowed: None, + base_commit: None, + commits_behind: None, + fork_commit: None, + } + } +} + diff --git a/forgejo-openapi/src/models/tag.rs b/forgejo-openapi/src/models/tag.rs new file mode 100644 index 0000000..c7f6391 --- /dev/null +++ b/forgejo-openapi/src/models/tag.rs @@ -0,0 +1,47 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Tag : Tag represents a repository tag +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Tag { + #[serde(rename = "archive_download_count", skip_serializing_if = "Option::is_none")] + pub archive_download_count: Option>, + #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] + pub commit: Option>, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "tarball_url", skip_serializing_if = "Option::is_none")] + pub tarball_url: Option, + #[serde(rename = "zipball_url", skip_serializing_if = "Option::is_none")] + pub zipball_url: Option, +} + +impl Tag { + /// Tag represents a repository tag + pub fn new() -> Tag { + Tag { + archive_download_count: None, + commit: None, + id: None, + message: None, + name: None, + tarball_url: None, + zipball_url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/tag_archive_download_count.rs b/forgejo-openapi/src/models/tag_archive_download_count.rs new file mode 100644 index 0000000..eb9e0eb --- /dev/null +++ b/forgejo-openapi/src/models/tag_archive_download_count.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// TagArchiveDownloadCount : TagArchiveDownloadCount counts how many times a archive was downloaded +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TagArchiveDownloadCount { + #[serde(rename = "tar_gz", skip_serializing_if = "Option::is_none")] + pub tar_gz: Option, + #[serde(rename = "zip", skip_serializing_if = "Option::is_none")] + pub zip: Option, +} + +impl TagArchiveDownloadCount { + /// TagArchiveDownloadCount counts how many times a archive was downloaded + pub fn new() -> TagArchiveDownloadCount { + TagArchiveDownloadCount { + tar_gz: None, + zip: None, + } + } +} + diff --git a/forgejo-openapi/src/models/tag_protection.rs b/forgejo-openapi/src/models/tag_protection.rs new file mode 100644 index 0000000..de0bcb8 --- /dev/null +++ b/forgejo-openapi/src/models/tag_protection.rs @@ -0,0 +1,44 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// TagProtection : TagProtection represents a tag protection +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TagProtection { + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name_pattern", skip_serializing_if = "Option::is_none")] + pub name_pattern: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "whitelist_teams", skip_serializing_if = "Option::is_none")] + pub whitelist_teams: Option>, + #[serde(rename = "whitelist_usernames", skip_serializing_if = "Option::is_none")] + pub whitelist_usernames: Option>, +} + +impl TagProtection { + /// TagProtection represents a tag protection + pub fn new() -> TagProtection { + TagProtection { + created_at: None, + id: None, + name_pattern: None, + updated_at: None, + whitelist_teams: None, + whitelist_usernames: None, + } + } +} + diff --git a/forgejo-openapi/src/models/team.rs b/forgejo-openapi/src/models/team.rs new file mode 100644 index 0000000..72da90e --- /dev/null +++ b/forgejo-openapi/src/models/team.rs @@ -0,0 +1,73 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// Team : Team represents a team in an organization +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Team { + #[serde(rename = "can_create_org_repo", skip_serializing_if = "Option::is_none")] + pub can_create_org_repo: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "includes_all_repositories", skip_serializing_if = "Option::is_none")] + pub includes_all_repositories: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "organization", skip_serializing_if = "Option::is_none")] + pub organization: Option>, + #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] + pub permission: Option, + #[serde(rename = "units", skip_serializing_if = "Option::is_none")] + pub units: Option>, + #[serde(rename = "units_map", skip_serializing_if = "Option::is_none")] + pub units_map: Option>, +} + +impl Team { + /// Team represents a team in an organization + pub fn new() -> Team { + Team { + can_create_org_repo: None, + description: None, + id: None, + includes_all_repositories: None, + name: None, + organization: None, + permission: None, + units: None, + units_map: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Permission { + #[serde(rename = "none")] + None, + #[serde(rename = "read")] + Read, + #[serde(rename = "write")] + Write, + #[serde(rename = "admin")] + Admin, + #[serde(rename = "owner")] + Owner, +} + +impl Default for Permission { + fn default() -> Permission { + Self::None + } +} + diff --git a/forgejo-openapi/src/models/team_search_results.rs b/forgejo-openapi/src/models/team_search_results.rs new file mode 100644 index 0000000..66c9ee7 --- /dev/null +++ b/forgejo-openapi/src/models/team_search_results.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamSearchResults { + #[serde(rename = "data", skip_serializing_if = "Option::is_none")] + pub data: Option>, + #[serde(rename = "ok", skip_serializing_if = "Option::is_none")] + pub ok: Option, +} + +impl TeamSearchResults { + pub fn new() -> TeamSearchResults { + TeamSearchResults { + data: None, + ok: None, + } + } +} + diff --git a/forgejo-openapi/src/models/timeline_comment.rs b/forgejo-openapi/src/models/timeline_comment.rs new file mode 100644 index 0000000..149f8ab --- /dev/null +++ b/forgejo-openapi/src/models/timeline_comment.rs @@ -0,0 +1,115 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// TimelineComment : TimelineComment represents a timeline comment (comment of any type) on a commit or issue +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimelineComment { + #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] + pub assignee: Option>, + #[serde(rename = "assignee_team", skip_serializing_if = "Option::is_none")] + pub assignee_team: Option>, + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "dependent_issue", skip_serializing_if = "Option::is_none")] + pub dependent_issue: Option>, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "issue_url", skip_serializing_if = "Option::is_none")] + pub issue_url: Option, + #[serde(rename = "label", skip_serializing_if = "Option::is_none")] + pub label: Option>, + #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] + pub milestone: Option>, + #[serde(rename = "new_ref", skip_serializing_if = "Option::is_none")] + pub new_ref: Option, + #[serde(rename = "new_title", skip_serializing_if = "Option::is_none")] + pub new_title: Option, + #[serde(rename = "old_milestone", skip_serializing_if = "Option::is_none")] + pub old_milestone: Option>, + #[serde(rename = "old_project_id", skip_serializing_if = "Option::is_none")] + pub old_project_id: Option, + #[serde(rename = "old_ref", skip_serializing_if = "Option::is_none")] + pub old_ref: Option, + #[serde(rename = "old_title", skip_serializing_if = "Option::is_none")] + pub old_title: Option, + #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")] + pub project_id: Option, + #[serde(rename = "pull_request_url", skip_serializing_if = "Option::is_none")] + pub pull_request_url: Option, + #[serde(rename = "ref_action", skip_serializing_if = "Option::is_none")] + pub ref_action: Option, + #[serde(rename = "ref_comment", skip_serializing_if = "Option::is_none")] + pub ref_comment: Option>, + /// commit SHA where issue/PR was referenced + #[serde(rename = "ref_commit_sha", skip_serializing_if = "Option::is_none")] + pub ref_commit_sha: Option, + #[serde(rename = "ref_issue", skip_serializing_if = "Option::is_none")] + pub ref_issue: Option>, + /// whether the assignees were removed or added + #[serde(rename = "removed_assignee", skip_serializing_if = "Option::is_none")] + pub removed_assignee: Option, + #[serde(rename = "resolve_doer", skip_serializing_if = "Option::is_none")] + pub resolve_doer: Option>, + #[serde(rename = "review_id", skip_serializing_if = "Option::is_none")] + pub review_id: Option, + #[serde(rename = "tracked_time", skip_serializing_if = "Option::is_none")] + pub tracked_time: Option>, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, +} + +impl TimelineComment { + /// TimelineComment represents a timeline comment (comment of any type) on a commit or issue + pub fn new() -> TimelineComment { + TimelineComment { + assignee: None, + assignee_team: None, + body: None, + created_at: None, + dependent_issue: None, + html_url: None, + id: None, + issue_url: None, + label: None, + milestone: None, + new_ref: None, + new_title: None, + old_milestone: None, + old_project_id: None, + old_ref: None, + old_title: None, + project_id: None, + pull_request_url: None, + ref_action: None, + ref_comment: None, + ref_commit_sha: None, + ref_issue: None, + removed_assignee: None, + resolve_doer: None, + review_id: None, + tracked_time: None, + r#type: None, + updated_at: None, + user: None, + } + } +} + diff --git a/forgejo-openapi/src/models/topic_name.rs b/forgejo-openapi/src/models/topic_name.rs new file mode 100644 index 0000000..86d0afd --- /dev/null +++ b/forgejo-openapi/src/models/topic_name.rs @@ -0,0 +1,29 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// TopicName : TopicName a list of repo topic names +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TopicName { + #[serde(rename = "topics", skip_serializing_if = "Option::is_none")] + pub topics: Option>, +} + +impl TopicName { + /// TopicName a list of repo topic names + pub fn new() -> TopicName { + TopicName { + topics: None, + } + } +} + diff --git a/forgejo-openapi/src/models/topic_response.rs b/forgejo-openapi/src/models/topic_response.rs new file mode 100644 index 0000000..fdee456 --- /dev/null +++ b/forgejo-openapi/src/models/topic_response.rs @@ -0,0 +1,41 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// TopicResponse : TopicResponse for returning topics +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TopicResponse { + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "repo_count", skip_serializing_if = "Option::is_none")] + pub repo_count: Option, + #[serde(rename = "topic_name", skip_serializing_if = "Option::is_none")] + pub topic_name: Option, + #[serde(rename = "updated", skip_serializing_if = "Option::is_none")] + pub updated: Option, +} + +impl TopicResponse { + /// TopicResponse for returning topics + pub fn new() -> TopicResponse { + TopicResponse { + created: None, + id: None, + repo_count: None, + topic_name: None, + updated: None, + } + } +} + diff --git a/forgejo-openapi/src/models/topic_search_results.rs b/forgejo-openapi/src/models/topic_search_results.rs new file mode 100644 index 0000000..03512f3 --- /dev/null +++ b/forgejo-openapi/src/models/topic_search_results.rs @@ -0,0 +1,27 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TopicSearchResults { + #[serde(rename = "topics", skip_serializing_if = "Option::is_none")] + pub topics: Option>, +} + +impl TopicSearchResults { + pub fn new() -> TopicSearchResults { + TopicSearchResults { + topics: None, + } + } +} + diff --git a/forgejo-openapi/src/models/tracked_time.rs b/forgejo-openapi/src/models/tracked_time.rs new file mode 100644 index 0000000..2801077 --- /dev/null +++ b/forgejo-openapi/src/models/tracked_time.rs @@ -0,0 +1,50 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// TrackedTime : TrackedTime worked time for an issue / pr +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TrackedTime { + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "issue", skip_serializing_if = "Option::is_none")] + pub issue: Option>, + /// deprecated (only for backwards compatibility) + #[serde(rename = "issue_id", skip_serializing_if = "Option::is_none")] + pub issue_id: Option, + /// Time in seconds + #[serde(rename = "time", skip_serializing_if = "Option::is_none")] + pub time: Option, + /// deprecated (only for backwards compatibility) + #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")] + pub user_id: Option, + #[serde(rename = "user_name", skip_serializing_if = "Option::is_none")] + pub user_name: Option, +} + +impl TrackedTime { + /// TrackedTime worked time for an issue / pr + pub fn new() -> TrackedTime { + TrackedTime { + created: None, + id: None, + issue: None, + issue_id: None, + time: None, + user_id: None, + user_name: None, + } + } +} + diff --git a/forgejo-openapi/src/models/transfer_repo_option.rs b/forgejo-openapi/src/models/transfer_repo_option.rs new file mode 100644 index 0000000..5b776ee --- /dev/null +++ b/forgejo-openapi/src/models/transfer_repo_option.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// TransferRepoOption : TransferRepoOption options when transfer a repository's ownership +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TransferRepoOption { + #[serde(rename = "new_owner")] + pub new_owner: String, + /// ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + #[serde(rename = "team_ids", skip_serializing_if = "Option::is_none")] + pub team_ids: Option>, +} + +impl TransferRepoOption { + /// TransferRepoOption options when transfer a repository's ownership + pub fn new(new_owner: String) -> TransferRepoOption { + TransferRepoOption { + new_owner, + team_ids: None, + } + } +} + diff --git a/forgejo-openapi/src/models/update_branch_repo_option.rs b/forgejo-openapi/src/models/update_branch_repo_option.rs new file mode 100644 index 0000000..28db67c --- /dev/null +++ b/forgejo-openapi/src/models/update_branch_repo_option.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// UpdateBranchRepoOption : UpdateBranchRepoOption options when updating a branch in a repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateBranchRepoOption { + /// New branch name + #[serde(rename = "name")] + pub name: String, +} + +impl UpdateBranchRepoOption { + /// UpdateBranchRepoOption options when updating a branch in a repository + pub fn new(name: String) -> UpdateBranchRepoOption { + UpdateBranchRepoOption { + name, + } + } +} + diff --git a/forgejo-openapi/src/models/update_file_options.rs b/forgejo-openapi/src/models/update_file_options.rs new file mode 100644 index 0000000..60de172 --- /dev/null +++ b/forgejo-openapi/src/models/update_file_options.rs @@ -0,0 +1,63 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// UpdateFileOptions : UpdateFileOptions options for updating files 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) +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateFileOptions { + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option>, + /// branch (optional) to base this file from. if not given, the default branch is used + #[serde(rename = "branch", skip_serializing_if = "Option::is_none")] + pub branch: Option, + #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] + pub committer: Option>, + /// content must be base64 encoded + #[serde(rename = "content")] + pub content: String, + #[serde(rename = "dates", skip_serializing_if = "Option::is_none")] + pub dates: Option>, + /// from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL + #[serde(rename = "from_path", skip_serializing_if = "Option::is_none")] + pub from_path: Option, + /// message (optional) for the commit of this file. if not supplied, a default message will be used + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + /// new_branch (optional) will make a new branch from `branch` before creating the file + #[serde(rename = "new_branch", skip_serializing_if = "Option::is_none")] + pub new_branch: Option, + /// sha is the SHA for the file that already exists + #[serde(rename = "sha")] + pub sha: String, + /// Add a Signed-off-by trailer by the committer at the end of the commit log message. + #[serde(rename = "signoff", skip_serializing_if = "Option::is_none")] + pub signoff: Option, +} + +impl UpdateFileOptions { + /// UpdateFileOptions options for updating files 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) + pub fn new(content: String, sha: String) -> UpdateFileOptions { + UpdateFileOptions { + author: None, + branch: None, + committer: None, + content, + dates: None, + from_path: None, + message: None, + new_branch: None, + sha, + signoff: None, + } + } +} + diff --git a/forgejo-openapi/src/models/update_repo_avatar_option.rs b/forgejo-openapi/src/models/update_repo_avatar_option.rs new file mode 100644 index 0000000..a99bb73 --- /dev/null +++ b/forgejo-openapi/src/models/update_repo_avatar_option.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// UpdateRepoAvatarOption : UpdateRepoAvatarUserOption options when updating the repo avatar +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateRepoAvatarOption { + /// image must be base64 encoded + #[serde(rename = "image", skip_serializing_if = "Option::is_none")] + pub image: Option, +} + +impl UpdateRepoAvatarOption { + /// UpdateRepoAvatarUserOption options when updating the repo avatar + pub fn new() -> UpdateRepoAvatarOption { + UpdateRepoAvatarOption { + image: None, + } + } +} + diff --git a/forgejo-openapi/src/models/update_user_avatar_option.rs b/forgejo-openapi/src/models/update_user_avatar_option.rs new file mode 100644 index 0000000..a34293b --- /dev/null +++ b/forgejo-openapi/src/models/update_user_avatar_option.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// UpdateUserAvatarOption : UpdateUserAvatarUserOption options when updating the user avatar +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateUserAvatarOption { + /// image must be base64 encoded + #[serde(rename = "image", skip_serializing_if = "Option::is_none")] + pub image: Option, +} + +impl UpdateUserAvatarOption { + /// UpdateUserAvatarUserOption options when updating the user avatar + pub fn new() -> UpdateUserAvatarOption { + UpdateUserAvatarOption { + image: None, + } + } +} + diff --git a/forgejo-openapi/src/models/update_variable_option.rs b/forgejo-openapi/src/models/update_variable_option.rs new file mode 100644 index 0000000..e74a5b0 --- /dev/null +++ b/forgejo-openapi/src/models/update_variable_option.rs @@ -0,0 +1,34 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// UpdateVariableOption : UpdateVariableOption the option when updating variable +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateVariableOption { + /// New name for the variable. If the field is empty, the variable name won't be updated. + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Value of the variable to update + #[serde(rename = "value")] + pub value: String, +} + +impl UpdateVariableOption { + /// UpdateVariableOption the option when updating variable + pub fn new(value: String) -> UpdateVariableOption { + UpdateVariableOption { + name: None, + value, + } + } +} + diff --git a/forgejo-openapi/src/models/user.rs b/forgejo-openapi/src/models/user.rs new file mode 100644 index 0000000..811281f --- /dev/null +++ b/forgejo-openapi/src/models/user.rs @@ -0,0 +1,113 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// User : User represents a user +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct User { + /// Is user active + #[serde(rename = "active", skip_serializing_if = "Option::is_none")] + pub active: Option, + /// URL to the user's avatar + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + #[serde(rename = "created", skip_serializing_if = "Option::is_none")] + pub created: Option, + /// the user's description + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + /// user counts + #[serde(rename = "followers_count", skip_serializing_if = "Option::is_none")] + pub followers_count: Option, + #[serde(rename = "following_count", skip_serializing_if = "Option::is_none")] + pub following_count: Option, + /// the user's full name + #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] + pub full_name: Option, + /// URL to the user's profile page + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + /// the user's id + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + /// Is the user an administrator + #[serde(rename = "is_admin", skip_serializing_if = "Option::is_none")] + pub is_admin: Option, + /// User locale + #[serde(rename = "language", skip_serializing_if = "Option::is_none")] + pub language: Option, + #[serde(rename = "last_login", skip_serializing_if = "Option::is_none")] + pub last_login: Option, + /// the user's location + #[serde(rename = "location", skip_serializing_if = "Option::is_none")] + pub location: Option, + /// the user's username + #[serde(rename = "login", skip_serializing_if = "Option::is_none")] + pub login: Option, + /// the user's authentication sign-in name. + #[serde(rename = "login_name", skip_serializing_if = "Option::is_none")] + pub login_name: Option, + /// Is user login prohibited + #[serde(rename = "prohibit_login", skip_serializing_if = "Option::is_none")] + pub prohibit_login: Option, + /// the user's pronouns + #[serde(rename = "pronouns", skip_serializing_if = "Option::is_none")] + pub pronouns: Option, + /// Is user restricted + #[serde(rename = "restricted", skip_serializing_if = "Option::is_none")] + pub restricted: Option, + /// The ID of the user's Authentication Source + #[serde(rename = "source_id", skip_serializing_if = "Option::is_none")] + pub source_id: Option, + #[serde(rename = "starred_repos_count", skip_serializing_if = "Option::is_none")] + pub starred_repos_count: Option, + /// User visibility level option: public, limited, private + #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] + pub visibility: Option, + /// the user's website + #[serde(rename = "website", skip_serializing_if = "Option::is_none")] + pub website: Option, +} + +impl User { + /// User represents a user + pub fn new() -> User { + User { + active: None, + avatar_url: None, + created: None, + description: None, + email: None, + followers_count: None, + following_count: None, + full_name: None, + html_url: None, + id: None, + is_admin: None, + language: None, + last_login: None, + location: None, + login: None, + login_name: None, + prohibit_login: None, + pronouns: None, + restricted: None, + source_id: None, + starred_repos_count: None, + visibility: None, + website: None, + } + } +} + diff --git a/forgejo-openapi/src/models/user_heatmap_data.rs b/forgejo-openapi/src/models/user_heatmap_data.rs new file mode 100644 index 0000000..dc3e0d1 --- /dev/null +++ b/forgejo-openapi/src/models/user_heatmap_data.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// UserHeatmapData : UserHeatmapData represents the data needed to create a heatmap +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserHeatmapData { + #[serde(rename = "contributions", skip_serializing_if = "Option::is_none")] + pub contributions: Option, + /// TimeStamp defines a timestamp + #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] + pub timestamp: Option, +} + +impl UserHeatmapData { + /// UserHeatmapData represents the data needed to create a heatmap + pub fn new() -> UserHeatmapData { + UserHeatmapData { + contributions: None, + timestamp: None, + } + } +} + diff --git a/forgejo-openapi/src/models/user_search_results.rs b/forgejo-openapi/src/models/user_search_results.rs new file mode 100644 index 0000000..4549e0c --- /dev/null +++ b/forgejo-openapi/src/models/user_search_results.rs @@ -0,0 +1,30 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserSearchResults { + #[serde(rename = "data", skip_serializing_if = "Option::is_none")] + pub data: Option>, + #[serde(rename = "ok", skip_serializing_if = "Option::is_none")] + pub ok: Option, +} + +impl UserSearchResults { + pub fn new() -> UserSearchResults { + UserSearchResults { + data: None, + ok: None, + } + } +} + diff --git a/forgejo-openapi/src/models/user_settings.rs b/forgejo-openapi/src/models/user_settings.rs new file mode 100644 index 0000000..fe6a707 --- /dev/null +++ b/forgejo-openapi/src/models/user_settings.rs @@ -0,0 +1,63 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// UserSettings : UserSettings represents user settings +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserSettings { + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "diff_view_style", skip_serializing_if = "Option::is_none")] + pub diff_view_style: Option, + #[serde(rename = "enable_repo_unit_hints", skip_serializing_if = "Option::is_none")] + pub enable_repo_unit_hints: Option, + #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] + pub full_name: Option, + #[serde(rename = "hide_activity", skip_serializing_if = "Option::is_none")] + pub hide_activity: Option, + /// Privacy + #[serde(rename = "hide_email", skip_serializing_if = "Option::is_none")] + pub hide_email: Option, + #[serde(rename = "hide_pronouns", skip_serializing_if = "Option::is_none")] + pub hide_pronouns: Option, + #[serde(rename = "language", skip_serializing_if = "Option::is_none")] + pub language: Option, + #[serde(rename = "location", skip_serializing_if = "Option::is_none")] + pub location: Option, + #[serde(rename = "pronouns", skip_serializing_if = "Option::is_none")] + pub pronouns: Option, + #[serde(rename = "theme", skip_serializing_if = "Option::is_none")] + pub theme: Option, + #[serde(rename = "website", skip_serializing_if = "Option::is_none")] + pub website: Option, +} + +impl UserSettings { + /// UserSettings represents user settings + pub fn new() -> UserSettings { + UserSettings { + description: None, + diff_view_style: None, + enable_repo_unit_hints: None, + full_name: None, + hide_activity: None, + hide_email: None, + hide_pronouns: None, + language: None, + location: None, + pronouns: None, + theme: None, + website: None, + } + } +} + diff --git a/forgejo-openapi/src/models/user_settings_options.rs b/forgejo-openapi/src/models/user_settings_options.rs new file mode 100644 index 0000000..386fdb6 --- /dev/null +++ b/forgejo-openapi/src/models/user_settings_options.rs @@ -0,0 +1,63 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// UserSettingsOptions : UserSettingsOptions represents options to change user settings +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserSettingsOptions { + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "diff_view_style", skip_serializing_if = "Option::is_none")] + pub diff_view_style: Option, + #[serde(rename = "enable_repo_unit_hints", skip_serializing_if = "Option::is_none")] + pub enable_repo_unit_hints: Option, + #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] + pub full_name: Option, + #[serde(rename = "hide_activity", skip_serializing_if = "Option::is_none")] + pub hide_activity: Option, + /// Privacy + #[serde(rename = "hide_email", skip_serializing_if = "Option::is_none")] + pub hide_email: Option, + #[serde(rename = "hide_pronouns", skip_serializing_if = "Option::is_none")] + pub hide_pronouns: Option, + #[serde(rename = "language", skip_serializing_if = "Option::is_none")] + pub language: Option, + #[serde(rename = "location", skip_serializing_if = "Option::is_none")] + pub location: Option, + #[serde(rename = "pronouns", skip_serializing_if = "Option::is_none")] + pub pronouns: Option, + #[serde(rename = "theme", skip_serializing_if = "Option::is_none")] + pub theme: Option, + #[serde(rename = "website", skip_serializing_if = "Option::is_none")] + pub website: Option, +} + +impl UserSettingsOptions { + /// UserSettingsOptions represents options to change user settings + pub fn new() -> UserSettingsOptions { + UserSettingsOptions { + description: None, + diff_view_style: None, + enable_repo_unit_hints: None, + full_name: None, + hide_activity: None, + hide_email: None, + hide_pronouns: None, + language: None, + location: None, + pronouns: None, + theme: None, + website: None, + } + } +} + diff --git a/forgejo-openapi/src/models/verify_gpg_key_option.rs b/forgejo-openapi/src/models/verify_gpg_key_option.rs new file mode 100644 index 0000000..d7043f0 --- /dev/null +++ b/forgejo-openapi/src/models/verify_gpg_key_option.rs @@ -0,0 +1,33 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// VerifyGpgKeyOption : VerifyGPGKeyOption options verifies user GPG key +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct VerifyGpgKeyOption { + #[serde(rename = "armored_signature", skip_serializing_if = "Option::is_none")] + pub armored_signature: Option, + /// An Signature for a GPG key token + #[serde(rename = "key_id")] + pub key_id: String, +} + +impl VerifyGpgKeyOption { + /// VerifyGPGKeyOption options verifies user GPG key + pub fn new(key_id: String) -> VerifyGpgKeyOption { + VerifyGpgKeyOption { + armored_signature: None, + key_id, + } + } +} + diff --git a/forgejo-openapi/src/models/watch_info.rs b/forgejo-openapi/src/models/watch_info.rs new file mode 100644 index 0000000..3a94894 --- /dev/null +++ b/forgejo-openapi/src/models/watch_info.rs @@ -0,0 +1,44 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// WatchInfo : WatchInfo represents an API watch status of one repository +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WatchInfo { + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "ignored", skip_serializing_if = "Option::is_none")] + pub ignored: Option, + #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] + pub reason: Option, + #[serde(rename = "repository_url", skip_serializing_if = "Option::is_none")] + pub repository_url: Option, + #[serde(rename = "subscribed", skip_serializing_if = "Option::is_none")] + pub subscribed: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl WatchInfo { + /// WatchInfo represents an API watch status of one repository + pub fn new() -> WatchInfo { + WatchInfo { + created_at: None, + ignored: None, + reason: None, + repository_url: None, + subscribed: None, + url: None, + } + } +} + diff --git a/forgejo-openapi/src/models/wiki_commit.rs b/forgejo-openapi/src/models/wiki_commit.rs new file mode 100644 index 0000000..bc17326 --- /dev/null +++ b/forgejo-openapi/src/models/wiki_commit.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// WikiCommit : WikiCommit page commit/revision +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WikiCommit { + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option>, + #[serde(rename = "commiter", skip_serializing_if = "Option::is_none")] + pub commiter: Option>, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] + pub sha: Option, +} + +impl WikiCommit { + /// WikiCommit page commit/revision + pub fn new() -> WikiCommit { + WikiCommit { + author: None, + commiter: None, + message: None, + sha: None, + } + } +} + diff --git a/forgejo-openapi/src/models/wiki_commit_list.rs b/forgejo-openapi/src/models/wiki_commit_list.rs new file mode 100644 index 0000000..ad58d7d --- /dev/null +++ b/forgejo-openapi/src/models/wiki_commit_list.rs @@ -0,0 +1,32 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// WikiCommitList : WikiCommitList commit/revision list +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WikiCommitList { + #[serde(rename = "commits", skip_serializing_if = "Option::is_none")] + pub commits: Option>, + #[serde(rename = "count", skip_serializing_if = "Option::is_none")] + pub count: Option, +} + +impl WikiCommitList { + /// WikiCommitList commit/revision list + pub fn new() -> WikiCommitList { + WikiCommitList { + commits: None, + count: None, + } + } +} + diff --git a/forgejo-openapi/src/models/wiki_page.rs b/forgejo-openapi/src/models/wiki_page.rs new file mode 100644 index 0000000..1cfdcc1 --- /dev/null +++ b/forgejo-openapi/src/models/wiki_page.rs @@ -0,0 +1,51 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// WikiPage : WikiPage a wiki page +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WikiPage { + #[serde(rename = "commit_count", skip_serializing_if = "Option::is_none")] + pub commit_count: Option, + /// Page content, base64 encoded + #[serde(rename = "content_base64", skip_serializing_if = "Option::is_none")] + pub content_base64: Option, + #[serde(rename = "footer", skip_serializing_if = "Option::is_none")] + pub footer: Option, + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "last_commit", skip_serializing_if = "Option::is_none")] + pub last_commit: Option>, + #[serde(rename = "sidebar", skip_serializing_if = "Option::is_none")] + pub sidebar: Option, + #[serde(rename = "sub_url", skip_serializing_if = "Option::is_none")] + pub sub_url: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, +} + +impl WikiPage { + /// WikiPage a wiki page + pub fn new() -> WikiPage { + WikiPage { + commit_count: None, + content_base64: None, + footer: None, + html_url: None, + last_commit: None, + sidebar: None, + sub_url: None, + title: None, + } + } +} + diff --git a/forgejo-openapi/src/models/wiki_page_meta_data.rs b/forgejo-openapi/src/models/wiki_page_meta_data.rs new file mode 100644 index 0000000..799e078 --- /dev/null +++ b/forgejo-openapi/src/models/wiki_page_meta_data.rs @@ -0,0 +1,38 @@ +/* + * Forgejo API + * + * This documentation describes the Forgejo API. + * + * The version of the OpenAPI document: 14.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// WikiPageMetaData : WikiPageMetaData wiki page meta information +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct WikiPageMetaData { + #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] + pub html_url: Option, + #[serde(rename = "last_commit", skip_serializing_if = "Option::is_none")] + pub last_commit: Option>, + #[serde(rename = "sub_url", skip_serializing_if = "Option::is_none")] + pub sub_url: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, +} + +impl WikiPageMetaData { + /// WikiPageMetaData wiki page meta information + pub fn new() -> WikiPageMetaData { + WikiPageMetaData { + html_url: None, + last_commit: None, + sub_url: None, + title: None, + } + } +} + diff --git a/forgejo-openapi/swagger.v1.json b/forgejo-openapi/swagger.v1.json new file mode 100644 index 0000000..e62790c --- /dev/null +++ b/forgejo-openapi/swagger.v1.json @@ -0,0 +1,28347 @@ +{ + "consumes": ["application/json", "text/plain"], + "produces": ["application/json", "text/html"], + "schemes": ["https", "http"], + "swagger": "2.0", + "info": { + "description": "This documentation describes the Forgejo API.", + "title": "Forgejo API", + "license": { + "name": "This file is distributed under the MIT license for the purpose of interoperability", + "url": "http://opensource.org/licenses/MIT" + }, + "version": "14.0.0" + }, + "basePath": "/api/v1", + "paths": { + "/activitypub/actor": { + "get": { + "produces": ["application/json"], + "tags": ["activitypub"], + "summary": "Returns the instance's Actor", + "operationId": "activitypubInstanceActor", + "responses": { + "200": { + "$ref": "#/responses/ActivityPub" + } + } + } + }, + "/activitypub/actor/inbox": { + "post": { + "produces": ["application/json"], + "tags": ["activitypub"], + "summary": "Send to the inbox", + "operationId": "activitypubInstanceActorInbox", + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/activitypub/actor/outbox": { + "post": { + "produces": ["application/ld+json"], + "tags": ["activitypub"], + "summary": "Display the outbox (always empty)", + "operationId": "activitypubInstanceActorOutbox", + "responses": { + "200": { + "$ref": "#/responses/Outbox" + } + } + } + }, + "/activitypub/repository-id/{repository-id}": { + "get": { + "produces": ["application/json"], + "tags": ["activitypub"], + "summary": "Returns the Repository actor for a repo", + "operationId": "activitypubRepository", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "repository ID of the repo", + "name": "repository-id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityPub" + } + } + } + }, + "/activitypub/repository-id/{repository-id}/inbox": { + "post": { + "produces": ["application/json"], + "tags": ["activitypub"], + "summary": "Send to the inbox", + "operationId": "activitypubRepositoryInbox", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "repository ID of the repo", + "name": "repository-id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/ForgeLike" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/activitypub/repository-id/{repository-id}/outbox": { + "post": { + "produces": ["application/ld+json"], + "tags": ["activitypub"], + "summary": "Display the outbox", + "operationId": "activitypubRepositoryOutbox", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "repository ID of the repo", + "name": "repository-id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Outbox" + } + } + } + }, + "/activitypub/user-id/{user-id}": { + "get": { + "produces": ["application/json"], + "tags": ["activitypub"], + "summary": "Returns the Person actor for a user", + "operationId": "activitypubPerson", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "user ID of the user", + "name": "user-id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityPub" + } + } + } + }, + "/activitypub/user-id/{user-id}/activities/{activity-id}": { + "get": { + "produces": ["application/json"], + "tags": ["activitypub"], + "summary": "Get a specific activity object of the user", + "operationId": "activitypubPersonActivityNote", + "parameters": [ + { + "type": "integer", + "description": "user ID of the user", + "name": "user-id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "activity ID of the sought activity", + "name": "activity-id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityPub" + } + } + } + }, + "/activitypub/user-id/{user-id}/activities/{activity-id}/activity": { + "get": { + "produces": ["application/json"], + "tags": ["activitypub"], + "summary": "Get a specific activity of the user", + "operationId": "activitypubPersonActivity", + "parameters": [ + { + "type": "integer", + "description": "user ID of the user", + "name": "user-id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "activity ID of the sought activity", + "name": "activity-id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityPub" + } + } + } + }, + "/activitypub/user-id/{user-id}/inbox": { + "post": { + "produces": ["application/json"], + "tags": ["activitypub"], + "summary": "Send to the inbox", + "operationId": "activitypubPersonInbox", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "user ID of the user", + "name": "user-id", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "$ref": "#/responses/empty" + } + } + } + }, + "/activitypub/user-id/{user-id}/outbox": { + "get": { + "produces": ["application/json"], + "tags": ["activitypub"], + "summary": "List the user's recorded activity", + "operationId": "activitypubPersonFeed", + "parameters": [ + { + "type": "integer", + "description": "user ID of the user", + "name": "user-id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Outbox" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/cron": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "List cron tasks", + "operationId": "adminCronList", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CronList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/cron/{task}": { + "post": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Run cron task", + "operationId": "adminCronRun", + "parameters": [ + { + "type": "string", + "description": "task to run", + "name": "task", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/emails": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "List all users' email addresses", + "operationId": "adminGetAllEmails", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/EmailList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/emails/search": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Search users' email addresses", + "operationId": "adminSearchEmails", + "parameters": [ + { + "type": "string", + "description": "keyword", + "name": "q", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/EmailList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/hooks": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "List global (system) webhooks", + "operationId": "adminListHooks", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Create a hook", + "operationId": "adminCreateHook", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + } + } + } + }, + "/admin/hooks/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Get a hook", + "operationId": "adminGetHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Delete a hook", + "operationId": "adminDeleteHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Update a hook", + "operationId": "adminEditHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to update", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + } + }, + "/admin/orgs": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "List all organizations", + "operationId": "adminGetAllOrgs", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/quota/groups": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "List the available quota groups", + "operationId": "adminListQuotaGroups", + "responses": { + "200": { + "$ref": "#/responses/QuotaGroupList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Create a new quota group", + "operationId": "adminCreateQuotaGroup", + "parameters": [ + { + "description": "Definition of the quota group", + "name": "group", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateQuotaGroupOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/QuotaGroup" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/quota/groups/{quotagroup}": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Get information about the quota group", + "operationId": "adminGetQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to query", + "name": "quotagroup", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaGroup" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Delete a quota group", + "operationId": "adminDeleteQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to delete", + "name": "quotagroup", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/quota/groups/{quotagroup}/rules/{quotarule}": { + "put": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Adds a rule to a quota group", + "operationId": "adminAddRuleToQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to add a rule to", + "name": "quotagroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the name of the quota rule to add to the group", + "name": "quotarule", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Removes a rule from a quota group", + "operationId": "adminRemoveRuleFromQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to remove a rule from", + "name": "quotagroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the name of the quota rule to remove from the group", + "name": "quotarule", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/quota/groups/{quotagroup}/users": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "List users in a quota group", + "operationId": "adminListUsersInQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to list members of", + "name": "quotagroup", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/quota/groups/{quotagroup}/users/{username}": { + "put": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Add a user to a quota group", + "operationId": "adminAddUserToQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to add the user to", + "name": "quotagroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to add to the quota group", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Remove a user from a quota group", + "operationId": "adminRemoveUserFromQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to remove a user from", + "name": "quotagroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to remove from the quota group", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/quota/rules": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "List the available quota rules", + "operationId": "adminListQuotaRules", + "responses": { + "200": { + "$ref": "#/responses/QuotaRuleInfoList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Create a new quota rule", + "operationId": "adminCreateQuotaRule", + "parameters": [ + { + "description": "Definition of the quota rule", + "name": "rule", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateQuotaRuleOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/QuotaRuleInfo" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/quota/rules/{quotarule}": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Get information about a quota rule", + "operationId": "adminGetQuotaRule", + "parameters": [ + { + "type": "string", + "description": "quota rule to query", + "name": "quotarule", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaRuleInfo" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Deletes a quota rule", + "operationId": "adminDeleteQuotaRule", + "parameters": [ + { + "type": "string", + "description": "quota rule to delete", + "name": "quotarule", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Change an existing quota rule", + "operationId": "adminEditQuotaRule", + "parameters": [ + { + "type": "string", + "description": "Quota rule to change", + "name": "quotarule", + "in": "path", + "required": true + }, + { + "name": "rule", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/EditQuotaRuleOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaRuleInfo" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/runners/jobs": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Search action jobs according filter conditions", + "operationId": "adminSearchRunJobs", + "parameters": [ + { + "type": "string", + "description": "a comma separated list of run job labels to search for", + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RunJobList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/runners/registration-token": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Get an global actions runner registration token", + "operationId": "adminGetRunnerRegistrationToken", + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, + "/admin/unadopted": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "List unadopted repositories", + "operationId": "adminUnadoptedList", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "pattern of repositories to search for", + "name": "pattern", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/StringSlice" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/unadopted/{owner}/{repo}": { + "post": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Adopt unadopted files as a repository", + "operationId": "adminAdoptRepository", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Delete unadopted files", + "operationId": "adminDeleteUnadoptedRepository", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/users": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Search users according filter conditions", + "operationId": "adminSearchUsers", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "ID of the user's login source to search for", + "name": "source_id", + "in": "query" + }, + { + "type": "string", + "description": "user's login name to search for", + "name": "login_name", + "in": "query" + }, + { + "enum": [ + "oldest", + "newest", + "alphabetically", + "reversealphabetically", + "recentupdate", + "leastupdate" + ], + "type": "string", + "description": "sort order of results", + "name": "sort", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Create a user account", + "operationId": "adminCreateUser", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateUserOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/User" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}": { + "delete": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Delete user account", + "operationId": "adminDeleteUser", + "parameters": [ + { + "type": "string", + "description": "username of user to delete", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "purge the user from the system completely", + "name": "purge", + "in": "query" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Edit an existing user", + "operationId": "adminEditUser", + "parameters": [ + { + "type": "string", + "description": "username of user to edit", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditUserOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/User" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/emails": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "List all email addresses for a user", + "operationId": "adminListUserEmails", + "parameters": [ + { + "type": "string", + "description": "username of user to get email addresses of", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/EmailList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Delete email addresses from a user's account", + "operationId": "adminDeleteUserEmails", + "parameters": [ + { + "type": "string", + "description": "username of user to delete email addresses from", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/DeleteEmailOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/keys": { + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Add an SSH public key to user's account", + "operationId": "adminCreatePublicKey", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "key", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PublicKey" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/keys/{id}": { + "delete": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Remove a public key from user's account", + "operationId": "adminDeleteUserPublicKey", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/users/{username}/orgs": { + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Create an organization", + "operationId": "adminCreateOrg", + "parameters": [ + { + "type": "string", + "description": "username of the user that will own the created organization", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "organization", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrgOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Organization" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/quota": { + "get": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Get the user's quota info", + "operationId": "adminGetUserQuota", + "parameters": [ + { + "type": "string", + "description": "username of user to query", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaInfo" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/quota/groups": { + "post": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Set the user's quota groups to a given list.", + "operationId": "adminSetUserQuotaGroups", + "parameters": [ + { + "type": "string", + "description": "username of the user to modify the quota groups from", + "name": "username", + "in": "path", + "required": true + }, + { + "description": "list of groups that the user should be a member of", + "name": "groups", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SetUserQuotaGroupsOptions" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/rename": { + "post": { + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Rename a user", + "operationId": "adminRenameUser", + "parameters": [ + { + "type": "string", + "description": "existing username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RenameUserOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/repos": { + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["admin"], + "summary": "Create a repository on behalf of a user", + "operationId": "adminCreateRepo", + "parameters": [ + { + "type": "string", + "description": "username of the user. This user will own the created repository", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "repository", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/gitignore/templates": { + "get": { + "produces": ["application/json"], + "tags": ["miscellaneous"], + "summary": "Returns a list of all gitignore templates", + "operationId": "listGitignoresTemplates", + "responses": { + "200": { + "$ref": "#/responses/GitignoreTemplateList" + } + } + } + }, + "/gitignore/templates/{name}": { + "get": { + "produces": ["application/json"], + "tags": ["miscellaneous"], + "summary": "Returns information about a gitignore template", + "operationId": "getGitignoreTemplateInfo", + "parameters": [ + { + "type": "string", + "description": "name of the template", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitignoreTemplateInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/label/templates": { + "get": { + "produces": ["application/json"], + "tags": ["miscellaneous"], + "summary": "Returns a list of all label templates", + "operationId": "listLabelTemplates", + "responses": { + "200": { + "$ref": "#/responses/LabelTemplateList" + } + } + } + }, + "/label/templates/{name}": { + "get": { + "produces": ["application/json"], + "tags": ["miscellaneous"], + "summary": "Returns all labels in a template", + "operationId": "getLabelTemplateInfo", + "parameters": [ + { + "type": "string", + "description": "name of the template", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelTemplateInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/licenses": { + "get": { + "produces": ["application/json"], + "tags": ["miscellaneous"], + "summary": "Returns a list of all license templates", + "operationId": "listLicenseTemplates", + "responses": { + "200": { + "$ref": "#/responses/LicenseTemplateList" + } + } + } + }, + "/licenses/{name}": { + "get": { + "produces": ["application/json"], + "tags": ["miscellaneous"], + "summary": "Returns information about a license template", + "operationId": "getLicenseTemplateInfo", + "parameters": [ + { + "type": "string", + "description": "name of the license", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LicenseTemplateInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/markdown": { + "post": { + "consumes": ["application/json"], + "produces": ["text/html"], + "tags": ["miscellaneous"], + "summary": "Render a markdown document as HTML", + "operationId": "renderMarkdown", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MarkdownOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/MarkdownRender" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/markdown/raw": { + "post": { + "consumes": ["text/plain"], + "produces": ["text/html"], + "tags": ["miscellaneous"], + "summary": "Render raw markdown as HTML", + "operationId": "renderMarkdownRaw", + "parameters": [ + { + "description": "Request body to render", + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/MarkdownRender" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/markup": { + "post": { + "consumes": ["application/json"], + "produces": ["text/html"], + "tags": ["miscellaneous"], + "summary": "Render a markup document as HTML", + "operationId": "renderMarkup", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MarkupOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/MarkupRender" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/nodeinfo": { + "get": { + "produces": ["application/json"], + "tags": ["miscellaneous"], + "summary": "Returns the nodeinfo of the Forgejo application", + "operationId": "getNodeInfo", + "responses": { + "200": { + "$ref": "#/responses/NodeInfo" + } + } + } + }, + "/notifications": { + "get": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["notification"], + "summary": "List users's notification threads", + "operationId": "notifyGetList", + "parameters": [ + { + "type": "boolean", + "description": "If true, show notifications marked as read. Default value is false", + "name": "all", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned.", + "name": "status-types", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": ["issue", "pull", "repository"], + "type": "string" + }, + "collectionFormat": "multi", + "description": "filter notifications by subject type", + "name": "subject-type", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/NotificationThreadList" + } + } + }, + "put": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["notification"], + "summary": "Mark notification threads as read, pinned or unread", + "operationId": "notifyReadList", + "parameters": [ + { + "type": "string", + "format": "date-time", + "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.", + "name": "last_read_at", + "in": "query" + }, + { + "type": "boolean", + "description": "If true, mark all notifications on this repo. Default value is false", + "name": "all", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.", + "name": "status-types", + "in": "query" + }, + { + "type": "string", + "description": "Status to mark notifications as, Defaults to read.", + "name": "to-status", + "in": "query" + } + ], + "responses": { + "205": { + "$ref": "#/responses/NotificationThreadList" + } + } + } + }, + "/notifications/new": { + "get": { + "tags": ["notification"], + "summary": "Check if unread notifications exist", + "operationId": "notifyNewAvailable", + "responses": { + "200": { + "$ref": "#/responses/NotificationCount" + } + } + } + }, + "/notifications/threads/{id}": { + "get": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["notification"], + "summary": "Get notification thread by ID", + "operationId": "notifyGetThread", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of notification thread", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/NotificationThread" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["notification"], + "summary": "Mark notification thread as read by ID", + "operationId": "notifyReadThread", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of notification thread", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "default": "read", + "description": "Status to mark notifications as", + "name": "to-status", + "in": "query" + } + ], + "responses": { + "205": { + "$ref": "#/responses/NotificationThread" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/org/{org}/repos": { + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Create a repository in an organization", + "operationId": "createOrgRepoDeprecated", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List all organizations", + "operationId": "orgGetAll", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Create an organization", + "operationId": "orgCreate", + "parameters": [ + { + "name": "organization", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrgOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Organization" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Get an organization", + "operationId": "orgGet", + "parameters": [ + { + "type": "string", + "description": "name of the organization to get", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Organization" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Delete an organization", + "operationId": "orgDelete", + "parameters": [ + { + "type": "string", + "description": "organization that is to be deleted", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Edit an organization", + "operationId": "orgEdit", + "parameters": [ + { + "type": "string", + "description": "name of the organization to edit", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/EditOrgOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Organization" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + } + } + } + }, + "/orgs/{org}/actions/runners/jobs": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Search for organization's action jobs according filter conditions", + "operationId": "orgSearchRunJobs", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "a comma separated list of run job labels to search for", + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RunJobList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/orgs/{org}/actions/runners/registration-token": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Get an organization's actions runner registration token", + "operationId": "orgGetRunnerRegistrationToken", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, + "/orgs/{org}/actions/secrets": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List actions secrets of an organization", + "operationId": "orgListActionsSecrets", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SecretList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/actions/secrets/{secretname}": { + "put": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Create or Update a secret value in an organization", + "operationId": "updateOrgSecret", + "parameters": [ + { + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Delete a secret in an organization", + "operationId": "deleteOrgSecret", + "parameters": [ + { + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "delete one secret of the organization" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/actions/variables": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List variables of an organization", + "operationId": "getOrgVariablesList", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/actions/variables/{variablename}": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Get organization's variable by name", + "operationId": "getOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Update variable in organization", + "operationId": "updateOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when updating an org-level variable" + }, + "204": { + "description": "response when updating an org-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Create a new variable in organization", + "operationId": "createOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating an org-level variable" + }, + "204": { + "description": "response when creating an org-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Delete organization's variable by name", + "operationId": "deleteOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "response when deleting a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/activities/feeds": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List an organization's activity feeds", + "operationId": "orgListActivityFeeds", + "parameters": [ + { + "type": "string", + "description": "name of the org", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/avatar": { + "post": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Update an organization's avatar", + "operationId": "orgUpdateAvatar", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateUserAvatarOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Delete an organization's avatar. It will be replaced by a default one", + "operationId": "orgDeleteAvatar", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/block/{username}": { + "put": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Blocks a user from the organization", + "operationId": "orgBlockUser", + "parameters": [ + { + "type": "string", + "description": "name of the org", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/hooks": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List an organization's webhooks", + "operationId": "orgListHooks", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Create a hook", + "operationId": "orgCreateHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/hooks/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Get a hook", + "operationId": "orgGetHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Delete a hook", + "operationId": "orgDeleteHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Update a hook", + "operationId": "orgEditHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to update", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/labels": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List an organization's labels", + "operationId": "orgListLabels", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "enum": [ + "mostissues", + "leastissues", + "reversealphabetically" + ], + "type": "string", + "description": "Specifies the sorting method: mostissues, leastissues, or reversealphabetically.", + "name": "sort", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Create a label for an organization", + "operationId": "orgCreateLabel", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/labels/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Get a single label", + "operationId": "orgGetLabel", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["organization"], + "summary": "Delete a label", + "operationId": "orgDeleteLabel", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Update a label", + "operationId": "orgEditLabel", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditLabelOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/list_blocked": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List the organization's blocked users", + "operationId": "orgListBlockedUsers", + "parameters": [ + { + "type": "string", + "description": "name of the org", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BlockedUserList" + } + } + } + }, + "/orgs/{org}/members": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List an organization's members", + "operationId": "orgListMembers", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/members/{username}": { + "get": { + "tags": ["organization"], + "summary": "Check if a user is a member of an organization", + "operationId": "orgIsMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "user is a member" + }, + "303": { + "description": "redirection to /orgs/{org}/public_members/{username}" + }, + "404": { + "description": "user is not a member" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Remove a member from an organization", + "operationId": "orgDeleteMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "member removed" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/public_members": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List an organization's public members", + "operationId": "orgListPublicMembers", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/public_members/{username}": { + "get": { + "tags": ["organization"], + "summary": "Check if a user is a public member of an organization", + "operationId": "orgIsPublicMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "user is a public member" + }, + "404": { + "description": "user is not a public member" + } + } + }, + "put": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Publicize a user's membership", + "operationId": "orgPublicizeMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "membership publicized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Conceal a user's membership", + "operationId": "orgConcealMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/quota": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Get quota information for an organization", + "operationId": "orgGetQuota", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaInfo" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/quota/artifacts": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List the artifacts affecting the organization's quota", + "operationId": "orgListQuotaArtifacts", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedArtifactList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/quota/attachments": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List the attachments affecting the organization's quota", + "operationId": "orgListQuotaAttachments", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedAttachmentList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/quota/check": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Check if the organization is over quota for a given subject", + "operationId": "orgCheckQuota", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "subject of the quota", + "name": "subject", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "Returns true if the action is accepted.", + "schema": { + "type": "boolean" + } + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/quota/packages": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List the packages affecting the organization's quota", + "operationId": "orgListQuotaPackages", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedPackageList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/rename": { + "post": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Rename an organization", + "operationId": "renameOrg", + "parameters": [ + { + "type": "string", + "description": "existing org name", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RenameOrgOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/repos": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List an organization's repos", + "operationId": "orgListRepos", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Create a repository in an organization", + "operationId": "createOrgRepo", + "parameters": [ + { + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/teams": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List an organization's teams", + "operationId": "orgListTeams", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Create a team", + "operationId": "orgCreateTeam", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTeamOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/teams/search": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Search for teams within an organization", + "operationId": "teamSearch", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "keywords to search", + "name": "q", + "in": "query" + }, + { + "type": "boolean", + "description": "include search within team description (defaults to true)", + "name": "include_desc", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "SearchResults of a successful search", + "schema": { + "type": "object", + "title": "TeamSearchResults", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + } + }, + "ok": { + "type": "boolean" + } + } + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/unblock/{username}": { + "put": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Unblock a user from the organization", + "operationId": "orgUnblockUser", + "parameters": [ + { + "type": "string", + "description": "name of the org", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/packages/{owner}": { + "get": { + "produces": ["application/json"], + "tags": ["package"], + "summary": "Gets all packages of an owner", + "operationId": "listPackages", + "parameters": [ + { + "type": "string", + "description": "owner of the packages", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "enum": [ + "alpine", + "cargo", + "chef", + "composer", + "conan", + "conda", + "container", + "cran", + "debian", + "generic", + "go", + "helm", + "maven", + "npm", + "nuget", + "pub", + "pypi", + "rpm", + "rubygems", + "swift", + "vagrant" + ], + "type": "string", + "description": "package type filter", + "name": "type", + "in": "query" + }, + { + "type": "string", + "description": "name filter", + "name": "q", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PackageList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/packages/{owner}/{type}/{name}/-/link/{repo_name}": { + "post": { + "tags": ["package"], + "summary": "Link a package to a repository", + "operationId": "linkPackage", + "parameters": [ + { + "type": "string", + "description": "owner of the package", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "type of the package", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the package", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository to link.", + "name": "repo_name", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/packages/{owner}/{type}/{name}/-/unlink": { + "post": { + "tags": ["package"], + "summary": "Unlink a package from a repository", + "operationId": "unlinkPackage", + "parameters": [ + { + "type": "string", + "description": "owner of the package", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "type of the package", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the package", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/packages/{owner}/{type}/{name}/{version}": { + "get": { + "produces": ["application/json"], + "tags": ["package"], + "summary": "Gets a package", + "operationId": "getPackage", + "parameters": [ + { + "type": "string", + "description": "owner of the package", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "type of the package", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the package", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "version of the package", + "name": "version", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Package" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["package"], + "summary": "Delete a package", + "operationId": "deletePackage", + "parameters": [ + { + "type": "string", + "description": "owner of the package", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "type of the package", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the package", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "version of the package", + "name": "version", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/packages/{owner}/{type}/{name}/{version}/files": { + "get": { + "produces": ["application/json"], + "tags": ["package"], + "summary": "Gets all files of a package", + "operationId": "listPackageFiles", + "parameters": [ + { + "type": "string", + "description": "owner of the package", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "type of the package", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the package", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "version of the package", + "name": "version", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PackageFileList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/issues/search": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Search for issues across the repositories that the user has access to", + "operationId": "issueSearchIssues", + "parameters": [ + { + "enum": ["open", "closed", "all"], + "type": "string", + "default": "open", + "description": "State of the issue", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded.", + "name": "labels", + "in": "query" + }, + { + "type": "string", + "description": "Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded.", + "name": "milestones", + "in": "query" + }, + { + "type": "string", + "description": "Search string", + "name": "q", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "Repository ID to prioritize in the results", + "name": "priority_repo_id", + "in": "query" + }, + { + "enum": ["issues", "pulls"], + "type": "string", + "description": "Filter by issue type", + "name": "type", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show issues updated after the given time (RFC 3339 format)", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show issues updated before the given time (RFC 3339 format)", + "name": "before", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Filter issues or pulls assigned to the authenticated user", + "name": "assigned", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Filter issues or pulls created by the authenticated user", + "name": "created", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Filter issues or pulls mentioning the authenticated user", + "name": "mentioned", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Filter pull requests where the authenticated user's review was requested", + "name": "review_requested", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Filter pull requests reviewed by the authenticated user", + "name": "reviewed", + "in": "query" + }, + { + "type": "string", + "description": "Filter by repository owner", + "name": "owner", + "in": "query" + }, + { + "type": "string", + "description": "Filter by team (requires organization owner parameter)", + "name": "team", + "in": "query" + }, + { + "minimum": 1, + "type": "integer", + "default": 1, + "description": "Page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "minimum": 0, + "type": "integer", + "description": "Number of items per page", + "name": "limit", + "in": "query" + }, + { + "enum": [ + "relevance", + "latest", + "oldest", + "recentupdate", + "leastupdate", + "mostcomment", + "leastcomment", + "nearduedate", + "farduedate" + ], + "type": "string", + "default": "latest", + "description": "Type of sort", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "400": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/migrate": { + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Migrate a remote git repository", + "operationId": "repoMigrate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MigrateRepoOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/search": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Search for repositories", + "operationId": "repoSearch", + "parameters": [ + { + "type": "string", + "description": "keyword", + "name": "q", + "in": "query" + }, + { + "type": "boolean", + "description": "Limit search to repositories with keyword as topic", + "name": "topic", + "in": "query" + }, + { + "type": "boolean", + "description": "include search of keyword within repository description", + "name": "includeDesc", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "search only for repos that the user with the given id owns or contributes to", + "name": "uid", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "repo owner to prioritize in the results", + "name": "priority_owner_id", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "search only for repos that belong to the given team id", + "name": "team_id", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "search only for repos that the user with the given id has starred", + "name": "starredBy", + "in": "query" + }, + { + "type": "boolean", + "description": "include private repositories this user has access to (defaults to true)", + "name": "private", + "in": "query" + }, + { + "type": "boolean", + "description": "show only public, private or all repositories (defaults to all)", + "name": "is_private", + "in": "query" + }, + { + "type": "boolean", + "description": "include template repositories this user has access to (defaults to true)", + "name": "template", + "in": "query" + }, + { + "type": "boolean", + "description": "show only archived, non-archived or all repositories (defaults to all)", + "name": "archived", + "in": "query" + }, + { + "type": "string", + "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"", + "name": "mode", + "in": "query" + }, + { + "type": "boolean", + "description": "if `uid` is given, search only for repos that the user owns", + "name": "exclusive", + "in": "query" + }, + { + "enum": [ + "alpha", + "created", + "updated", + "size", + "git_size", + "lfs_size", + "id", + "stars", + "forks" + ], + "type": "string", + "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" and \"id\". Default is \"alpha\"", + "name": "sort", + "in": "query" + }, + { + "enum": ["asc", "desc"], + "type": "string", + "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.", + "name": "order", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SearchResults" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a repository", + "operationId": "repoGet", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a repository", + "operationId": "repoDelete", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to delete", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to delete", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Edit a repository's properties. Only fields that are set will be changed.", + "operationId": "repoEdit", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to edit", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to edit", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "Properties of a repo that you can edit", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditRepoOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/actions/runners/jobs": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Search for repository's action jobs according filter conditions", + "operationId": "repoSearchRunJobs", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "a comma separated list of run job labels to search for", + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RunJobList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/repos/{owner}/{repo}/actions/runners/registration-token": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, + "/repos/{owner}/{repo}/actions/runs": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repository's action runs", + "operationId": "ListActionRuns", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results, default maximum page size is 50", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Returns workflow run triggered by the specified events. For example, `push`, `pull_request` or `workflow_dispatch`.", + "name": "event", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "unknown", + "waiting", + "running", + "success", + "failure", + "cancelled", + "skipped", + "blocked" + ], + "type": "string" + }, + "description": "Returns workflow runs with the check run status or conclusion that is specified. For example, a conclusion can be success or a status can be in_progress. Only Forgejo Actions can set a status of waiting, pending, or requested.\n", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "Returns the workflow run associated with the run number.\n", + "name": "run_number", + "in": "query" + }, + { + "type": "string", + "description": "Only returns workflow runs that are associated with the specified head_sha.", + "name": "head_sha", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionRunList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get an action run", + "operationId": "ActionRun", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the action run", + "name": "run_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionRun" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/secrets": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List an repo's actions secrets", + "operationId": "repoListActionsSecrets", + "parameters": [ + { + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SecretList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/secrets/{secretname}": { + "put": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create or Update a secret value in a repository", + "operationId": "updateRepoSecret", + "parameters": [ + { + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a secret in a repository", + "operationId": "deleteRepoSecret", + "parameters": [ + { + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "delete one secret of the organization" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/tasks": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repository's action tasks", + "operationId": "ListActionTasks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results, default maximum page size is 50", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TasksList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/actions/variables": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get repo-level variables list", + "operationId": "getRepoVariablesList", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/variables/{variablename}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a repo-level variable", + "operationId": "getRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Update a repo-level variable", + "operationId": "updateRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when updating a repo-level variable" + }, + "204": { + "description": "response when updating a repo-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a repo-level variable", + "operationId": "createRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a repo-level variable" + }, + "204": { + "description": "response when creating a repo-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a repo-level variable", + "operationId": "deleteRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "response when deleting a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches": { + "post": { + "consumes": ["application/json"], + "tags": ["repository"], + "summary": "Dispatches a workflow", + "operationId": "DispatchWorkflow", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the workflow", + "name": "workflowfilename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/DispatchWorkflowOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/DispatchWorkflowRun" + }, + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/activities/feeds": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repository's activity feeds", + "operationId": "repoListActivityFeeds", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/archive/{archive}": { + "get": { + "produces": [ + "application/octet-stream", + "application/zip", + "application/gzip" + ], + "tags": ["repository"], + "summary": "Get an archive of a repository", + "operationId": "repoGetArchive", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the git reference for download with attached archive format (e.g. master.zip)", + "name": "archive", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "success" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/assignees": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Return all users that have write access and can be assigned to issues", + "operationId": "repoGetAssignees", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/avatar": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Update a repository's avatar", + "operationId": "repoUpdateAvatar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateRepoAvatarOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a repository's avatar", + "operationId": "repoDeleteAvatar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/branch_protections": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List branch protections for a repository", + "operationId": "repoListBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtectionList" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a branch protections for a repository", + "operationId": "repoCreateBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateBranchProtectionOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/BranchProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/branch_protections/{name}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a specific branch protection for the repository", + "operationId": "repoGetBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of protected branch", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a specific branch protection for the repository", + "operationId": "repoDeleteBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of protected branch", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Edit a branch protections for a repository. Only fields that are set will be changed", + "operationId": "repoEditBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of protected branch", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditBranchProtectionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/branches": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repository's branches", + "operationId": "repoListBranches", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchList" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a branch", + "operationId": "repoCreateBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateBranchRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Branch" + }, + "403": { + "description": "The branch is archived or a mirror." + }, + "404": { + "description": "The old branch does not exist." + }, + "409": { + "description": "The branch with the same name already exists." + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/branches/{branch}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Retrieve a specific branch from a repository, including its effective branch protection", + "operationId": "repoGetBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "branch to get", + "name": "branch", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Branch" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a specific branch from a repository", + "operationId": "repoDeleteBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "branch to delete", + "name": "branch", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Update a branch", + "operationId": "repoUpdateBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the branch", + "name": "branch", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateBranchRepoOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/collaborators": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repository's collaborators", + "operationId": "repoListCollaborators", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/collaborators/{collaborator}": { + "get": { + "description": "If the user is a collaborator, return 204. If the user is not a collaborator, return 404.", + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Check if a user is a collaborator of a repository", + "operationId": "repoCheckCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator", + "name": "collaborator", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "put": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Add a collaborator to a repository", + "operationId": "repoAddCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator to add", + "name": "collaborator", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/AddCollaboratorOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a collaborator from a repository", + "operationId": "repoDeleteCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator to delete", + "name": "collaborator", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/collaborators/{collaborator}/permission": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get repository permissions for a user", + "operationId": "repoGetRepoPermissions", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator", + "name": "collaborator", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoCollaboratorPermission" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/commits": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a list of all commits from a repository", + "operationId": "repoGetAllCommits", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "SHA or branch to start listing commits from (usually 'master')", + "name": "sha", + "in": "query" + }, + { + "type": "string", + "description": "filepath of a file/dir", + "name": "path", + "in": "query" + }, + { + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat", + "in": "query" + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results (ignored if used with 'path')", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "commits that match the given specifier will not be listed.", + "name": "not", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/EmptyRepository" + } + } + } + }, + "/repos/{owner}/{repo}/commits/{ref}/status": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a commit's combined status, by branch/tag/commit reference", + "operationId": "repoGetCombinedStatusByRef", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of branch/tag/commit", + "name": "ref", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CombinedStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a commit's statuses, by branch/tag/commit reference", + "operationId": "repoListStatusesByRef", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of branch/tag/commit", + "name": "ref", + "in": "path", + "required": true + }, + { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string", + "description": "type of sort", + "name": "sort", + "in": "query" + }, + { + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "type": "string", + "description": "type of state", + "name": "state", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/commits/{sha}/pull": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get the pull request of the commit", + "operationId": "repoGetCommitPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "SHA of the commit to get", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/compare/{basehead}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get commit comparison information", + "operationId": "repoCompareDiff", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "compare two branches or commits", + "name": "basehead", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Compare" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/contents": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Gets the metadata of all the entries of the root dir", + "operationId": "repoGetContentsList", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Modify multiple files in a repository", + "operationId": "repoChangeFiles", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ChangeFilesOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/FilesResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/contents/{filepath}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir", + "operationId": "repoGetContents", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the dir, file, symlink or submodule in the repo", + "name": "filepath", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Update a file in a repository", + "operationId": "repoUpdateFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to update", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateFileOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a file in a repository", + "operationId": "repoCreateFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to create", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateFileOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "delete": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a file in a repository", + "operationId": "repoDeleteFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to delete", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeleteFileOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileDeleteResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/convert": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Convert a mirror repo to a normal repo.", + "operationId": "repoConvert", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to convert", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to convert", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/diffpatch": { + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Apply diff patch to repository", + "operationId": "repoApplyDiffPatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateFileOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileResponse" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/editorconfig/{filepath}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get the EditorConfig definitions of a file in a repository", + "operationId": "repoGetEditorConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "filepath of file to get", + "name": "filepath", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "description": "definitions", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/flags": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repository's flags", + "operationId": "repoListFlags", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/StringSlice" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Replace all flags of a repository", + "operationId": "repoReplaceAllFlags", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/ReplaceFlagsOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Remove all flags from a repository", + "operationId": "repoDeleteAllFlags", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/flags/{flag}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Check if a repository has a given flag", + "operationId": "repoCheckFlag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the flag", + "name": "flag", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Add a flag to a repository", + "operationId": "repoAddFlag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the flag", + "name": "flag", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Remove a flag from a repository", + "operationId": "repoDeleteFlag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the flag", + "name": "flag", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/forks": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repository's forks", + "operationId": "listForks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Fork a repository", + "operationId": "createFork", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to fork", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to fork", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateForkOption" + } + } + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/git/blobs": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Gets multiple blobs of a repository.", + "operationId": "GetBlobs", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "a comma separated list of blob-sha (mind the overall URL-length limit of ~2,083 chars)", + "name": "shas", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitBlobList" + }, + "400": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/{repo}/git/blobs/{sha}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Gets the blob of a repository.", + "operationId": "GetBlob", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the blob to retrieve", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitBlob" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/commits/{sha}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a single commit from a repository", + "operationId": "repoGetSingleCommit", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "a git ref or commit sha", + "name": "sha", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat", + "in": "query" + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Commit" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/git/commits/{sha}.{diffType}": { + "get": { + "produces": ["text/plain"], + "tags": ["repository"], + "summary": "Get a commit's diff or patch", + "operationId": "repoDownloadCommitDiffOrPatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "SHA of the commit to get", + "name": "sha", + "in": "path", + "required": true + }, + { + "enum": ["diff", "patch"], + "type": "string", + "description": "whether the output is diff or patch", + "name": "diffType", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/string" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/notes/{sha}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a note corresponding to a single commit from a repository", + "operationId": "repoGetNote", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "a git ref or commit sha", + "name": "sha", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Note" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Set a note corresponding to a single commit from a repository", + "operationId": "repoSetNote", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "a git ref or commit sha", + "name": "sha", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/NoteOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Note" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Removes a note corresponding to a single commit from a repository", + "operationId": "repoRemoveNote", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "a git ref or commit sha", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/git/refs": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListAllGitRefs", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/refs/{ref}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListGitRefs", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "part or full name of the ref", + "name": "ref", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/tags/{sha}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Gets the tag object of an annotated tag (not lightweight tags)", + "operationId": "GetAnnotatedTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AnnotatedTag" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/trees/{sha}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Gets the tree of a repository.", + "operationId": "GetTree", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "show all directories and files", + "name": "recursive", + "in": "query" + }, + { + "type": "integer", + "description": "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", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "number of items per page", + "name": "per_page", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitTreeResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/hooks": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List the hooks in a repository", + "operationId": "repoListHooks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a hook", + "operationId": "repoCreateHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/git": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List the Git hooks in a repository", + "operationId": "repoListGitHooks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/git/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a Git hook", + "operationId": "repoGetGitHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a Git hook in a repository", + "operationId": "repoDeleteGitHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Edit a Git hook in a repository", + "operationId": "repoEditGitHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditGitHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a hook", + "operationId": "repoGetHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a hook in a repository", + "operationId": "repoDeleteHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Edit a hook in a repository", + "operationId": "repoEditHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the hook", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/{id}/tests": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Test a push webhook", + "operationId": "repoTestHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to test", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", + "name": "ref", + "in": "query" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issue_config": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Returns the issue config for a repo", + "operationId": "repoGetIssueConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfig" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issue_config/validate": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Returns the validation information for a issue config", + "operationId": "repoValidateIssueConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfigValidation" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issue_templates": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get available issue templates for a repository", + "operationId": "repoGetIssueTemplates", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueTemplates" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "List a repository's issues", + "operationId": "issueListIssues", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "enum": ["closed", "open", "all"], + "type": "string", + "description": "whether issue is open or closed", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded", + "name": "labels", + "in": "query" + }, + { + "type": "string", + "description": "search string", + "name": "q", + "in": "query" + }, + { + "enum": ["issues", "pulls"], + "type": "string", + "description": "filter by type (issues / pulls) if set", + "name": "type", + "in": "query" + }, + { + "type": "string", + "description": "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", + "name": "milestones", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "type": "string", + "description": "Only show items which were created by the given user", + "name": "created_by", + "in": "query" + }, + { + "type": "string", + "description": "Only show items for which the given user is assigned", + "name": "assigned_by", + "in": "query" + }, + { + "type": "string", + "description": "Only show items in which the given user was mentioned", + "name": "mentioned_by", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "enum": [ + "relevance", + "latest", + "oldest", + "recentupdate", + "leastupdate", + "mostcomment", + "leastcomment", + "nearduedate", + "farduedate" + ], + "type": "string", + "default": "latest", + "description": "Type of sort", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueCreateIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "List all comments in a repository", + "operationId": "issueGetRepoComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated since the provided time are returned.", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommentList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "500": { + "$ref": "#/responses/internalServerError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{id}": { + "get": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get a comment", + "operationId": "issueGetComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "500": { + "$ref": "#/responses/internalServerError" + } + } + }, + "delete": { + "tags": ["issue"], + "summary": "Delete a comment", + "operationId": "issueDeleteComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "500": { + "$ref": "#/responses/internalServerError" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Edit a comment", + "operationId": "issueEditComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "500": { + "$ref": "#/responses/internalServerError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{id}/assets": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "List comment's attachments", + "operationId": "issueListIssueCommentAttachments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/error" + } + } + }, + "post": { + "consumes": ["multipart/form-data"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Create a comment attachment", + "operationId": "issueCreateIssueCommentAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the attachment", + "name": "name", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "time of the attachment's creation. This is a timestamp in RFC 3339 format", + "name": "updated_at", + "in": "query" + }, + { + "type": "file", + "description": "attachment to upload", + "name": "attachment", + "in": "formData", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get a comment attachment", + "operationId": "issueGetIssueCommentAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Delete a comment attachment", + "operationId": "issueDeleteIssueCommentAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Edit a comment attachment", + "operationId": "issueEditIssueCommentAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{id}/reactions": { + "get": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get a list of reactions from a comment of an issue", + "operationId": "issueGetCommentReactions", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Add a reaction to a comment of an issue", + "operationId": "issuePostCommentReaction", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Remove a reaction from a comment of an issue", + "operationId": "issueDeleteCommentReaction", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/pinned": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repo's pinned issues", + "operationId": "repoListPinnedIssues", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get an issue", + "operationId": "issueGetIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to get", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["issue"], + "summary": "Delete an issue", + "operationId": "issueDelete", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue to delete", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueEditIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to edit", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/assets": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "List issue's attachments", + "operationId": "issueListIssueAttachments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/error" + } + } + }, + "post": { + "consumes": ["multipart/form-data"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Create an issue attachment", + "operationId": "issueCreateIssueAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the attachment", + "name": "name", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "time of the attachment's creation. This is a timestamp in RFC 3339 format", + "name": "updated_at", + "in": "query" + }, + { + "type": "file", + "description": "attachment to upload", + "name": "attachment", + "in": "formData", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get an issue attachment", + "operationId": "issueGetIssueAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Delete an issue attachment", + "operationId": "issueDeleteIssueAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Edit an issue attachment", + "operationId": "issueEditIssueAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/blocks": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "List issues that are blocked by this issue", + "operationId": "issueListBlocks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Block the issue given in the body by the issue in path", + "operationId": "issueCreateIssueBlocking", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Unblock the issue given in the body by the issue in path", + "operationId": "issueRemoveIssueBlocking", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/comments": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "List all comments on an issue", + "operationId": "issueGetComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated since the specified time are returned.", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommentList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "500": { + "$ref": "#/responses/internalServerError" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Add a comment to an issue", + "operationId": "issueCreateComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueCommentOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Comment" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + }, + "500": { + "$ref": "#/responses/internalServerError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/comments/{id}": { + "delete": { + "tags": ["issue"], + "summary": "Delete a comment", + "operationId": "issueDeleteCommentDeprecated", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "500": { + "$ref": "#/responses/internalServerError" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Edit a comment", + "operationId": "issueEditCommentDeprecated", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "500": { + "$ref": "#/responses/internalServerError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/deadline": { + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueEditIssueDeadline", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to create or update a deadline on", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditDeadlineOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/IssueDeadline" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/dependencies": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "List an issue's dependencies, i.e all issues that block this issue.", + "operationId": "issueListIssueDependencies", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Make the issue in the url depend on the issue in the form.", + "operationId": "issueCreateIssueDependencies", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Remove an issue dependency", + "operationId": "issueRemoveIssueDependencies", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/labels": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get an issue's labels", + "operationId": "issueGetLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Replace an issue's labels", + "operationId": "issueReplaceLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Add a label to an issue", + "operationId": "issueAddLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Remove all labels from an issue", + "operationId": "issueClearLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/DeleteLabelsOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/labels/{identifier}": { + "delete": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Remove a label from an issue", + "operationId": "issueRemoveLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name or id of the label to remove", + "name": "identifier", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/DeleteLabelsOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/pin": { + "post": { + "tags": ["issue"], + "summary": "Pin an Issue", + "operationId": "pinIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue to pin", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["issue"], + "summary": "Unpin an Issue", + "operationId": "unpinIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue to unpin", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/pin/{position}": { + "patch": { + "tags": ["issue"], + "summary": "Moves the Pin to the given Position", + "operationId": "moveIssuePin", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "the new position", + "name": "position", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/reactions": { + "get": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get a list reactions of an issue", + "operationId": "issueGetIssueReactions", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Add a reaction to an issue", + "operationId": "issuePostIssueReaction", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Remove a reaction from an issue", + "operationId": "issueDeleteIssueReaction", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": { + "delete": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Delete an issue's existing stopwatch.", + "operationId": "issueDeleteStopWatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "Cannot cancel a non existent stopwatch" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": { + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Start stopwatch on an issue.", + "operationId": "issueStartStopWatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to create the stopwatch on", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "Cannot start a stopwatch again if it already exists" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": { + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Stop an issue's existing stopwatch.", + "operationId": "issueStopStopWatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "Cannot stop a non existent stopwatch" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/subscriptions": { + "get": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get users who subscribed on an issue.", + "operationId": "issueSubscriptions", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/subscriptions/check": { + "get": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Check if user is subscribed to an issue", + "operationId": "issueCheckSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": { + "put": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Subscribe user to issue", + "operationId": "issueAddSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "user to subscribe", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Already subscribed" + }, + "201": { + "description": "Successfully Subscribed" + }, + "304": { + "description": "User can only subscribe itself if he is no admin" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Unsubscribe user from issue", + "operationId": "issueDeleteSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "user witch unsubscribe", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Already unsubscribed" + }, + "201": { + "description": "Successfully Unsubscribed" + }, + "304": { + "description": "User can only subscribe itself if he is no admin" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/timeline": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "List all comments and events on an issue", + "operationId": "issueGetCommentsAndTimeline", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated since the specified time are returned.", + "name": "since", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TimelineList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "500": { + "$ref": "#/responses/internalServerError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/times": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "List an issue's tracked times", + "operationId": "issueTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "optional filter by user (available for issue managers)", + "name": "user", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Add tracked time to a issue", + "operationId": "issueAddTime", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/AddTimeOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTime" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Reset a tracked time of an issue", + "operationId": "issueResetTime", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to add tracked time to", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/times/{id}": { + "delete": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Delete specific tracked time", + "operationId": "issueDeleteTime", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of time to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/keys": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repository's keys", + "operationId": "repoListKeys", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "the key_id to search for", + "name": "key_id", + "in": "query" + }, + { + "type": "string", + "description": "fingerprint of the key", + "name": "fingerprint", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKeyList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Add a key to a repository", + "operationId": "repoCreateKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/keys/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a repository's key by id", + "operationId": "repoGetKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the key to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["repository"], + "summary": "Delete a key from a repository", + "operationId": "repoDeleteKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/labels": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get all of a repository's labels", + "operationId": "issueListLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "enum": [ + "mostissues", + "leastissues", + "reversealphabetically" + ], + "type": "string", + "description": "Specifies the sorting method: mostissues, leastissues, or reversealphabetically.", + "name": "sort", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Create a label", + "operationId": "issueCreateLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/labels/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get a single label", + "operationId": "issueGetLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["issue"], + "summary": "Delete a label", + "operationId": "issueDeleteLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Update a label", + "operationId": "issueEditLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditLabelOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/languages": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get languages and number of bytes of code written", + "operationId": "repoGetLanguages", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LanguageStatistics" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/media/{filepath}": { + "get": { + "produces": ["application/octet-stream"], + "tags": ["repository"], + "summary": "Get a file or it's LFS object from a repository", + "operationId": "repoGetRawFileOrLFS", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "filepath of the file to get", + "name": "filepath", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/milestones": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get all of a repository's opened milestones", + "operationId": "issueGetMilestonesList", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "filter by milestone name", + "name": "name", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/MilestoneList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateMilestoneOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/milestones/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Get a milestone", + "operationId": "issueGetMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "the milestone to get, identified by ID and if not available by name", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["issue"], + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "the milestone to delete, identified by ID and if not available by name", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["issue"], + "summary": "Update a milestone", + "operationId": "issueEditMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "the milestone to edit, identified by ID and if not available by name", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditMilestoneOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/mirror-sync": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to sync", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to sync", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/new_pin_allowed": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Returns if new Issue Pins are allowed", + "operationId": "repoNewPinAllowed", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/notifications": { + "get": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["notification"], + "summary": "List users's notification threads on a specific repo", + "operationId": "notifyGetRepoList", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "If true, show notifications marked as read. Default value is false", + "name": "all", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned", + "name": "status-types", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": ["issue", "pull", "repository"], + "type": "string" + }, + "collectionFormat": "multi", + "description": "filter notifications by subject type", + "name": "subject-type", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/NotificationThreadList" + } + } + }, + "put": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["notification"], + "summary": "Mark notification threads as read, pinned or unread on a specific repo", + "operationId": "notifyReadRepoList", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "If true, mark all notifications on this repo. Default value is false", + "name": "all", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.", + "name": "status-types", + "in": "query" + }, + { + "type": "string", + "description": "Status to mark notifications as. Defaults to read.", + "name": "to-status", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.", + "name": "last_read_at", + "in": "query" + } + ], + "responses": { + "205": { + "$ref": "#/responses/NotificationThreadList" + } + } + } + }, + "/repos/{owner}/{repo}/pulls": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results.", + "operationId": "repoListPullRequests", + "parameters": [ + { + "type": "string", + "description": "Owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "enum": ["open", "closed", "all"], + "type": "string", + "default": "open", + "description": "State of pull request", + "name": "state", + "in": "query" + }, + { + "enum": [ + "oldest", + "recentupdate", + "recentclose", + "leastupdate", + "mostcomment", + "leastcomment", + "priority" + ], + "type": "string", + "description": "Type of sort", + "name": "sort", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "ID of the milestone", + "name": "milestone", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "collectionFormat": "multi", + "description": "Label IDs", + "name": "labels", + "in": "query" + }, + { + "type": "string", + "description": "Filter by pull request author", + "name": "poster", + "in": "query" + }, + { + "minimum": 1, + "type": "integer", + "default": 1, + "description": "Page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "minimum": 0, + "type": "integer", + "description": "Page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "500": { + "$ref": "#/responses/error" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a pull request", + "operationId": "repoCreatePullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreatePullRequestOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/pinned": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repo's pinned pull requests", + "operationId": "repoListPinnedPullRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{base}/{head}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a pull request by base and head", + "operationId": "repoGetPullRequestByBaseHead", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "base of the pull request to get", + "name": "base", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "head of the pull request to get", + "name": "head", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a pull request", + "operationId": "repoGetPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "repoEditPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to edit", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditPullRequestOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PullRequest" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}.{diffType}": { + "get": { + "produces": ["text/plain"], + "tags": ["repository"], + "summary": "Get a pull request diff or patch", + "operationId": "repoDownloadPullDiffOrPatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + }, + { + "enum": ["diff", "patch"], + "type": "string", + "description": "whether the output is diff or patch", + "name": "diffType", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`", + "name": "binary", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/string" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/commits": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get commits for a pull request", + "operationId": "repoGetPullRequestCommits", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/files": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get changed files for a pull request", + "operationId": "repoGetPullRequestFiles", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "skip to given file", + "name": "skip-to", + "in": "query" + }, + { + "enum": [ + "ignore-all", + "ignore-change", + "ignore-eol", + "show-all" + ], + "type": "string", + "description": "whitespace behavior", + "name": "whitespace", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ChangedFileList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/merge": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Check if a pull request has been merged", + "operationId": "repoPullRequestIsMerged", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "pull request has been merged" + }, + "404": { + "description": "pull request has not been merged" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Merge a pull request", + "operationId": "repoMergePullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MergePullRequestOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Cancel the scheduled auto merge for the given pull request", + "operationId": "repoCancelScheduledAutoMerge", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/requested_reviewers": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create review requests for a pull request", + "operationId": "repoCreatePullReviewRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Cancel review requests for a pull request", + "operationId": "repoDeletePullReviewRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List all reviews for a pull request", + "operationId": "repoListPullReviews", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a review to an pull request", + "operationId": "repoCreatePullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreatePullReviewOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Submit a pending review to an pull request", + "operationId": "repoSubmitPullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SubmitPullReviewOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a specific review from a pull request", + "operationId": "repoDeletePullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReviewComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewCommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Add a new comment to a pull request review", + "operationId": "repoCreatePullReviewComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreatePullReviewCommentOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewComment" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a pull review comment", + "operationId": "repoGetPullReviewComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "comment", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewComment" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a pull review comment", + "operationId": "repoDeletePullReviewComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "comment", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Dismiss a review for a pull request", + "operationId": "repoDismissPullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DismissPullReviewOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Cancel to dismiss a review for a pull request", + "operationId": "repoUnDismissPullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/update": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Merge PR's baseBranch into headBranch", + "operationId": "repoUpdatePullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + }, + { + "enum": ["merge", "rebase"], + "type": "string", + "description": "how to update pull request", + "name": "style", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/push_mirrors": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get all push mirrors of the repository", + "operationId": "repoListPushMirrors", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PushMirrorList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Set up a new push mirror in a repository", + "operationId": "repoAddPushMirror", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreatePushMirrorOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/push_mirrors-sync": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Sync all push mirrored repository", + "operationId": "repoPushMirrorSync", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to sync", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to sync", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/push_mirrors/{name}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get push mirror of the repository by remoteName", + "operationId": "repoGetPushMirrorByRemoteName", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "remote name of push mirror", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Remove a push mirror from a repository by remoteName", + "operationId": "repoDeletePushMirror", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "remote name of the pushMirror", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/raw/{filepath}": { + "get": { + "produces": ["application/octet-stream"], + "tags": ["repository"], + "summary": "Get a file from a repository", + "operationId": "repoGetRawFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "filepath of the file to get", + "name": "filepath", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/releases": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repo's releases", + "operationId": "repoListReleases", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", + "name": "draft", + "in": "query" + }, + { + "type": "boolean", + "description": "filter (exclude / include) pre-releases", + "name": "pre-release", + "in": "query" + }, + { + "type": "string", + "description": "Search string", + "name": "q", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReleaseList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a release", + "operationId": "repoCreateRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateReleaseOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/releases/latest": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", + "operationId": "repoGetLatestRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/releases/tags/{tag}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a release by tag name", + "operationId": "repoGetReleaseByTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "tag name of the release to get", + "name": "tag", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["repository"], + "summary": "Delete a release by tag name", + "operationId": "repoDeleteReleaseByTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "tag name of the release to delete", + "name": "tag", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/releases/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a release", + "operationId": "repoGetRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["repository"], + "summary": "Delete a release", + "operationId": "repoDeleteRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Update a release", + "operationId": "repoEditRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReleaseOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/releases/{id}/assets": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List release's attachments", + "operationId": "repoListReleaseAttachments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["multipart/form-data", "application/octet-stream"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a release attachment", + "operationId": "repoCreateReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the attachment", + "name": "name", + "in": "query" + }, + { + "type": "file", + "description": "attachment to upload (this parameter is incompatible with `external_url`)", + "name": "attachment", + "in": "formData" + }, + { + "type": "string", + "description": "url to external asset (this parameter is incompatible with `attachment`)", + "name": "external_url", + "in": "formData" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a release attachment", + "operationId": "repoGetReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a release attachment", + "operationId": "repoDeleteReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Edit a release attachment", + "operationId": "repoEditReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/reviewers": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Return all users that can be requested to review in this repo", + "operationId": "repoGetReviewers", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/signing-key.gpg": { + "get": { + "produces": ["text/plain"], + "tags": ["repository"], + "summary": "Get signing-key.gpg for given repository", + "operationId": "repoSigningKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "GPG armored public key", + "schema": { + "type": "string" + } + } + } + } + }, + "/repos/{owner}/{repo}/stargazers": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repo's stargazers", + "operationId": "repoListStargazers", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/statuses/{sha}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a commit's statuses", + "operationId": "repoListStatuses", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string", + "description": "type of sort", + "name": "sort", + "in": "query" + }, + { + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "type": "string", + "description": "type of state", + "name": "state", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a commit status", + "operationId": "repoCreateStatus", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateStatusOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/CommitStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/subscribers": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/subscription": { + "get": { + "tags": ["repository"], + "summary": "Check if the current user is watching a repo", + "operationId": "userCurrentCheckSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "404": { + "description": "User is not watching this repo or repo do not exist" + } + } + }, + "put": { + "tags": ["repository"], + "summary": "Watch a repo", + "operationId": "userCurrentPutSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["repository"], + "summary": "Unwatch a repo", + "operationId": "userCurrentDeleteSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/sync_fork": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Gets information about syncing the fork default branch with the base branch", + "operationId": "repoSyncForkDefaultInfo", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/SyncForkInfo" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Syncs the default branch of a fork with the base branch", + "operationId": "repoSyncForkDefault", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/sync_fork/{branch}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Gets information about syncing a fork branch with the base branch", + "operationId": "repoSyncForkBranchInfo", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The branch", + "name": "branch", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/SyncForkInfo" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Syncs a fork branch with the base branch", + "operationId": "repoSyncForkBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The branch", + "name": "branch", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/tag_protections": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List tag protections for a repository", + "operationId": "repoListTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtectionList" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a tag protections for a repository", + "operationId": "repoCreateTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagProtectionOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/TagProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/tag_protections/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a specific tag protection for the repository", + "operationId": "repoGetTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the tag protect to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a specific tag protection for the repository", + "operationId": "repoDeleteTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of protected tag", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Edit a tag protections for a repository. Only fields that are set will be changed", + "operationId": "repoEditTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of protected tag", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditTagProtectionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/tags": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repository's tags", + "operationId": "repoListTags", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results, default maximum page size is 50", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a new git tag in a repository", + "operationId": "repoCreateTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Tag" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/tags/{tag}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get the tag of a repository by tag name", + "operationId": "repoGetTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of tag", + "name": "tag", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Tag" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a repository's tag by name", + "operationId": "repoDeleteTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of tag to delete", + "name": "tag", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/teams": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repository's teams", + "operationId": "repoListTeams", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/teams/{team}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Check if a team is assigned to a repository", + "operationId": "repoCheckTeam", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "team name", + "name": "team", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + } + } + }, + "put": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Add a team to a repository", + "operationId": "repoAddTeam", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "team name", + "name": "team", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a team from a repository", + "operationId": "repoDeleteTeam", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "team name", + "name": "team", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/times": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a repo's tracked times", + "operationId": "repoTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "optional filter by user (available for issue managers)", + "name": "user", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/times/{user}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "List a user's tracked times in a repo", + "operationId": "userTrackedTimes", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of user", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/topics": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get list of topics that a repository has", + "operationId": "repoListTopics", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TopicNames" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Replace list of topics for a repository", + "operationId": "repoUpdateTopics", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/RepoTopicOptions" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + } + } + }, + "/repos/{owner}/{repo}/topics/{topic}": { + "put": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Add a topic to a repository", + "operationId": "repoAddTopic", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the topic to add", + "name": "topic", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Delete a topic from a repository", + "operationId": "repoDeleteTopic", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the topic to delete", + "name": "topic", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + } + } + }, + "/repos/{owner}/{repo}/transfer": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Transfer a repo ownership", + "operationId": "repoTransfer", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to transfer", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "Transfer Options", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TransferRepoOption" + } + } + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/transfer/accept": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Accept a repo transfer", + "operationId": "acceptRepoTransfer", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to transfer", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/transfer/reject": { + "post": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Reject a repo transfer", + "operationId": "rejectRepoTransfer", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to transfer", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/wiki/new": { + "post": { + "consumes": ["application/json"], + "tags": ["repository"], + "summary": "Create a wiki page", + "operationId": "repoCreateWikiPage", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/WikiPage" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/wiki/page/{pageName}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a wiki page", + "operationId": "repoGetWikiPage", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiPage" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["repository"], + "summary": "Delete a wiki page", + "operationId": "repoDeleteWikiPage", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "patch": { + "consumes": ["application/json"], + "tags": ["repository"], + "summary": "Edit a wiki page", + "operationId": "repoEditWikiPage", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiPage" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/wiki/pages": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get all wiki pages", + "operationId": "repoGetWikiPages", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiPageList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/wiki/revisions/{pageName}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get revisions of a wiki page", + "operationId": "repoGetWikiPageRevisions", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiCommitList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{template_owner}/{template_repo}/generate": { + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Create a repository using a template", + "operationId": "generateRepo", + "parameters": [ + { + "type": "string", + "description": "name of the template repository owner", + "name": "template_owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the template repository", + "name": "template_repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/GenerateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repositories/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Get a repository by id", + "operationId": "repoGetByID", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the repo to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/settings/api": { + "get": { + "produces": ["application/json"], + "tags": ["settings"], + "summary": "Get instance's global settings for api", + "operationId": "getGeneralAPISettings", + "responses": { + "200": { + "$ref": "#/responses/GeneralAPISettings" + } + } + } + }, + "/settings/attachment": { + "get": { + "produces": ["application/json"], + "tags": ["settings"], + "summary": "Get instance's global settings for Attachment", + "operationId": "getGeneralAttachmentSettings", + "responses": { + "200": { + "$ref": "#/responses/GeneralAttachmentSettings" + } + } + } + }, + "/settings/repository": { + "get": { + "produces": ["application/json"], + "tags": ["settings"], + "summary": "Get instance's global settings for repositories", + "operationId": "getGeneralRepositorySettings", + "responses": { + "200": { + "$ref": "#/responses/GeneralRepoSettings" + } + } + } + }, + "/settings/ui": { + "get": { + "produces": ["application/json"], + "tags": ["settings"], + "summary": "Get instance's global settings for ui", + "operationId": "getGeneralUISettings", + "responses": { + "200": { + "$ref": "#/responses/GeneralUISettings" + } + } + } + }, + "/signing-key.gpg": { + "get": { + "produces": ["text/plain"], + "tags": ["miscellaneous"], + "summary": "Get default signing-key.gpg", + "operationId": "getSigningKey", + "responses": { + "200": { + "description": "GPG armored public key", + "schema": { + "type": "string" + } + } + } + } + }, + "/signing-key.ssh": { + "get": { + "produces": ["text/plain"], + "tags": ["miscellaneous"], + "summary": "Get default signing-key.ssh", + "operationId": "getSSHSigningKey", + "responses": { + "200": { + "description": "SSH public key in OpenSSH authorized key format", + "schema": { + "type": "string" + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Get a team", + "operationId": "orgGetTeam", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["organization"], + "summary": "Delete a team", + "operationId": "orgDeleteTeam", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "team deleted" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Edit a team", + "operationId": "orgEditTeam", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditTeamOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}/activities/feeds": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List a team's activity feeds", + "operationId": "orgListTeamActivityFeeds", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}/members": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List a team's members", + "operationId": "orgListTeamMembers", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}/members/{username}": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List a particular member of team", + "operationId": "orgListTeamMember", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the member to list", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/User" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Add a team member", + "operationId": "orgAddTeamMember", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to add", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Remove a team member", + "operationId": "orgRemoveTeamMember", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to remove", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}/repos": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List a team's repos", + "operationId": "orgListTeamRepos", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}/repos/{org}/{repo}": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List a particular repo of team", + "operationId": "orgListTeamRepo", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "organization that owns the repo to list", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to list", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Add a repository to a team", + "operationId": "orgAddTeamRepository", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "organization that owns the repo to add", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to add", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "description": "This does not delete the repository, it only removes the repository from the team.", + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Remove a repository from a team", + "operationId": "orgRemoveTeamRepository", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "organization that owns the repo to remove", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to remove", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/topics/search": { + "get": { + "produces": ["application/json"], + "tags": ["repository"], + "summary": "Search for topics by keyword", + "operationId": "topicSearch", + "parameters": [ + { + "type": "string", + "description": "keyword to search for", + "name": "q", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "SearchResults of a successful search", + "schema": { + "type": "object", + "title": "TopicSearchResults", + "properties": { + "topics": { + "type": "array", + "items": { + "$ref": "#/definitions/TopicResponse" + } + } + } + } + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get the authenticated user", + "operationId": "userGetCurrent", + "responses": { + "200": { + "$ref": "#/responses/User" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/actions/runners/jobs": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Search for user's action jobs according filter conditions", + "operationId": "userSearchRunJobs", + "parameters": [ + { + "type": "string", + "description": "a comma separated list of run job labels to search for", + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RunJobList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/actions/runners/registration-token": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get an user's actions runner registration token", + "operationId": "userGetRunnerRegistrationToken", + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/actions/secrets/{secretname}": { + "put": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["user"], + "summary": "Create or Update a secret value in a user scope", + "operationId": "updateUserSecret", + "parameters": [ + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["user"], + "summary": "Delete a secret in a user scope", + "operationId": "deleteUserSecret", + "parameters": [ + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "delete one secret of the user" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/actions/variables": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get the user-level list of variables which is created by current doer", + "operationId": "getUserVariablesList", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/actions/variables/{variablename}": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get a user-level variable which is created by current doer", + "operationId": "getUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["user"], + "summary": "Update a user-level variable which is created by current doer", + "operationId": "updateUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when updating a variable" + }, + "204": { + "description": "response when updating a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["user"], + "summary": "Create a user-level variable", + "operationId": "createUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a variable" + }, + "204": { + "description": "response when creating a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Delete a user-level variable which is created by current doer", + "operationId": "deleteUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "description": "response when deleting a variable" + }, + "204": { + "description": "response when deleting a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/applications/oauth2": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the authenticated user's oauth2 applications", + "operationId": "userGetOAuth2Applications", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OAuth2ApplicationList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Creates a new OAuth2 application", + "operationId": "userCreateOAuth2Application", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOAuth2ApplicationOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/OAuth2Application" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/applications/oauth2/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get an OAuth2 application", + "operationId": "userGetOAuth2Application", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "Application ID to be found", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OAuth2Application" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Delete an OAuth2 application", + "operationId": "userDeleteOAuth2Application", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "token to be deleted", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Update an OAuth2 application, this includes regenerating the client secret", + "operationId": "userUpdateOAuth2Application", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "application to be updated", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOAuth2ApplicationOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/OAuth2Application" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/avatar": { + "post": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Update avatar of the current user", + "operationId": "userUpdateAvatar", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateUserAvatarOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Delete avatar of the current user. It will be replaced by a default one", + "operationId": "userDeleteAvatar", + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/block/{username}": { + "put": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Blocks a user from the doer", + "operationId": "userBlockUser", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/emails": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List all email addresses of the current user", + "operationId": "userListEmails", + "responses": { + "200": { + "$ref": "#/responses/EmailList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Add an email addresses to the current user's account", + "operationId": "userAddEmail", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateEmailOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/EmailList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Delete email addresses from the current user's account", + "operationId": "userDeleteEmail", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/DeleteEmailOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/followers": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the authenticated user's followers", + "operationId": "userCurrentListFollowers", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/following": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the users that the authenticated user is following", + "operationId": "userCurrentListFollowing", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/following/{username}": { + "get": { + "tags": ["user"], + "summary": "Check whether a user is followed by the authenticated user", + "operationId": "userCurrentCheckFollowing", + "parameters": [ + { + "type": "string", + "description": "username of followed user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "tags": ["user"], + "summary": "Follow a user", + "operationId": "userCurrentPutFollow", + "parameters": [ + { + "type": "string", + "description": "username of user to follow", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["user"], + "summary": "Unfollow a user", + "operationId": "userCurrentDeleteFollow", + "parameters": [ + { + "type": "string", + "description": "username of user to unfollow", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/gpg_key_token": { + "get": { + "produces": ["text/plain"], + "tags": ["user"], + "summary": "Get a Token to verify", + "operationId": "getVerificationToken", + "responses": { + "200": { + "$ref": "#/responses/string" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/gpg_key_verify": { + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["user"], + "summary": "Verify a GPG key", + "operationId": "userVerifyGPGKey", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/VerifyGPGKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/GPGKey" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/gpg_keys": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the authenticated user's GPG keys", + "operationId": "userCurrentListGPGKeys", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GPGKeyList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["user"], + "summary": "Add a GPG public key to current user's account", + "operationId": "userCurrentPostGPGKey", + "parameters": [ + { + "name": "Form", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateGPGKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/GPGKey" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/gpg_keys/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get a GPG key", + "operationId": "userCurrentGetGPGKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GPGKey" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Remove a GPG public key from current user's account", + "operationId": "userCurrentDeleteGPGKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/hooks": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the authenticated user's webhooks", + "operationId": "userListHooks", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["user"], + "summary": "Create a hook", + "operationId": "userCreateHook", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/hooks/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get a hook", + "operationId": "userGetHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Delete a hook", + "operationId": "userDeleteHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "patch": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["user"], + "summary": "Update a hook", + "operationId": "userEditHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to update", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/keys": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the authenticated user's public keys", + "operationId": "userCurrentListKeys", + "parameters": [ + { + "type": "string", + "description": "fingerprint of the key", + "name": "fingerprint", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PublicKeyList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["user"], + "summary": "Create a public key", + "operationId": "userCurrentPostKey", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PublicKey" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/keys/{id}": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get a public key", + "operationId": "userCurrentGetKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PublicKey" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Delete a public key", + "operationId": "userCurrentDeleteKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/list_blocked": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the authenticated user's blocked users", + "operationId": "userListBlockedUsers", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BlockedUserList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/orgs": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List the current user's organizations", + "operationId": "orgListCurrentUserOrgs", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/quota": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get quota information for the authenticated user", + "operationId": "userGetQuota", + "responses": { + "200": { + "$ref": "#/responses/QuotaInfo" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/quota/artifacts": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the artifacts affecting the authenticated user's quota", + "operationId": "userListQuotaArtifacts", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedArtifactList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/quota/attachments": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the attachments affecting the authenticated user's quota", + "operationId": "userListQuotaAttachments", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedAttachmentList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/quota/check": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Check if the authenticated user is over quota for a given subject", + "operationId": "userCheckQuota", + "parameters": [ + { + "type": "string", + "description": "subject of the quota", + "name": "subject", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "Returns true if the action is accepted.", + "schema": { + "type": "boolean" + } + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/quota/packages": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the packages affecting the authenticated user's quota", + "operationId": "userListQuotaPackages", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedPackageList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/repos": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the repos that the authenticated user owns", + "operationId": "userCurrentListRepos", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "enum": [ + "name", + "id", + "newest", + "oldest", + "recentupdate", + "leastupdate", + "reversealphabetically", + "alphabetically", + "reversesize", + "size", + "reversegitsize", + "gitsize", + "reverselfssize", + "lfssize", + "moststars", + "feweststars", + "mostforks", + "fewestforks" + ], + "type": "string", + "description": "order the repositories", + "name": "order_by", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["repository", "user"], + "summary": "Create a repository", + "operationId": "createCurrentUserRepo", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/settings": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get current user's account settings", + "operationId": "getUserSettings", + "responses": { + "200": { + "$ref": "#/responses/UserSettings" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "patch": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Update settings in current user's account", + "operationId": "updateUserSettings", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UserSettingsOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserSettings" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/starred": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "The repos that the authenticated user has starred", + "operationId": "userCurrentListStarred", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/starred/{owner}/{repo}": { + "get": { + "tags": ["user"], + "summary": "Whether the authenticated is starring the repo", + "operationId": "userCurrentCheckStarring", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "tags": ["user"], + "summary": "Star the given repo", + "operationId": "userCurrentPutStar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to star", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to star", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": ["user"], + "summary": "Unstar the given repo", + "operationId": "userCurrentDeleteStar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to unstar", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to unstar", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/stopwatches": { + "get": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get list of all existing stopwatches", + "operationId": "userGetStopWatches", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/StopWatchList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/subscriptions": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List repositories watched by the authenticated user", + "operationId": "userCurrentListSubscriptions", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/teams": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List all the teams a user belongs to", + "operationId": "userListTeams", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/times": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the current user's tracked times", + "operationId": "userCurrentTrackedTimes", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/unblock/{username}": { + "put": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Unblocks a user from the doer", + "operationId": "userUnblockUser", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/users/search": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Search for users", + "operationId": "userSearch", + "parameters": [ + { + "type": "string", + "description": "keyword", + "name": "q", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "ID of the user to search for", + "name": "uid", + "in": "query" + }, + { + "enum": [ + "oldest", + "newest", + "alphabetically", + "reversealphabetically", + "recentupdate", + "leastupdate" + ], + "type": "string", + "description": "sort order of results", + "name": "sort", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "SearchResults of a successful search", + "schema": { + "type": "object", + "title": "UserSearchResults", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + } + }, + "ok": { + "type": "boolean" + } + } + } + } + } + } + }, + "/users/{username}": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get a user", + "operationId": "userGet", + "parameters": [ + { + "type": "string", + "description": "username of user to get", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/User" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/activities/feeds": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List a user's activity feeds", + "operationId": "userListActivityFeeds", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "if true, only show actions performed by the requested user", + "name": "only-performed-by", + "in": "query" + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/followers": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the given user's followers", + "operationId": "userListFollowers", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/following": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the users that the given user is following", + "operationId": "userListFollowing", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/following/{target}": { + "get": { + "tags": ["user"], + "summary": "Check if one user is following another user", + "operationId": "userCheckFollowing", + "parameters": [ + { + "type": "string", + "description": "username of following user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of followed user", + "name": "target", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/gpg_keys": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the given user's GPG keys", + "operationId": "userListGPGKeys", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GPGKeyList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/heatmap": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Get a user's heatmap", + "operationId": "userGetHeatmapData", + "parameters": [ + { + "type": "string", + "description": "username of user to get", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserHeatmapData" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/keys": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the given user's public keys", + "operationId": "userListKeys", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "fingerprint of the key", + "name": "fingerprint", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PublicKeyList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/orgs": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "List a user's organizations", + "operationId": "orgListUserOrgs", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/orgs/{org}/permissions": { + "get": { + "produces": ["application/json"], + "tags": ["organization"], + "summary": "Get user permissions in organization", + "operationId": "orgGetUserPermissions", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationPermissions" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/repos": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the repos owned by the given user", + "operationId": "userListRepos", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/starred": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "The repos that the given user has starred", + "operationId": "userListStarred", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/subscriptions": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the repositories watched by a user", + "operationId": "userListSubscriptions", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/tokens": { + "get": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "List the specified user's access tokens", + "operationId": "userGetTokens", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/AccessTokenList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["user"], + "summary": "Generate an access token for the specified user", + "operationId": "userCreateToken", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateAccessTokenOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/AccessToken" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/tokens/{token}": { + "delete": { + "produces": ["application/json"], + "tags": ["user"], + "summary": "Delete an access token from the specified user's account", + "operationId": "userDeleteAccessToken", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "token to be deleted, identified by ID and if not available by name", + "name": "token", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + } + } + } + }, + "/version": { + "get": { + "produces": ["application/json"], + "tags": ["miscellaneous"], + "summary": "Returns the version of the running application", + "operationId": "getVersion", + "responses": { + "200": { + "$ref": "#/responses/ServerVersion" + } + } + } + } + }, + "definitions": { + "APIError": { + "description": "APIError is an api error with a message", + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "APIForbiddenError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/services/context" + }, + "APIInternalServerError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/services/context" + }, + "APIInvalidTopicsError": { + "type": "object", + "properties": { + "invalidTopics": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "InvalidTopics" + }, + "message": { + "type": "string", + "x-go-name": "Message" + } + }, + "x-go-package": "forgejo.org/services/context" + }, + "APINotFound": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Errors" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/services/context" + }, + "APIRepoArchivedError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/services/context" + }, + "APIUnauthorizedError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/services/context" + }, + "APIValidationError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/services/context" + }, + "AccessToken": { + "type": "object", + "title": "AccessToken represents an API access token.", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Scopes" + }, + "sha1": { + "type": "string", + "x-go-name": "Token" + }, + "token_last_eight": { + "type": "string", + "x-go-name": "TokenLastEight" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ActionRun": { + "description": "ActionRun represents an action run", + "type": "object", + "properties": { + "ScheduleID": { + "description": "the cron id for the schedule trigger", + "type": "integer", + "format": "int64" + }, + "approved_by": { + "description": "who approved this action run", + "type": "integer", + "format": "int64", + "x-go-name": "ApprovedBy" + }, + "commit_sha": { + "description": "the commit sha the action run ran on", + "type": "string", + "x-go-name": "CommitSHA" + }, + "created": { + "description": "when the action run was created", + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "duration": { + "$ref": "#/definitions/Duration" + }, + "event": { + "description": "the webhook event that causes the workflow to run", + "type": "string", + "x-go-name": "Event" + }, + "event_payload": { + "description": "the payload of the webhook event that causes the workflow to run", + "type": "string", + "x-go-name": "EventPayload" + }, + "html_url": { + "description": "the url of this action run", + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "description": "the action run id", + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "index_in_repo": { + "description": "a unique number for each run of a repository", + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "is_fork_pull_request": { + "description": "If this is triggered by a PR from a forked repository or an untrusted user, we need to check if it is approved and limit permissions when running the workflow.", + "type": "boolean", + "x-go-name": "IsForkPullRequest" + }, + "is_ref_deleted": { + "description": "has the commit/tag/… the action run ran on been deleted", + "type": "boolean", + "x-go-name": "IsRefDeleted" + }, + "need_approval": { + "description": "may need approval if it's a fork pull request", + "type": "boolean", + "x-go-name": "NeedApproval" + }, + "prettyref": { + "description": "the commit/tag/… the action run ran on", + "type": "string", + "x-go-name": "PrettyRef" + }, + "repository": { + "$ref": "#/definitions/Repository" + }, + "started": { + "description": "when the action run was started", + "type": "string", + "format": "date-time", + "x-go-name": "Started" + }, + "status": { + "description": "the current status of this run", + "type": "string", + "x-go-name": "Status" + }, + "stopped": { + "description": "when the action run was stopped", + "type": "string", + "format": "date-time", + "x-go-name": "Stopped" + }, + "title": { + "description": "the action run's title", + "type": "string", + "x-go-name": "Title" + }, + "trigger_event": { + "description": "the trigger event defined in the `on` configuration of the triggered workflow", + "type": "string", + "x-go-name": "TriggerEvent" + }, + "trigger_user": { + "$ref": "#/definitions/User" + }, + "updated": { + "description": "when the action run was last updated", + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "workflow_id": { + "description": "the name of workflow file", + "type": "string", + "x-go-name": "WorkflowID" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ActionRunJob": { + "description": "ActionRunJob represents a job of a run", + "type": "object", + "properties": { + "id": { + "description": "the action run job id", + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "description": "the action run job name", + "type": "string", + "x-go-name": "Name" + }, + "needs": { + "description": "the action run job needed ids", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Needs" + }, + "owner_id": { + "description": "the owner id", + "type": "integer", + "format": "int64", + "x-go-name": "OwnerID" + }, + "repo_id": { + "description": "the repository id", + "type": "integer", + "format": "int64", + "x-go-name": "RepoID" + }, + "runs_on": { + "description": "the action run job labels to run on", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "RunsOn" + }, + "status": { + "description": "the action run job status", + "type": "string", + "x-go-name": "Status" + }, + "task_id": { + "description": "the action run job latest task id", + "type": "integer", + "format": "int64", + "x-go-name": "TaskID" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ActionTask": { + "description": "ActionTask represents a ActionTask", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "display_title": { + "type": "string", + "x-go-name": "DisplayTitle" + }, + "event": { + "type": "string", + "x-go-name": "Event" + }, + "head_branch": { + "type": "string", + "x-go-name": "HeadBranch" + }, + "head_sha": { + "type": "string", + "x-go-name": "HeadSHA" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "run_number": { + "type": "integer", + "format": "int64", + "x-go-name": "RunNumber" + }, + "run_started_at": { + "type": "string", + "format": "date-time", + "x-go-name": "RunStartedAt" + }, + "status": { + "type": "string", + "x-go-name": "Status" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "UpdatedAt" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "workflow_id": { + "type": "string", + "x-go-name": "WorkflowID" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ActionTaskResponse": { + "description": "ActionTaskResponse returns a ActionTask", + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCount" + }, + "workflow_runs": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionTask" + }, + "x-go-name": "Entries" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ActionVariable": { + "description": "ActionVariable return value of the query API", + "type": "object", + "properties": { + "data": { + "description": "the value of the variable", + "type": "string", + "x-go-name": "Data" + }, + "name": { + "description": "the name of the variable", + "type": "string", + "x-go-name": "Name" + }, + "owner_id": { + "description": "the owner to which the variable belongs", + "type": "integer", + "format": "int64", + "x-go-name": "OwnerID" + }, + "repo_id": { + "description": "the repository to which the variable belongs", + "type": "integer", + "format": "int64", + "x-go-name": "RepoID" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Activity": { + "type": "object", + "properties": { + "act_user": { + "$ref": "#/definitions/User" + }, + "act_user_id": { + "type": "integer", + "format": "int64", + "x-go-name": "ActUserID" + }, + "comment": { + "$ref": "#/definitions/Comment" + }, + "comment_id": { + "type": "integer", + "format": "int64", + "x-go-name": "CommentID" + }, + "content": { + "type": "string", + "x-go-name": "Content" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_private": { + "type": "boolean", + "x-go-name": "IsPrivate" + }, + "op_type": { + "description": "the type of action", + "type": "string", + "enum": [ + "create_repo", + "rename_repo", + "star_repo", + "watch_repo", + "commit_repo", + "create_issue", + "create_pull_request", + "transfer_repo", + "push_tag", + "comment_issue", + "merge_pull_request", + "close_issue", + "reopen_issue", + "close_pull_request", + "reopen_pull_request", + "delete_tag", + "delete_branch", + "mirror_sync_push", + "mirror_sync_create", + "mirror_sync_delete", + "approve_pull_request", + "reject_pull_request", + "comment_pull", + "publish_release", + "pull_review_dismissed", + "pull_request_ready_for_review", + "auto_merge_pull_request" + ], + "x-go-name": "OpType" + }, + "ref_name": { + "type": "string", + "x-go-name": "RefName" + }, + "repo": { + "$ref": "#/definitions/Repository" + }, + "repo_id": { + "type": "integer", + "format": "int64", + "x-go-name": "RepoID" + }, + "user_id": { + "type": "integer", + "format": "int64", + "x-go-name": "UserID" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ActivityPub": { + "description": "ActivityPub type", + "type": "object", + "properties": { + "@context": { + "type": "string", + "x-go-name": "Context" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "AddCollaboratorOption": { + "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository", + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": ["read", "write", "admin"], + "x-go-name": "Permission" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "AddTimeOption": { + "description": "AddTimeOption options for adding time to an issue", + "type": "object", + "required": ["time"], + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "time": { + "description": "time in seconds", + "type": "integer", + "format": "int64", + "x-go-name": "Time" + }, + "user_name": { + "description": "User who spent the time (optional)", + "type": "string", + "x-go-name": "User" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "AnnotatedTag": { + "description": "AnnotatedTag represents an annotated tag", + "type": "object", + "properties": { + "archive_download_count": { + "$ref": "#/definitions/TagArchiveDownloadCount" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "object": { + "$ref": "#/definitions/AnnotatedTagObject" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "tag": { + "type": "string", + "x-go-name": "Tag" + }, + "tagger": { + "$ref": "#/definitions/CommitUser" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "AnnotatedTagObject": { + "description": "AnnotatedTagObject contains meta information of the tag object", + "type": "object", + "properties": { + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Attachment": { + "description": "Attachment a generic attachment", + "type": "object", + "properties": { + "browser_download_url": { + "type": "string", + "x-go-name": "DownloadURL" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "download_count": { + "type": "integer", + "format": "int64", + "x-go-name": "DownloadCount" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "type": { + "type": "string", + "enum": ["attachment", "external"], + "x-go-name": "Type" + }, + "uuid": { + "type": "string", + "x-go-name": "UUID" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "BlockedUser": { + "type": "object", + "title": "BlockedUser represents a blocked user.", + "properties": { + "block_id": { + "type": "integer", + "format": "int64", + "x-go-name": "BlockID" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Branch": { + "description": "Branch represents a repository branch", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/PayloadCommit" + }, + "effective_branch_protection_name": { + "type": "string", + "x-go-name": "EffectiveBranchProtectionName" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "protected": { + "type": "boolean", + "x-go-name": "Protected" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "user_can_merge": { + "type": "boolean", + "x-go-name": "UserCanMerge" + }, + "user_can_push": { + "type": "boolean", + "x-go-name": "UserCanPush" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "BranchProtection": { + "description": "BranchProtection represents a branch protection for a repository", + "type": "object", + "properties": { + "apply_to_admins": { + "type": "boolean", + "x-go-name": "ApplyToAdmins" + }, + "approvals_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistTeams" + }, + "approvals_whitelist_username": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistUsernames" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "branch_name": { + "description": "Deprecated: true", + "type": "string", + "x-go-name": "BranchName" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistTeams" + }, + "merge_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistUsernames" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_deploy_keys": { + "type": "boolean", + "x-go-name": "PushWhitelistDeployKeys" + }, + "push_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistTeams" + }, + "push_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistUsernames" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "rule_name": { + "type": "string", + "x-go-name": "RuleName" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ChangeFileOperation": { + "description": "ChangeFileOperation for creating, updating or deleting a file", + "type": "object", + "required": ["operation", "path"], + "properties": { + "content": { + "description": "new or updated file content, must be base64 encoded", + "type": "string", + "x-go-name": "ContentBase64" + }, + "from_path": { + "description": "old path of the file to move", + "type": "string", + "x-go-name": "FromPath" + }, + "operation": { + "description": "indicates what to do with the file", + "type": "string", + "enum": ["create", "update", "delete"], + "x-go-name": "Operation" + }, + "path": { + "description": "path to the existing or new file", + "type": "string", + "x-go-name": "Path" + }, + "sha": { + "description": "sha is the SHA for the file that already exists, required for update or delete", + "type": "string", + "x-go-name": "SHA" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ChangeFilesOptions": { + "description": "ChangeFilesOptions options for creating, updating or deleting multiple files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": ["files"], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, + "files": { + "description": "list of file operations", + "type": "array", + "items": { + "$ref": "#/definitions/ChangeFileOperation" + }, + "x-go-name": "Files" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "signoff": { + "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", + "type": "boolean", + "x-go-name": "Signoff" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ChangedFile": { + "description": "ChangedFile store information about files affected by the pull request", + "type": "object", + "properties": { + "additions": { + "type": "integer", + "format": "int64", + "x-go-name": "Additions" + }, + "changes": { + "type": "integer", + "format": "int64", + "x-go-name": "Changes" + }, + "contents_url": { + "type": "string", + "x-go-name": "ContentsURL" + }, + "deletions": { + "type": "integer", + "format": "int64", + "x-go-name": "Deletions" + }, + "filename": { + "type": "string", + "x-go-name": "Filename" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "previous_filename": { + "type": "string", + "x-go-name": "PreviousFilename" + }, + "raw_url": { + "type": "string", + "x-go-name": "RawURL" + }, + "status": { + "type": "string", + "x-go-name": "Status" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CombinedStatus": { + "description": "CombinedStatus holds the combined state of several statuses for a single commit", + "type": "object", + "properties": { + "commit_url": { + "type": "string", + "x-go-name": "CommitURL" + }, + "repository": { + "$ref": "#/definitions/Repository" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "state": { + "$ref": "#/definitions/CommitStatusState" + }, + "statuses": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitStatus" + }, + "x-go-name": "Statuses" + }, + "total_count": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCount" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Comment": { + "description": "Comment represents a comment on a commit or issue", + "type": "object", + "properties": { + "assets": { + "type": "array", + "items": { + "$ref": "#/definitions/Attachment" + }, + "x-go-name": "Attachments" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "issue_url": { + "type": "string", + "x-go-name": "IssueURL" + }, + "original_author": { + "type": "string", + "x-go-name": "OriginalAuthor" + }, + "original_author_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OriginalAuthorID" + }, + "pull_request_url": { + "type": "string", + "x-go-name": "PRURL" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Commit": { + "type": "object", + "title": "Commit contains information generated from a Git commit.", + "properties": { + "author": { + "$ref": "#/definitions/User" + }, + "commit": { + "$ref": "#/definitions/RepoCommit" + }, + "committer": { + "$ref": "#/definitions/User" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitAffectedFiles" + }, + "x-go-name": "Files" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "parents": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitMeta" + }, + "x-go-name": "Parents" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "stats": { + "$ref": "#/definitions/CommitStats" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CommitAffectedFiles": { + "description": "CommitAffectedFiles store information about files affected by the commit", + "type": "object", + "properties": { + "filename": { + "type": "string", + "x-go-name": "Filename" + }, + "status": { + "type": "string", + "x-go-name": "Status" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CommitDateOptions": { + "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE", + "type": "object", + "properties": { + "author": { + "type": "string", + "format": "date-time", + "x-go-name": "Author" + }, + "committer": { + "type": "string", + "format": "date-time", + "x-go-name": "Committer" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CommitMeta": { + "type": "object", + "title": "CommitMeta contains meta information of a commit in terms of API.", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CommitStats": { + "description": "CommitStats is statistics for a RepoCommit", + "type": "object", + "properties": { + "additions": { + "type": "integer", + "format": "int64", + "x-go-name": "Additions" + }, + "deletions": { + "type": "integer", + "format": "int64", + "x-go-name": "Deletions" + }, + "total": { + "type": "integer", + "format": "int64", + "x-go-name": "Total" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CommitStatus": { + "description": "CommitStatus holds a single status of a single Commit", + "type": "object", + "properties": { + "context": { + "type": "string", + "x-go-name": "Context" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "creator": { + "$ref": "#/definitions/User" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "status": { + "$ref": "#/definitions/CommitStatusState" + }, + "target_url": { + "type": "string", + "x-go-name": "TargetURL" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CommitStatusState": { + "description": "CommitStatusState holds the state of a CommitStatus\nIt can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\"", + "type": "string", + "x-go-package": "forgejo.org/modules/structs" + }, + "CommitUser": { + "type": "object", + "title": "CommitUser contains information of a user in the context of a commit.", + "properties": { + "date": { + "type": "string", + "x-go-name": "Date" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Compare": { + "type": "object", + "title": "Compare represents a comparison between two commits.", + "properties": { + "commits": { + "type": "array", + "items": { + "$ref": "#/definitions/Commit" + }, + "x-go-name": "Commits" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitAffectedFiles" + }, + "x-go-name": "Files" + }, + "total_commits": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCommits" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ContentsResponse": { + "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content", + "type": "object", + "properties": { + "_links": { + "$ref": "#/definitions/FileLinksResponse" + }, + "content": { + "description": "`content` is populated when `type` is `file`, otherwise null", + "type": "string", + "x-go-name": "Content" + }, + "download_url": { + "type": "string", + "x-go-name": "DownloadURL" + }, + "encoding": { + "description": "`encoding` is populated when `type` is `file`, otherwise null", + "type": "string", + "x-go-name": "Encoding" + }, + "git_url": { + "type": "string", + "x-go-name": "GitURL" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "last_commit_sha": { + "type": "string", + "x-go-name": "LastCommitSHA" + }, + "last_commit_when": { + "type": "string", + "format": "date-time", + "x-go-name": "LastCommitWhen" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "path": { + "type": "string", + "x-go-name": "Path" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "submodule_git_url": { + "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null", + "type": "string", + "x-go-name": "SubmoduleGitURL" + }, + "target": { + "description": "`target` is populated when `type` is `symlink`, otherwise null", + "type": "string", + "x-go-name": "Target" + }, + "type": { + "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`", + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateAccessTokenOption": { + "description": "CreateAccessTokenOption options when create access token", + "type": "object", + "required": ["name"], + "properties": { + "name": { + "type": "string", + "x-go-name": "Name" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Scopes", + "example": [ + "all", + "read:activitypub", + "read:issue", + "write:misc", + "read:notification", + "read:organization", + "read:package", + "read:repository", + "read:user" + ] + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateBranchProtectionOption": { + "description": "CreateBranchProtectionOption options for creating a branch protection", + "type": "object", + "properties": { + "apply_to_admins": { + "type": "boolean", + "x-go-name": "ApplyToAdmins" + }, + "approvals_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistTeams" + }, + "approvals_whitelist_username": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistUsernames" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "branch_name": { + "description": "Deprecated: true", + "type": "string", + "x-go-name": "BranchName" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistTeams" + }, + "merge_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistUsernames" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_deploy_keys": { + "type": "boolean", + "x-go-name": "PushWhitelistDeployKeys" + }, + "push_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistTeams" + }, + "push_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistUsernames" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "rule_name": { + "type": "string", + "x-go-name": "RuleName" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateBranchRepoOption": { + "description": "CreateBranchRepoOption options when creating a branch in a repository", + "type": "object", + "required": ["new_branch_name"], + "properties": { + "new_branch_name": { + "description": "Name of the branch to create", + "type": "string", + "uniqueItems": true, + "x-go-name": "BranchName" + }, + "old_branch_name": { + "description": "Deprecated: true\nName of the old branch to create from", + "type": "string", + "uniqueItems": true, + "x-go-name": "OldBranchName" + }, + "old_ref_name": { + "description": "Name of the old branch/tag/commit to create from", + "type": "string", + "uniqueItems": true, + "x-go-name": "OldRefName" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateEmailOption": { + "description": "CreateEmailOption options when creating email addresses", + "type": "object", + "properties": { + "emails": { + "description": "email addresses to add", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Emails" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateFileOptions": { + "description": "CreateFileOptions options for creating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": ["content"], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "content": { + "description": "content must be base64 encoded", + "type": "string", + "x-go-name": "ContentBase64" + }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "signoff": { + "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", + "type": "boolean", + "x-go-name": "Signoff" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateForkOption": { + "description": "CreateForkOption options for creating a fork", + "type": "object", + "properties": { + "name": { + "description": "name of the forked repository", + "type": "string", + "x-go-name": "Name" + }, + "organization": { + "description": "organization name, if forking into an organization", + "type": "string", + "x-go-name": "Organization" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateGPGKeyOption": { + "description": "CreateGPGKeyOption options create user GPG key", + "type": "object", + "required": ["armored_public_key"], + "properties": { + "armored_public_key": { + "description": "An armored GPG key to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "ArmoredKey" + }, + "armored_signature": { + "type": "string", + "x-go-name": "Signature" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateHookOption": { + "description": "CreateHookOption options when create a hook", + "type": "object", + "required": ["type", "config"], + "properties": { + "active": { + "type": "boolean", + "default": false, + "x-go-name": "Active" + }, + "authorization_header": { + "type": "string", + "x-go-name": "AuthorizationHeader" + }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, + "config": { + "$ref": "#/definitions/CreateHookOptionConfig" + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + }, + "type": { + "type": "string", + "enum": [ + "forgejo", + "dingtalk", + "discord", + "gitea", + "gogs", + "msteams", + "slack", + "telegram", + "feishu", + "wechatwork", + "packagist" + ], + "x-go-name": "Type" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateHookOptionConfig": { + "description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateIssueCommentOption": { + "description": "CreateIssueCommentOption options for creating a comment on an issue", + "type": "object", + "required": ["body"], + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateIssueOption": { + "description": "CreateIssueOption options to create one issue", + "type": "object", + "required": ["title"], + "properties": { + "assignee": { + "description": "deprecated", + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "closed": { + "type": "boolean", + "x-go-name": "Closed" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "labels": { + "description": "list of label ids", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + }, + "milestone": { + "description": "milestone id", + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateKeyOption": { + "description": "CreateKeyOption options when creating a key", + "type": "object", + "required": ["title", "key"], + "properties": { + "key": { + "description": "An armored SSH key to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "Key" + }, + "read_only": { + "description": "Describe if the key has only read access or read/write", + "type": "boolean", + "x-go-name": "ReadOnly" + }, + "title": { + "description": "Title of the key to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "Title" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateLabelOption": { + "description": "CreateLabelOption options for creating a label", + "type": "object", + "required": ["name", "color"], + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "#00aabb" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "exclusive": { + "type": "boolean", + "x-go-name": "Exclusive", + "example": false + }, + "is_archived": { + "type": "boolean", + "x-go-name": "IsArchived", + "example": false + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateMilestoneOption": { + "description": "CreateMilestoneOption options for creating a milestone", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "state": { + "type": "string", + "enum": ["open", "closed"], + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateOAuth2ApplicationOptions": { + "description": "CreateOAuth2ApplicationOptions holds options to create an oauth2 application", + "type": "object", + "properties": { + "confidential_client": { + "type": "boolean", + "x-go-name": "ConfidentialClient" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "redirect_uris": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "RedirectURIs" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateOrUpdateSecretOption": { + "description": "CreateOrUpdateSecretOption options when creating or updating secret", + "type": "object", + "required": ["data"], + "properties": { + "data": { + "description": "Data of the secret to update", + "type": "string", + "x-go-name": "Data" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateOrgOption": { + "description": "CreateOrgOption options for creating an organization", + "type": "object", + "required": ["username"], + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "email": { + "type": "string", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + }, + "visibility": { + "description": "possible values are `public` (default), `limited` or `private`", + "type": "string", + "enum": ["public", "limited", "private"], + "x-go-name": "Visibility" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreatePullRequestOption": { + "description": "CreatePullRequestOption options when creating a pull request", + "type": "object", + "properties": { + "assignee": { + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "base": { + "type": "string", + "x-go-name": "Base" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "head": { + "type": "string", + "x-go-name": "Head" + }, + "labels": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + }, + "milestone": { + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreatePullReviewComment": { + "description": "CreatePullReviewComment represent a review comment for creation api", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "new_position": { + "description": "if comment to new file line or 0", + "type": "integer", + "format": "int64", + "x-go-name": "NewLineNum" + }, + "old_position": { + "description": "if comment to old file line or 0", + "type": "integer", + "format": "int64", + "x-go-name": "OldLineNum" + }, + "path": { + "description": "the tree path", + "type": "string", + "x-go-name": "Path" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreatePullReviewCommentOptions": { + "$ref": "#/definitions/CreatePullReviewComment" + }, + "CreatePullReviewOptions": { + "description": "CreatePullReviewOptions are options to create a pull review", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "comments": { + "type": "array", + "items": { + "$ref": "#/definitions/CreatePullReviewComment" + }, + "x-go-name": "Comments" + }, + "commit_id": { + "type": "string", + "x-go-name": "CommitID" + }, + "event": { + "$ref": "#/definitions/ReviewStateType" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreatePushMirrorOption": { + "type": "object", + "title": "CreatePushMirrorOption represents need information to create a push mirror of a repository.", + "properties": { + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, + "interval": { + "type": "string", + "x-go-name": "Interval" + }, + "remote_address": { + "type": "string", + "x-go-name": "RemoteAddress" + }, + "remote_password": { + "type": "string", + "x-go-name": "RemotePassword" + }, + "remote_username": { + "type": "string", + "x-go-name": "RemoteUsername" + }, + "sync_on_commit": { + "type": "boolean", + "x-go-name": "SyncOnCommit" + }, + "use_ssh": { + "type": "boolean", + "x-go-name": "UseSSH" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateQuotaGroupOptions": { + "description": "CreateQutaGroupOptions represents the options for creating a quota group", + "type": "object", + "properties": { + "name": { + "description": "Name of the quota group to create", + "type": "string", + "x-go-name": "Name" + }, + "rules": { + "description": "Rules to add to the newly created group.\nIf a rule does not exist, it will be created.", + "type": "array", + "items": { + "$ref": "#/definitions/CreateQuotaRuleOptions" + }, + "x-go-name": "Rules" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateQuotaRuleOptions": { + "description": "CreateQuotaRuleOptions represents the options for creating a quota rule", + "type": "object", + "properties": { + "limit": { + "description": "The limit set by the rule", + "type": "integer", + "format": "int64", + "x-go-name": "Limit" + }, + "name": { + "description": "Name of the rule to create", + "type": "string", + "x-go-name": "Name" + }, + "subjects": { + "description": "The subjects affected by the rule", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Subjects" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateReleaseOption": { + "description": "CreateReleaseOption options when creating a release", + "type": "object", + "required": ["tag_name"], + "properties": { + "body": { + "type": "string", + "x-go-name": "Note" + }, + "draft": { + "type": "boolean", + "x-go-name": "IsDraft" + }, + "hide_archive_links": { + "type": "boolean", + "x-go-name": "HideArchiveLinks" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateRepoOption": { + "description": "CreateRepoOption options when creating repository", + "type": "object", + "required": ["name"], + "properties": { + "auto_init": { + "description": "Whether the repository should be auto-initialized?", + "type": "boolean", + "x-go-name": "AutoInit" + }, + "default_branch": { + "description": "DefaultBranch of the repository (used when initializes and in template)", + "type": "string", + "x-go-name": "DefaultBranch" + }, + "description": { + "description": "Description of the repository to create", + "type": "string", + "x-go-name": "Description" + }, + "gitignores": { + "description": "Gitignores to use", + "type": "string", + "x-go-name": "Gitignores" + }, + "issue_labels": { + "description": "Label-Set to use", + "type": "string", + "x-go-name": "IssueLabels" + }, + "license": { + "description": "License to use", + "type": "string", + "x-go-name": "License" + }, + "name": { + "description": "Name of the repository to create", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + }, + "object_format_name": { + "description": "ObjectFormatName of the underlying git repository", + "type": "string", + "enum": ["sha1", "sha256"], + "x-go-name": "ObjectFormatName" + }, + "private": { + "description": "Whether the repository is private", + "type": "boolean", + "x-go-name": "Private" + }, + "readme": { + "description": "Readme of the repository to create", + "type": "string", + "x-go-name": "Readme" + }, + "template": { + "description": "Whether the repository is template", + "type": "boolean", + "x-go-name": "Template" + }, + "trust_model": { + "description": "TrustModel of the repository", + "type": "string", + "enum": [ + "default", + "collaborator", + "committer", + "collaboratorcommitter" + ], + "x-go-name": "TrustModel" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateStatusOption": { + "description": "CreateStatusOption holds the information needed to create a new CommitStatus for a Commit", + "type": "object", + "properties": { + "context": { + "type": "string", + "x-go-name": "Context" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "state": { + "$ref": "#/definitions/CommitStatusState" + }, + "target_url": { + "type": "string", + "x-go-name": "TargetURL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateTagOption": { + "description": "CreateTagOption options when creating a tag", + "type": "object", + "required": ["tag_name"], + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "target": { + "type": "string", + "x-go-name": "Target" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateTagProtectionOption": { + "description": "CreateTagProtectionOption options for creating a tag protection", + "type": "object", + "properties": { + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + }, + "whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistUsernames" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateTeamOption": { + "description": "CreateTeamOption options for creating a team", + "type": "object", + "required": ["name"], + "properties": { + "can_create_org_repo": { + "type": "boolean", + "x-go-name": "CanCreateOrgRepo" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "includes_all_repositories": { + "type": "boolean", + "x-go-name": "IncludesAllRepositories" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "permission": { + "type": "string", + "enum": ["read", "write", "admin"], + "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.actions", + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.ext_wiki", + "repo.pulls", + "repo.releases", + "repo.projects", + "repo.ext_wiki" + ] + }, + "units_map": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "UnitsMap", + "example": "{\"repo.actions\",\"repo.packages\",\"repo.code\":\"read\",\"repo.issues\":\"write\",\"repo.ext_issues\":\"none\",\"repo.wiki\":\"admin\",\"repo.pulls\":\"owner\",\"repo.releases\":\"none\",\"repo.projects\":\"none\",\"repo.ext_wiki\":\"none\"}" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateUserOption": { + "description": "CreateUserOption create user options", + "type": "object", + "required": ["username", "email"], + "properties": { + "created_at": { + "description": "For explicitly setting the user creation timestamp. Useful when users are\nmigrated from other systems. When omitted, the user's creation timestamp\nwill be set to \"now\".", + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "login_name": { + "type": "string", + "x-go-name": "LoginName" + }, + "must_change_password": { + "type": "boolean", + "x-go-name": "MustChangePassword" + }, + "password": { + "type": "string", + "x-go-name": "Password" + }, + "restricted": { + "type": "boolean", + "x-go-name": "Restricted" + }, + "send_notify": { + "type": "boolean", + "x-go-name": "SendNotify" + }, + "source_id": { + "type": "integer", + "format": "int64", + "x-go-name": "SourceID" + }, + "username": { + "type": "string", + "x-go-name": "Username" + }, + "visibility": { + "type": "string", + "x-go-name": "Visibility" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateVariableOption": { + "description": "CreateVariableOption the option when creating variable", + "type": "object", + "required": ["value"], + "properties": { + "value": { + "description": "Value of the variable to create", + "type": "string", + "x-go-name": "Value" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "CreateWikiPageOptions": { + "description": "CreateWikiPageOptions form for creating wiki", + "type": "object", + "properties": { + "content_base64": { + "description": "content must be base64 encoded", + "type": "string", + "x-go-name": "ContentBase64" + }, + "message": { + "description": "optional commit message summarizing the change", + "type": "string", + "x-go-name": "Message" + }, + "title": { + "description": "page title. leave empty to keep unchanged", + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Cron": { + "description": "Cron represents a Cron task", + "type": "object", + "properties": { + "exec_times": { + "type": "integer", + "format": "int64", + "x-go-name": "ExecTimes" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "next": { + "type": "string", + "format": "date-time", + "x-go-name": "Next" + }, + "prev": { + "type": "string", + "format": "date-time", + "x-go-name": "Prev" + }, + "schedule": { + "type": "string", + "x-go-name": "Schedule" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "DeleteEmailOption": { + "description": "DeleteEmailOption options when deleting email addresses", + "type": "object", + "properties": { + "emails": { + "description": "email addresses to delete", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Emails" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "DeleteFileOptions": { + "description": "DeleteFileOptions options for deleting files (used for other File structs below)\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": ["sha"], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "sha": { + "description": "sha is the SHA for the file that already exists", + "type": "string", + "x-go-name": "SHA" + }, + "signoff": { + "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", + "type": "boolean", + "x-go-name": "Signoff" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "DeleteLabelsOption": { + "description": "DeleteLabelOption options for deleting a label", + "type": "object", + "properties": { + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "DeployKey": { + "description": "DeployKey a deploy key", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "fingerprint": { + "type": "string", + "x-go-name": "Fingerprint" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "key": { + "type": "string", + "x-go-name": "Key" + }, + "key_id": { + "type": "integer", + "format": "int64", + "x-go-name": "KeyID" + }, + "read_only": { + "type": "boolean", + "x-go-name": "ReadOnly" + }, + "repository": { + "$ref": "#/definitions/Repository" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "DismissPullReviewOptions": { + "description": "DismissPullReviewOptions are options to dismiss a pull review", + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "priors": { + "type": "boolean", + "x-go-name": "Priors" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "DispatchWorkflowOption": { + "description": "DispatchWorkflowOption options when dispatching a workflow", + "type": "object", + "required": ["ref"], + "properties": { + "inputs": { + "description": "Input keys and values configured in the workflow file.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Inputs" + }, + "ref": { + "description": "Git reference for the workflow", + "type": "string", + "x-go-name": "Ref" + }, + "return_run_info": { + "description": "Flag to return the run info", + "type": "boolean", + "default": false, + "x-go-name": "ReturnRunInfo" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "DispatchWorkflowRun": { + "description": "DispatchWorkflowRun represents a workflow run", + "type": "object", + "properties": { + "id": { + "description": "the workflow run id", + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "jobs": { + "description": "the jobs name", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Jobs" + }, + "run_number": { + "description": "a unique number for each run of a repository", + "type": "integer", + "format": "int64", + "x-go-name": "RunNumber" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Duration": { + "description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.", + "type": "integer", + "format": "int64", + "x-go-package": "time" + }, + "EditAttachmentOptions": { + "description": "EditAttachmentOptions options for editing attachments", + "type": "object", + "properties": { + "browser_download_url": { + "description": "(Can only be set if existing attachment is of external type)", + "type": "string", + "x-go-name": "DownloadURL" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditBranchProtectionOption": { + "description": "EditBranchProtectionOption options for editing a branch protection", + "type": "object", + "properties": { + "apply_to_admins": { + "type": "boolean", + "x-go-name": "ApplyToAdmins" + }, + "approvals_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistTeams" + }, + "approvals_whitelist_username": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistUsernames" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistTeams" + }, + "merge_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistUsernames" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_deploy_keys": { + "type": "boolean", + "x-go-name": "PushWhitelistDeployKeys" + }, + "push_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistTeams" + }, + "push_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistUsernames" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditDeadlineOption": { + "description": "EditDeadlineOption options for creating a deadline", + "type": "object", + "required": ["due_date"], + "properties": { + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditGitHookOption": { + "description": "EditGitHookOption options when modifying one Git hook", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditHookOption": { + "description": "EditHookOption options when modify one hook", + "type": "object", + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "authorization_header": { + "type": "string", + "x-go-name": "AuthorizationHeader" + }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Config" + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditIssueCommentOption": { + "description": "EditIssueCommentOption options for editing a comment", + "type": "object", + "required": ["body"], + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditIssueOption": { + "description": "EditIssueOption options for editing an issue", + "type": "object", + "properties": { + "assignee": { + "description": "deprecated", + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "milestone": { + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "state": { + "type": "string", + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "unset_due_date": { + "type": "boolean", + "x-go-name": "RemoveDeadline" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditLabelOption": { + "description": "EditLabelOption options for editing a label", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "#00aabb" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "exclusive": { + "type": "boolean", + "x-go-name": "Exclusive", + "example": false + }, + "is_archived": { + "type": "boolean", + "x-go-name": "IsArchived", + "example": false + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditMilestoneOption": { + "description": "EditMilestoneOption options for editing a milestone", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "state": { + "type": "string", + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditOrgOption": { + "description": "EditOrgOption options for editing an organization", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "email": { + "type": "string", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, + "visibility": { + "description": "possible values are `public`, `limited` or `private`", + "type": "string", + "enum": ["public", "limited", "private"], + "x-go-name": "Visibility" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditPullRequestOption": { + "description": "EditPullRequestOption options when modify pull request", + "type": "object", + "properties": { + "allow_maintainer_edit": { + "type": "boolean", + "x-go-name": "AllowMaintainerEdit" + }, + "assignee": { + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "base": { + "type": "string", + "x-go-name": "Base" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "labels": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + }, + "milestone": { + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "state": { + "type": "string", + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "unset_due_date": { + "type": "boolean", + "x-go-name": "RemoveDeadline" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditQuotaRuleOptions": { + "description": "EditQuotaRuleOptions represents the options for editing a quota rule", + "type": "object", + "properties": { + "limit": { + "description": "The limit set by the rule", + "type": "integer", + "format": "int64", + "x-go-name": "Limit" + }, + "subjects": { + "description": "The subjects affected by the rule", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Subjects" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditReactionOption": { + "description": "EditReactionOption contain the reaction type", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Reaction" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditReleaseOption": { + "description": "EditReleaseOption options when editing a release", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Note" + }, + "draft": { + "type": "boolean", + "x-go-name": "IsDraft" + }, + "hide_archive_links": { + "type": "boolean", + "x-go-name": "HideArchiveLinks" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditRepoOption": { + "description": "EditRepoOption options when editing a repository's properties", + "type": "object", + "properties": { + "allow_fast_forward_only_merge": { + "description": "either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging.", + "type": "boolean", + "x-go-name": "AllowFastForwardOnly" + }, + "allow_manual_merge": { + "description": "either `true` to allow mark pr as merged manually, or `false` to prevent it.", + "type": "boolean", + "x-go-name": "AllowManualMerge" + }, + "allow_merge_commits": { + "description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.", + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.", + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_explicit": { + "description": "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits.", + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_rebase_update": { + "description": "either `true` to allow updating pull request branch by rebase, or `false` to prevent it.", + "type": "boolean", + "x-go-name": "AllowRebaseUpdate" + }, + "allow_squash_merge": { + "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.", + "type": "boolean", + "x-go-name": "AllowSquash" + }, + "archived": { + "description": "set to `true` to archive this repository.", + "type": "boolean", + "x-go-name": "Archived" + }, + "autodetect_manual_merge": { + "description": "either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur.", + "type": "boolean", + "x-go-name": "AutodetectManualMerge" + }, + "default_allow_maintainer_edit": { + "description": "set to `true` to allow edits from maintainers by default", + "type": "boolean", + "x-go-name": "DefaultAllowMaintainerEdit" + }, + "default_branch": { + "description": "sets the default branch for this repository.", + "type": "string", + "x-go-name": "DefaultBranch" + }, + "default_delete_branch_after_merge": { + "description": "set to `true` to delete pr branch after merge by default", + "type": "boolean", + "x-go-name": "DefaultDeleteBranchAfterMerge" + }, + "default_merge_style": { + "description": "set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", \"fast-forward-only\", \"manually-merged\", or \"rebase-update-only\".", + "type": "string", + "x-go-name": "DefaultMergeStyle" + }, + "default_update_style": { + "description": "set to a update style to be used by this repository: \"rebase\" or \"merge\"", + "type": "string", + "x-go-name": "DefaultUpdateStyle" + }, + "description": { + "description": "a short description of the repository.", + "type": "string", + "x-go-name": "Description" + }, + "enable_prune": { + "description": "enable prune - remove obsolete remote-tracking references when mirroring", + "type": "boolean", + "x-go-name": "EnablePrune" + }, + "external_tracker": { + "$ref": "#/definitions/ExternalTracker" + }, + "external_wiki": { + "$ref": "#/definitions/ExternalWiki" + }, + "globally_editable_wiki": { + "description": "set the globally editable state of the wiki", + "type": "boolean", + "x-go-name": "GloballyEditableWiki" + }, + "has_actions": { + "description": "either `true` to enable actions unit, or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasActions" + }, + "has_issues": { + "description": "either `true` to enable issues for this repository or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasIssues" + }, + "has_packages": { + "description": "either `true` to enable packages unit, or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasPackages" + }, + "has_projects": { + "description": "either `true` to enable project unit, or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasProjects" + }, + "has_pull_requests": { + "description": "either `true` to allow pull requests, or `false` to prevent pull request.", + "type": "boolean", + "x-go-name": "HasPullRequests" + }, + "has_releases": { + "description": "either `true` to enable releases unit, or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasReleases" + }, + "has_wiki": { + "description": "either `true` to enable the wiki for this repository or `false` to disable it.", + "type": "boolean", + "x-go-name": "HasWiki" + }, + "ignore_whitespace_conflicts": { + "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace.", + "type": "boolean", + "x-go-name": "IgnoreWhitespaceConflicts" + }, + "internal_tracker": { + "$ref": "#/definitions/InternalTracker" + }, + "mirror_interval": { + "description": "set to a string like `8h30m0s` to set the mirror interval time", + "type": "string", + "x-go-name": "MirrorInterval" + }, + "name": { + "description": "name of the repository", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + }, + "private": { + "description": "either `true` to make the repository private or `false` to make it public.\nNote: you will get a 422 error if the organization restricts changing repository visibility to organization\nowners and a non-owner tries to change the value of private.", + "type": "boolean", + "x-go-name": "Private" + }, + "template": { + "description": "either `true` to make this repository a template or `false` to make it a normal repository", + "type": "boolean", + "x-go-name": "Template" + }, + "website": { + "description": "a URL with more information about the repository.", + "type": "string", + "x-go-name": "Website" + }, + "wiki_branch": { + "description": "sets the branch used for this repository's wiki.", + "type": "string", + "x-go-name": "WikiBranch" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditTagProtectionOption": { + "description": "EditTagProtectionOption options for editing a tag protection", + "type": "object", + "properties": { + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + }, + "whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistUsernames" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditTeamOption": { + "description": "EditTeamOption options for editing a team", + "type": "object", + "required": ["name"], + "properties": { + "can_create_org_repo": { + "type": "boolean", + "x-go-name": "CanCreateOrgRepo" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "includes_all_repositories": { + "type": "boolean", + "x-go-name": "IncludesAllRepositories" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "permission": { + "type": "string", + "enum": ["read", "write", "admin"], + "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.pulls", + "repo.releases", + "repo.projects", + "repo.ext_wiki" + ] + }, + "units_map": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "UnitsMap", + "example": { + "repo.code": "read", + "repo.ext_issues": "none", + "repo.ext_wiki": "none", + "repo.issues": "write", + "repo.projects": "none", + "repo.pulls": "owner", + "repo.releases": "none", + "repo.wiki": "admin" + } + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "EditUserOption": { + "description": "EditUserOption edit user options", + "type": "object", + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "admin": { + "type": "boolean", + "x-go-name": "Admin" + }, + "allow_create_organization": { + "type": "boolean", + "x-go-name": "AllowCreateOrganization" + }, + "allow_git_hook": { + "type": "boolean", + "x-go-name": "AllowGitHook" + }, + "allow_import_local": { + "type": "boolean", + "x-go-name": "AllowImportLocal" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "hide_email": { + "type": "boolean", + "x-go-name": "HideEmail" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "login_name": { + "type": "string", + "x-go-name": "LoginName" + }, + "max_repo_creation": { + "type": "integer", + "format": "int64", + "x-go-name": "MaxRepoCreation" + }, + "must_change_password": { + "type": "boolean", + "x-go-name": "MustChangePassword" + }, + "password": { + "type": "string", + "x-go-name": "Password" + }, + "prohibit_login": { + "type": "boolean", + "x-go-name": "ProhibitLogin" + }, + "pronouns": { + "type": "string", + "x-go-name": "Pronouns" + }, + "restricted": { + "type": "boolean", + "x-go-name": "Restricted" + }, + "source_id": { + "type": "integer", + "format": "int64", + "x-go-name": "SourceID" + }, + "visibility": { + "type": "string", + "x-go-name": "Visibility" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Email": { + "description": "Email an email address belonging to a user", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "primary": { + "type": "boolean", + "x-go-name": "Primary" + }, + "user_id": { + "type": "integer", + "format": "int64", + "x-go-name": "UserID" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ExternalTracker": { + "description": "ExternalTracker represents settings for external tracker", + "type": "object", + "properties": { + "external_tracker_format": { + "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.", + "type": "string", + "x-go-name": "ExternalTrackerFormat" + }, + "external_tracker_regexp_pattern": { + "description": "External Issue Tracker issue regular expression", + "type": "string", + "x-go-name": "ExternalTrackerRegexpPattern" + }, + "external_tracker_style": { + "description": "External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp`", + "type": "string", + "x-go-name": "ExternalTrackerStyle" + }, + "external_tracker_url": { + "description": "URL of external issue tracker.", + "type": "string", + "x-go-name": "ExternalTrackerURL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ExternalWiki": { + "description": "ExternalWiki represents setting for external wiki", + "type": "object", + "properties": { + "external_wiki_url": { + "description": "URL of external wiki.", + "type": "string", + "x-go-name": "ExternalWikiURL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "FileCommitResponse": { + "type": "object", + "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.", + "properties": { + "author": { + "$ref": "#/definitions/CommitUser" + }, + "committer": { + "$ref": "#/definitions/CommitUser" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "parents": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitMeta" + }, + "x-go-name": "Parents" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "tree": { + "$ref": "#/definitions/CommitMeta" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "FileDeleteResponse": { + "description": "FileDeleteResponse contains information about a repo's file that was deleted", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/FileCommitResponse" + }, + "content": { + "x-go-name": "Content" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "FileLinksResponse": { + "description": "FileLinksResponse contains the links for a repo's file", + "type": "object", + "properties": { + "git": { + "type": "string", + "x-go-name": "GitURL" + }, + "html": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "self": { + "type": "string", + "x-go-name": "Self" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "FileResponse": { + "description": "FileResponse contains information about a repo's file", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/FileCommitResponse" + }, + "content": { + "$ref": "#/definitions/ContentsResponse" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "FilesResponse": { + "description": "FilesResponse contains information about multiple files from a repo", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/FileCommitResponse" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentsResponse" + }, + "x-go-name": "Files" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ForgeLike": { + "description": "ForgeLike activity data type", + "type": "object", + "x-go-package": "forgejo.org/modules/forgefed" + }, + "ForgeOutbox": { + "description": "ActivityStream OrderedCollection of activities", + "type": "object", + "x-go-package": "forgejo.org/modules/forgefed" + }, + "GPGKey": { + "description": "GPGKey a user GPG key to sign commit and tag in repository", + "type": "object", + "properties": { + "can_certify": { + "type": "boolean", + "x-go-name": "CanCertify" + }, + "can_encrypt_comms": { + "type": "boolean", + "x-go-name": "CanEncryptComms" + }, + "can_encrypt_storage": { + "type": "boolean", + "x-go-name": "CanEncryptStorage" + }, + "can_sign": { + "type": "boolean", + "x-go-name": "CanSign" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "emails": { + "type": "array", + "items": { + "$ref": "#/definitions/GPGKeyEmail" + }, + "x-go-name": "Emails" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Expires" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "key_id": { + "type": "string", + "x-go-name": "KeyID" + }, + "primary_key_id": { + "type": "string", + "x-go-name": "PrimaryKeyID" + }, + "public_key": { + "type": "string", + "x-go-name": "PublicKey" + }, + "subkeys": { + "type": "array", + "items": { + "$ref": "#/definitions/GPGKey" + }, + "x-go-name": "SubsKey" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GPGKeyEmail": { + "description": "GPGKeyEmail an email attached to a GPGKey", + "type": "object", + "properties": { + "email": { + "type": "string", + "x-go-name": "Email" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GeneralAPISettings": { + "description": "GeneralAPISettings contains global api settings exposed by it", + "type": "object", + "properties": { + "default_git_trees_per_page": { + "type": "integer", + "format": "int64", + "x-go-name": "DefaultGitTreesPerPage" + }, + "default_max_blob_size": { + "type": "integer", + "format": "int64", + "x-go-name": "DefaultMaxBlobSize" + }, + "default_paging_num": { + "type": "integer", + "format": "int64", + "x-go-name": "DefaultPagingNum" + }, + "max_response_items": { + "type": "integer", + "format": "int64", + "x-go-name": "MaxResponseItems" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GeneralAttachmentSettings": { + "description": "GeneralAttachmentSettings contains global Attachment settings exposed by API", + "type": "object", + "properties": { + "allowed_types": { + "type": "string", + "x-go-name": "AllowedTypes" + }, + "enabled": { + "type": "boolean", + "x-go-name": "Enabled" + }, + "max_files": { + "type": "integer", + "format": "int64", + "x-go-name": "MaxFiles" + }, + "max_size": { + "type": "integer", + "format": "int64", + "x-go-name": "MaxSize" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GeneralRepoSettings": { + "description": "GeneralRepoSettings contains global repository settings exposed by API", + "type": "object", + "properties": { + "forks_disabled": { + "type": "boolean", + "x-go-name": "ForksDisabled" + }, + "http_git_disabled": { + "type": "boolean", + "x-go-name": "HTTPGitDisabled" + }, + "lfs_disabled": { + "type": "boolean", + "x-go-name": "LFSDisabled" + }, + "migrations_disabled": { + "type": "boolean", + "x-go-name": "MigrationsDisabled" + }, + "mirrors_disabled": { + "type": "boolean", + "x-go-name": "MirrorsDisabled" + }, + "stars_disabled": { + "type": "boolean", + "x-go-name": "StarsDisabled" + }, + "time_tracking_disabled": { + "type": "boolean", + "x-go-name": "TimeTrackingDisabled" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GeneralUISettings": { + "description": "GeneralUISettings contains global ui settings exposed by API", + "type": "object", + "properties": { + "allowed_reactions": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "AllowedReactions" + }, + "custom_emojis": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "CustomEmojis" + }, + "default_theme": { + "type": "string", + "x-go-name": "DefaultTheme" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GenerateRepoOption": { + "description": "GenerateRepoOption options when creating repository using a template", + "type": "object", + "required": ["owner", "name"], + "properties": { + "avatar": { + "description": "include avatar of the template repo", + "type": "boolean", + "x-go-name": "Avatar" + }, + "default_branch": { + "description": "Default branch of the new repository", + "type": "string", + "x-go-name": "DefaultBranch" + }, + "description": { + "description": "Description of the repository to create", + "type": "string", + "x-go-name": "Description" + }, + "git_content": { + "description": "include git content of default branch in template repo", + "type": "boolean", + "x-go-name": "GitContent" + }, + "git_hooks": { + "description": "include git hooks in template repo", + "type": "boolean", + "x-go-name": "GitHooks" + }, + "labels": { + "description": "include labels in template repo", + "type": "boolean", + "x-go-name": "Labels" + }, + "name": { + "description": "Name of the repository to create", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + }, + "owner": { + "description": "The organization or person who will own the new repository", + "type": "string", + "x-go-name": "Owner" + }, + "private": { + "description": "Whether the repository is private", + "type": "boolean", + "x-go-name": "Private" + }, + "protected_branch": { + "description": "include protected branches in template repo", + "type": "boolean", + "x-go-name": "ProtectedBranch" + }, + "topics": { + "description": "include topics in template repo", + "type": "boolean", + "x-go-name": "Topics" + }, + "webhooks": { + "description": "include webhooks in template repo", + "type": "boolean", + "x-go-name": "Webhooks" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GitBlob": { + "description": "GitBlob represents a git blob", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + }, + "encoding": { + "type": "string", + "x-go-name": "Encoding" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GitEntry": { + "description": "GitEntry represents a git tree", + "type": "object", + "properties": { + "mode": { + "type": "string", + "x-go-name": "Mode" + }, + "path": { + "type": "string", + "x-go-name": "Path" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GitHook": { + "description": "GitHook represents a Git repository hook", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + }, + "is_active": { + "type": "boolean", + "x-go-name": "IsActive" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GitObject": { + "type": "object", + "title": "GitObject represents a Git object.", + "properties": { + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GitTreeResponse": { + "description": "GitTreeResponse returns a git tree", + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int64", + "x-go-name": "Page" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "total_count": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCount" + }, + "tree": { + "type": "array", + "items": { + "$ref": "#/definitions/GitEntry" + }, + "x-go-name": "Entries" + }, + "truncated": { + "type": "boolean", + "x-go-name": "Truncated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "GitignoreTemplateInfo": { + "description": "GitignoreTemplateInfo name and text of a gitignore template", + "type": "object", + "properties": { + "name": { + "type": "string", + "x-go-name": "Name" + }, + "source": { + "type": "string", + "x-go-name": "Source" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Hook": { + "description": "Hook a hook is a web hook when one repository changed", + "type": "object", + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "authorization_header": { + "type": "string", + "x-go-name": "AuthorizationHeader" + }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, + "config": { + "description": "Deprecated: use Metadata instead", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Config" + }, + "content_type": { + "type": "string", + "x-go-name": "ContentType" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "metadata": { + "x-go-name": "Metadata" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Identity": { + "description": "Identity for a person's identity like an author or committer", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "InternalTracker": { + "description": "InternalTracker represents settings for internal tracker", + "type": "object", + "properties": { + "allow_only_contributors_to_track_time": { + "description": "Let only contributors track time (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "AllowOnlyContributorsToTrackTime" + }, + "enable_issue_dependencies": { + "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "EnableIssueDependencies" + }, + "enable_time_tracker": { + "description": "Enable time tracking (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "EnableTimeTracker" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Issue": { + "description": "Issue represents an issue in a repository", + "type": "object", + "properties": { + "assets": { + "type": "array", + "items": { + "$ref": "#/definitions/Attachment" + }, + "x-go-name": "Attachments" + }, + "assignee": { + "$ref": "#/definitions/User" + }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + }, + "x-go-name": "Assignees" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "closed_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Closed" + }, + "comments": { + "type": "integer", + "format": "int64", + "x-go-name": "Comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_locked": { + "type": "boolean", + "x-go-name": "IsLocked" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/definitions/Label" + }, + "x-go-name": "Labels" + }, + "milestone": { + "$ref": "#/definitions/Milestone" + }, + "number": { + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "original_author": { + "type": "string", + "x-go-name": "OriginalAuthor" + }, + "original_author_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OriginalAuthorID" + }, + "pin_order": { + "type": "integer", + "format": "int64", + "x-go-name": "PinOrder" + }, + "pull_request": { + "$ref": "#/definitions/PullRequestMeta" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "repository": { + "$ref": "#/definitions/RepositoryMeta" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "IssueConfig": { + "type": "object", + "properties": { + "blank_issues_enabled": { + "type": "boolean", + "x-go-name": "BlankIssuesEnabled" + }, + "contact_links": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueConfigContactLink" + }, + "x-go-name": "ContactLinks" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "IssueConfigContactLink": { + "type": "object", + "properties": { + "about": { + "type": "string", + "x-go-name": "About" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "IssueConfigValidation": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "valid": { + "type": "boolean", + "x-go-name": "Valid" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "IssueDeadline": { + "description": "IssueDeadline represents an issue deadline", + "type": "object", + "properties": { + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "IssueFormField": { + "description": "IssueFormField represents a form field", + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": {}, + "x-go-name": "Attributes" + }, + "id": { + "type": "string", + "x-go-name": "ID" + }, + "type": { + "$ref": "#/definitions/IssueFormFieldType" + }, + "validations": { + "type": "object", + "additionalProperties": {}, + "x-go-name": "Validations" + }, + "visible": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueFormFieldVisible" + }, + "x-go-name": "Visible" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "IssueFormFieldType": { + "type": "string", + "title": "IssueFormFieldType defines issue form field type, can be \"markdown\", \"textarea\", \"input\", \"dropdown\" or \"checkboxes\"", + "x-go-package": "forgejo.org/modules/structs" + }, + "IssueFormFieldVisible": { + "description": "IssueFormFieldVisible defines issue form field visible", + "type": "string", + "x-go-package": "forgejo.org/modules/structs" + }, + "IssueLabelsOption": { + "description": "IssueLabelsOption a collection of labels", + "type": "object", + "properties": { + "labels": { + "description": "Labels can be a list of integers representing label IDs\nor a list of strings representing label names", + "type": "array", + "items": {}, + "x-go-name": "Labels" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "IssueMeta": { + "description": "IssueMeta basic issue information", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "owner": { + "type": "string", + "x-go-name": "Owner" + }, + "repo": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "IssueTemplate": { + "description": "IssueTemplate represents an issue template for a repository", + "type": "object", + "properties": { + "about": { + "type": "string", + "x-go-name": "About" + }, + "body": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueFormField" + }, + "x-go-name": "Fields" + }, + "content": { + "type": "string", + "x-go-name": "Content" + }, + "file_name": { + "type": "string", + "x-go-name": "FileName" + }, + "labels": { + "$ref": "#/definitions/IssueTemplateLabels" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "IssueTemplateLabels": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Label": { + "description": "Label a label to an issue or a pr", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "00aabb" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "exclusive": { + "type": "boolean", + "x-go-name": "Exclusive", + "example": false + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_archived": { + "type": "boolean", + "x-go-name": "IsArchived", + "example": false + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "LabelTemplate": { + "description": "LabelTemplate info of a Label template", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "00aabb" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "exclusive": { + "type": "boolean", + "x-go-name": "Exclusive", + "example": false + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "LicenseTemplateInfo": { + "description": "LicensesInfo contains information about a License", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "implementation": { + "type": "string", + "x-go-name": "Implementation" + }, + "key": { + "type": "string", + "x-go-name": "Key" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "LicensesTemplateListEntry": { + "description": "LicensesListEntry is used for the API", + "type": "object", + "properties": { + "key": { + "type": "string", + "x-go-name": "Key" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ListActionRunResponse": { + "description": "ListActionRunResponse return a list of ActionRun", + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCount" + }, + "workflow_runs": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionRun" + }, + "x-go-name": "Entries" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "MarkdownOption": { + "description": "MarkdownOption markdown options", + "type": "object", + "properties": { + "Context": { + "description": "Context to render\n\nin: body", + "type": "string" + }, + "Mode": { + "description": "Mode to render (comment, gfm, markdown)\n\nin: body", + "type": "string" + }, + "Text": { + "description": "Text markdown to render\n\nin: body", + "type": "string" + }, + "Wiki": { + "description": "Is it a wiki page ?\n\nin: body", + "type": "boolean" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "MarkupOption": { + "description": "MarkupOption markup options", + "type": "object", + "properties": { + "BranchPath": { + "description": "The current branch path where the form gets posted\n\nin: body", + "type": "string" + }, + "Context": { + "description": "Context to render\n\nin: body", + "type": "string" + }, + "FilePath": { + "description": "File path for detecting extension in file mode\n\nin: body", + "type": "string" + }, + "Mode": { + "description": "Mode to render (comment, gfm, markdown, file)\n\nin: body", + "type": "string" + }, + "Text": { + "description": "Text markup to render\n\nin: body", + "type": "string" + }, + "Wiki": { + "description": "Is it a wiki page ?\n\nin: body", + "type": "boolean" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "MergePullRequestOption": { + "description": "MergePullRequestForm form for merging Pull Request", + "type": "object", + "required": ["Do"], + "properties": { + "Do": { + "type": "string", + "enum": [ + "merge", + "rebase", + "rebase-merge", + "squash", + "fast-forward-only", + "manually-merged" + ] + }, + "MergeCommitID": { + "type": "string" + }, + "MergeMessageField": { + "type": "string" + }, + "MergeTitleField": { + "type": "string" + }, + "delete_branch_after_merge": { + "type": "boolean", + "x-go-name": "DeleteBranchAfterMerge" + }, + "force_merge": { + "type": "boolean", + "x-go-name": "ForceMerge" + }, + "head_commit_id": { + "type": "string", + "x-go-name": "HeadCommitID" + }, + "merge_when_checks_succeed": { + "type": "boolean", + "x-go-name": "MergeWhenChecksSucceed" + } + }, + "x-go-name": "MergePullRequestForm", + "x-go-package": "forgejo.org/services/forms" + }, + "MigrateRepoOptions": { + "description": "MigrateRepoOptions options for migrating repository's\nthis is used to interact with api v1", + "type": "object", + "required": ["clone_addr", "repo_name"], + "properties": { + "auth_password": { + "type": "string", + "x-go-name": "AuthPassword" + }, + "auth_token": { + "type": "string", + "x-go-name": "AuthToken" + }, + "auth_username": { + "type": "string", + "x-go-name": "AuthUsername" + }, + "clone_addr": { + "type": "string", + "x-go-name": "CloneAddr" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "issues": { + "type": "boolean", + "x-go-name": "Issues" + }, + "labels": { + "type": "boolean", + "x-go-name": "Labels" + }, + "lfs": { + "type": "boolean", + "x-go-name": "LFS" + }, + "lfs_endpoint": { + "type": "string", + "x-go-name": "LFSEndpoint" + }, + "milestones": { + "type": "boolean", + "x-go-name": "Milestones" + }, + "mirror": { + "type": "boolean", + "x-go-name": "Mirror" + }, + "mirror_interval": { + "type": "string", + "x-go-name": "MirrorInterval" + }, + "private": { + "type": "boolean", + "x-go-name": "Private" + }, + "pull_requests": { + "type": "boolean", + "x-go-name": "PullRequests" + }, + "releases": { + "type": "boolean", + "x-go-name": "Releases" + }, + "repo_name": { + "type": "string", + "x-go-name": "RepoName" + }, + "repo_owner": { + "description": "Name of User or Organisation who will own Repo after migration", + "type": "string", + "x-go-name": "RepoOwner" + }, + "service": { + "type": "string", + "enum": [ + "git", + "github", + "gitea", + "gitlab", + "gogs", + "onedev", + "gitbucket", + "codebase" + ], + "x-go-name": "Service" + }, + "uid": { + "description": "deprecated (only for backwards compatibility)", + "type": "integer", + "format": "int64", + "x-go-name": "RepoOwnerID" + }, + "wiki": { + "type": "boolean", + "x-go-name": "Wiki" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Milestone": { + "description": "Milestone milestone is a collection of issues on one repository", + "type": "object", + "properties": { + "closed_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Closed" + }, + "closed_issues": { + "type": "integer", + "format": "int64", + "x-go-name": "ClosedIssues" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "open_issues": { + "type": "integer", + "format": "int64", + "x-go-name": "OpenIssues" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "NewIssuePinsAllowed": { + "description": "NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed", + "type": "object", + "properties": { + "issues": { + "type": "boolean", + "x-go-name": "Issues" + }, + "pull_requests": { + "type": "boolean", + "x-go-name": "PullRequests" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "NodeInfo": { + "description": "NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks", + "type": "object", + "properties": { + "metadata": { + "type": "object", + "x-go-name": "Metadata" + }, + "openRegistrations": { + "type": "boolean", + "x-go-name": "OpenRegistrations" + }, + "protocols": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Protocols" + }, + "services": { + "$ref": "#/definitions/NodeInfoServices" + }, + "software": { + "$ref": "#/definitions/NodeInfoSoftware" + }, + "usage": { + "$ref": "#/definitions/NodeInfoUsage" + }, + "version": { + "type": "string", + "x-go-name": "Version" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "NodeInfoServices": { + "description": "NodeInfoServices contains the third party sites this server can connect to via their application API", + "type": "object", + "properties": { + "inbound": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Inbound" + }, + "outbound": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Outbound" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "NodeInfoSoftware": { + "description": "NodeInfoSoftware contains Metadata about server software in use", + "type": "object", + "properties": { + "homepage": { + "type": "string", + "x-go-name": "Homepage" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "repository": { + "type": "string", + "x-go-name": "Repository" + }, + "version": { + "type": "string", + "x-go-name": "Version" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "NodeInfoUsage": { + "description": "NodeInfoUsage contains usage statistics for this server", + "type": "object", + "properties": { + "localComments": { + "type": "integer", + "format": "int64", + "x-go-name": "LocalComments" + }, + "localPosts": { + "type": "integer", + "format": "int64", + "x-go-name": "LocalPosts" + }, + "users": { + "$ref": "#/definitions/NodeInfoUsageUsers" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "NodeInfoUsageUsers": { + "description": "NodeInfoUsageUsers contains statistics about the users of this server", + "type": "object", + "properties": { + "activeHalfyear": { + "type": "integer", + "format": "int64", + "x-go-name": "ActiveHalfyear" + }, + "activeMonth": { + "type": "integer", + "format": "int64", + "x-go-name": "ActiveMonth" + }, + "total": { + "type": "integer", + "format": "int64", + "x-go-name": "Total" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Note": { + "description": "Note contains information related to a git note", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/Commit" + }, + "message": { + "type": "string", + "x-go-name": "Message" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "NoteOptions": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "NotificationCount": { + "description": "NotificationCount number of unread notifications", + "type": "object", + "properties": { + "new": { + "type": "integer", + "format": "int64", + "x-go-name": "New" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "NotificationSubject": { + "description": "NotificationSubject contains the notification subject (Issue/Pull/Commit)", + "type": "object", + "properties": { + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "latest_comment_html_url": { + "type": "string", + "x-go-name": "LatestCommentHTMLURL" + }, + "latest_comment_url": { + "type": "string", + "x-go-name": "LatestCommentURL" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "type": { + "$ref": "#/definitions/NotifySubjectType" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "NotificationThread": { + "description": "NotificationThread expose Notification on API", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "pinned": { + "type": "boolean", + "x-go-name": "Pinned" + }, + "repository": { + "$ref": "#/definitions/Repository" + }, + "subject": { + "$ref": "#/definitions/NotificationSubject" + }, + "unread": { + "type": "boolean", + "x-go-name": "Unread" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "UpdatedAt" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "NotifySubjectType": { + "description": "NotifySubjectType represent type of notification subject", + "type": "string", + "x-go-package": "forgejo.org/modules/structs" + }, + "OAuth2Application": { + "type": "object", + "title": "OAuth2Application represents an OAuth2 application.", + "properties": { + "client_id": { + "type": "string", + "x-go-name": "ClientID" + }, + "client_secret": { + "type": "string", + "x-go-name": "ClientSecret" + }, + "confidential_client": { + "type": "boolean", + "x-go-name": "ConfidentialClient" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "redirect_uris": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "RedirectURIs" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Organization": { + "description": "Organization represents an organization", + "type": "object", + "properties": { + "avatar_url": { + "type": "string", + "x-go-name": "AvatarURL" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "email": { + "type": "string", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, + "username": { + "description": "deprecated", + "type": "string", + "x-go-name": "UserName" + }, + "visibility": { + "type": "string", + "x-go-name": "Visibility" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "OrganizationPermissions": { + "description": "OrganizationPermissions list different users permissions on an organization", + "type": "object", + "properties": { + "can_create_repository": { + "type": "boolean", + "x-go-name": "CanCreateRepository" + }, + "can_read": { + "type": "boolean", + "x-go-name": "CanRead" + }, + "can_write": { + "type": "boolean", + "x-go-name": "CanWrite" + }, + "is_admin": { + "type": "boolean", + "x-go-name": "IsAdmin" + }, + "is_owner": { + "type": "boolean", + "x-go-name": "IsOwner" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PRBranchInfo": { + "description": "PRBranchInfo information about a branch", + "type": "object", + "properties": { + "label": { + "type": "string", + "x-go-name": "Name" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "repo": { + "$ref": "#/definitions/Repository" + }, + "repo_id": { + "type": "integer", + "format": "int64", + "x-go-name": "RepoID" + }, + "sha": { + "type": "string", + "x-go-name": "Sha" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Package": { + "description": "Package represents a package", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "creator": { + "$ref": "#/definitions/User" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "owner": { + "$ref": "#/definitions/User" + }, + "repository": { + "$ref": "#/definitions/Repository" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "version": { + "type": "string", + "x-go-name": "Version" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PackageFile": { + "description": "PackageFile represents a package file", + "type": "object", + "properties": { + "Size": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "md5": { + "type": "string", + "x-go-name": "HashMD5" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "sha1": { + "type": "string", + "x-go-name": "HashSHA1" + }, + "sha256": { + "type": "string", + "x-go-name": "HashSHA256" + }, + "sha512": { + "type": "string", + "x-go-name": "HashSHA512" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PayloadCommit": { + "description": "PayloadCommit represents a commit", + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Added" + }, + "author": { + "$ref": "#/definitions/PayloadUser" + }, + "committer": { + "$ref": "#/definitions/PayloadUser" + }, + "id": { + "description": "sha1 hash of the commit", + "type": "string", + "x-go-name": "ID" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "modified": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Modified" + }, + "removed": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Removed" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "x-go-name": "Timestamp" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PayloadCommitVerification": { + "description": "PayloadCommitVerification represents the GPG verification of a commit", + "type": "object", + "properties": { + "payload": { + "type": "string", + "x-go-name": "Payload" + }, + "reason": { + "type": "string", + "x-go-name": "Reason" + }, + "signature": { + "type": "string", + "x-go-name": "Signature" + }, + "signer": { + "$ref": "#/definitions/PayloadUser" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PayloadUser": { + "description": "PayloadUser represents the author or committer of a commit", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "description": "Full name of the commit author", + "type": "string", + "x-go-name": "Name" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Permission": { + "description": "Permission represents a set of permissions", + "type": "object", + "properties": { + "admin": { + "type": "boolean", + "x-go-name": "Admin" + }, + "pull": { + "type": "boolean", + "x-go-name": "Pull" + }, + "push": { + "type": "boolean", + "x-go-name": "Push" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PublicKey": { + "description": "PublicKey publickey is a user key to push code to repository", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "fingerprint": { + "type": "string", + "x-go-name": "Fingerprint" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "key": { + "type": "string", + "x-go-name": "Key" + }, + "key_type": { + "type": "string", + "x-go-name": "KeyType" + }, + "read_only": { + "type": "boolean", + "x-go-name": "ReadOnly" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PullRequest": { + "description": "PullRequest represents a pull request", + "type": "object", + "properties": { + "additions": { + "type": "integer", + "format": "int64", + "x-go-name": "Additions" + }, + "allow_maintainer_edit": { + "type": "boolean", + "x-go-name": "AllowMaintainerEdit" + }, + "assignee": { + "$ref": "#/definitions/User" + }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + }, + "x-go-name": "Assignees" + }, + "base": { + "$ref": "#/definitions/PRBranchInfo" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "changed_files": { + "type": "integer", + "format": "int64", + "x-go-name": "ChangedFiles" + }, + "closed_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Closed" + }, + "comments": { + "type": "integer", + "format": "int64", + "x-go-name": "Comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "deletions": { + "type": "integer", + "format": "int64", + "x-go-name": "Deletions" + }, + "diff_url": { + "type": "string", + "x-go-name": "DiffURL" + }, + "draft": { + "type": "boolean", + "x-go-name": "Draft" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "flow": { + "type": "integer", + "format": "int64", + "x-go-name": "Flow" + }, + "head": { + "$ref": "#/definitions/PRBranchInfo" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_locked": { + "type": "boolean", + "x-go-name": "IsLocked" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/definitions/Label" + }, + "x-go-name": "Labels" + }, + "merge_base": { + "type": "string", + "x-go-name": "MergeBase" + }, + "merge_commit_sha": { + "type": "string", + "x-go-name": "MergedCommitID" + }, + "mergeable": { + "type": "boolean", + "x-go-name": "Mergeable" + }, + "merged": { + "type": "boolean", + "x-go-name": "HasMerged" + }, + "merged_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Merged" + }, + "merged_by": { + "$ref": "#/definitions/User" + }, + "milestone": { + "$ref": "#/definitions/Milestone" + }, + "number": { + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "patch_url": { + "type": "string", + "x-go-name": "PatchURL" + }, + "pin_order": { + "type": "integer", + "format": "int64", + "x-go-name": "PinOrder" + }, + "requested_reviewers": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + }, + "x-go-name": "RequestedReviewers" + }, + "requested_reviewers_teams": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + }, + "x-go-name": "RequestedReviewersTeams" + }, + "review_comments": { + "description": "number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR)", + "type": "integer", + "format": "int64", + "x-go-name": "ReviewComments" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PullRequestMeta": { + "description": "PullRequestMeta PR info if an issue is a PR", + "type": "object", + "properties": { + "draft": { + "type": "boolean", + "x-go-name": "IsWorkInProgress" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "merged": { + "type": "boolean", + "x-go-name": "HasMerged" + }, + "merged_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Merged" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PullReview": { + "description": "PullReview represents a pull request review", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "comments_count": { + "type": "integer", + "format": "int64", + "x-go-name": "CodeCommentsCount" + }, + "commit_id": { + "type": "string", + "x-go-name": "CommitID" + }, + "dismissed": { + "type": "boolean", + "x-go-name": "Dismissed" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "official": { + "type": "boolean", + "x-go-name": "Official" + }, + "pull_request_url": { + "type": "string", + "x-go-name": "HTMLPullURL" + }, + "stale": { + "type": "boolean", + "x-go-name": "Stale" + }, + "state": { + "$ref": "#/definitions/ReviewStateType" + }, + "submitted_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Submitted" + }, + "team": { + "$ref": "#/definitions/Team" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PullReviewComment": { + "description": "PullReviewComment represents a comment on a pull request review", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "commit_id": { + "type": "string", + "x-go-name": "CommitID" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "diff_hunk": { + "type": "string", + "x-go-name": "DiffHunk" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "original_commit_id": { + "type": "string", + "x-go-name": "OrigCommitID" + }, + "original_position": { + "type": "integer", + "format": "uint64", + "x-go-name": "OldLineNum" + }, + "path": { + "type": "string", + "x-go-name": "Path" + }, + "position": { + "type": "integer", + "format": "uint64", + "x-go-name": "LineNum" + }, + "pull_request_review_id": { + "type": "integer", + "format": "int64", + "x-go-name": "ReviewID" + }, + "pull_request_url": { + "type": "string", + "x-go-name": "HTMLPullURL" + }, + "resolver": { + "$ref": "#/definitions/User" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PullReviewRequestOptions": { + "description": "PullReviewRequestOptions are options to add or remove pull review requests", + "type": "object", + "properties": { + "reviewers": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Reviewers" + }, + "team_reviewers": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "TeamReviewers" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "PushMirror": { + "description": "PushMirror represents information of a push mirror", + "type": "object", + "properties": { + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedUnix" + }, + "interval": { + "type": "string", + "x-go-name": "Interval" + }, + "last_error": { + "type": "string", + "x-go-name": "LastError" + }, + "last_update": { + "type": "string", + "format": "date-time", + "x-go-name": "LastUpdateUnix" + }, + "public_key": { + "type": "string", + "x-go-name": "PublicKey" + }, + "remote_address": { + "type": "string", + "x-go-name": "RemoteAddress" + }, + "remote_name": { + "type": "string", + "x-go-name": "RemoteName" + }, + "repo_name": { + "type": "string", + "x-go-name": "RepoName" + }, + "sync_on_commit": { + "type": "boolean", + "x-go-name": "SyncOnCommit" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaGroup": { + "description": "QuotaGroup represents a quota group", + "type": "object", + "properties": { + "name": { + "description": "Name of the group", + "type": "string", + "x-go-name": "Name" + }, + "rules": { + "description": "Rules associated with the group", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaRuleInfo" + }, + "x-go-name": "Rules" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaGroupList": { + "description": "QuotaGroupList represents a list of quota groups", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaGroup" + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaInfo": { + "description": "QuotaInfo represents information about a user's quota", + "type": "object", + "properties": { + "groups": { + "$ref": "#/definitions/QuotaGroupList" + }, + "used": { + "$ref": "#/definitions/QuotaUsed" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaRuleInfo": { + "description": "QuotaRuleInfo contains information about a quota rule", + "type": "object", + "properties": { + "limit": { + "description": "The limit set by the rule", + "type": "integer", + "format": "int64", + "x-go-name": "Limit" + }, + "name": { + "description": "Name of the rule (only shown to admins)", + "type": "string", + "x-go-name": "Name" + }, + "subjects": { + "description": "Subjects the rule affects", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Subjects" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsed": { + "description": "QuotaUsed represents the quota usage of a user", + "type": "object", + "properties": { + "size": { + "$ref": "#/definitions/QuotaUsedSize" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedArtifact": { + "description": "QuotaUsedArtifact represents an artifact counting towards a user's quota", + "type": "object", + "properties": { + "html_url": { + "description": "HTML URL to the action run containing the artifact", + "type": "string", + "x-go-name": "HTMLURL" + }, + "name": { + "description": "Name of the artifact", + "type": "string", + "x-go-name": "Name" + }, + "size": { + "description": "Size of the artifact (compressed)", + "type": "integer", + "format": "int64", + "x-go-name": "Size" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedArtifactList": { + "description": "QuotaUsedArtifactList represents a list of artifacts counting towards a user's quota", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaUsedArtifact" + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedAttachment": { + "description": "QuotaUsedAttachment represents an attachment counting towards a user's quota", + "type": "object", + "properties": { + "api_url": { + "description": "API URL for the attachment", + "type": "string", + "x-go-name": "APIURL" + }, + "contained_in": { + "description": "Context for the attachment: URLs to the containing object", + "type": "object", + "properties": { + "api_url": { + "description": "API URL for the object that contains this attachment", + "type": "string", + "x-go-name": "APIURL" + }, + "html_url": { + "description": "HTML URL for the object that contains this attachment", + "type": "string", + "x-go-name": "HTMLURL" + } + }, + "x-go-name": "ContainedIn" + }, + "name": { + "description": "Filename of the attachment", + "type": "string", + "x-go-name": "Name" + }, + "size": { + "description": "Size of the attachment (in bytes)", + "type": "integer", + "format": "int64", + "x-go-name": "Size" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedAttachmentList": { + "description": "QuotaUsedAttachmentList represents a list of attachment counting towards a user's quota", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaUsedAttachment" + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedPackage": { + "description": "QuotaUsedPackage represents a package counting towards a user's quota", + "type": "object", + "properties": { + "html_url": { + "description": "HTML URL to the package version", + "type": "string", + "x-go-name": "HTMLURL" + }, + "name": { + "description": "Name of the package", + "type": "string", + "x-go-name": "Name" + }, + "size": { + "description": "Size of the package version", + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "type": { + "description": "Type of the package", + "type": "string", + "x-go-name": "Type" + }, + "version": { + "description": "Version of the package", + "type": "string", + "x-go-name": "Version" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedPackageList": { + "description": "QuotaUsedPackageList represents a list of packages counting towards a user's quota", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaUsedPackage" + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedSize": { + "description": "QuotaUsedSize represents the size-based quota usage of a user", + "type": "object", + "properties": { + "assets": { + "$ref": "#/definitions/QuotaUsedSizeAssets" + }, + "git": { + "$ref": "#/definitions/QuotaUsedSizeGit" + }, + "repos": { + "$ref": "#/definitions/QuotaUsedSizeRepos" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedSizeAssets": { + "description": "QuotaUsedSizeAssets represents the size-based asset usage of a user", + "type": "object", + "properties": { + "artifacts": { + "description": "Storage size used for the user's artifacts", + "type": "integer", + "format": "int64", + "x-go-name": "Artifacts" + }, + "attachments": { + "$ref": "#/definitions/QuotaUsedSizeAssetsAttachments" + }, + "packages": { + "$ref": "#/definitions/QuotaUsedSizeAssetsPackages" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedSizeAssetsAttachments": { + "description": "QuotaUsedSizeAssetsAttachments represents the size-based attachment quota usage of a user", + "type": "object", + "properties": { + "issues": { + "description": "Storage size used for the user's issue \u0026 comment attachments", + "type": "integer", + "format": "int64", + "x-go-name": "Issues" + }, + "releases": { + "description": "Storage size used for the user's release attachments", + "type": "integer", + "format": "int64", + "x-go-name": "Releases" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedSizeAssetsPackages": { + "description": "QuotaUsedSizeAssetsPackages represents the size-based package quota usage of a user", + "type": "object", + "properties": { + "all": { + "description": "Storage suze used for the user's packages", + "type": "integer", + "format": "int64", + "x-go-name": "All" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedSizeGit": { + "description": "QuotaUsedSizeGit represents the size-based git (lfs) quota usage of a user", + "type": "object", + "properties": { + "LFS": { + "description": "Storage size of the user's Git LFS objects", + "type": "integer", + "format": "int64" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "QuotaUsedSizeRepos": { + "description": "QuotaUsedSizeRepos represents the size-based repository quota usage of a user", + "type": "object", + "properties": { + "private": { + "description": "Storage size of the user's private repositories", + "type": "integer", + "format": "int64", + "x-go-name": "Private" + }, + "public": { + "description": "Storage size of the user's public repositories", + "type": "integer", + "format": "int64", + "x-go-name": "Public" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Reaction": { + "description": "Reaction contain one reaction", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Reaction" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Reference": { + "type": "object", + "title": "Reference represents a Git reference.", + "properties": { + "object": { + "$ref": "#/definitions/GitObject" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "RegistrationToken": { + "description": "RegistrationToken is a string used to register a runner with a server", + "type": "object", + "properties": { + "token": { + "type": "string", + "x-go-name": "Token" + } + }, + "x-go-package": "forgejo.org/routers/api/v1/shared" + }, + "Release": { + "description": "Release represents a repository release", + "type": "object", + "properties": { + "archive_download_count": { + "$ref": "#/definitions/TagArchiveDownloadCount" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/definitions/Attachment" + }, + "x-go-name": "Attachments" + }, + "author": { + "$ref": "#/definitions/User" + }, + "body": { + "type": "string", + "x-go-name": "Note" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "draft": { + "type": "boolean", + "x-go-name": "IsDraft" + }, + "hide_archive_links": { + "type": "boolean", + "x-go-name": "HideArchiveLinks" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "published_at": { + "type": "string", + "format": "date-time", + "x-go-name": "PublishedAt" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "tarball_url": { + "type": "string", + "x-go-name": "TarURL" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" + }, + "upload_url": { + "type": "string", + "x-go-name": "UploadURL" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "zipball_url": { + "type": "string", + "x-go-name": "ZipURL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "RenameOrgOption": { + "description": "RenameOrgOption options when renaming an organization", + "type": "object", + "required": ["new_name"], + "properties": { + "new_name": { + "description": "New username for this org. This name cannot be in use yet by any other user.", + "type": "string", + "uniqueItems": true, + "x-go-name": "NewName" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "RenameUserOption": { + "description": "RenameUserOption options when renaming a user", + "type": "object", + "required": ["new_username"], + "properties": { + "new_username": { + "description": "New username for this user. This name cannot be in use yet by any other user.", + "type": "string", + "uniqueItems": true, + "x-go-name": "NewName" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ReplaceFlagsOption": { + "description": "ReplaceFlagsOption options when replacing the flags of a repository", + "type": "object", + "properties": { + "flags": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Flags" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "RepoCollaboratorPermission": { + "description": "RepoCollaboratorPermission to get repository permission for a collaborator", + "type": "object", + "properties": { + "permission": { + "type": "string", + "x-go-name": "Permission" + }, + "role_name": { + "type": "string", + "x-go-name": "RoleName" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "RepoCommit": { + "type": "object", + "title": "RepoCommit contains information of a commit in the context of a repository.", + "properties": { + "author": { + "$ref": "#/definitions/CommitUser" + }, + "committer": { + "$ref": "#/definitions/CommitUser" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "tree": { + "$ref": "#/definitions/CommitMeta" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "RepoTopicOptions": { + "description": "RepoTopicOptions a collection of repo topic names", + "type": "object", + "properties": { + "topics": { + "description": "list of topic names", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Topics" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "RepoTransfer": { + "description": "RepoTransfer represents a pending repo transfer", + "type": "object", + "properties": { + "doer": { + "$ref": "#/definitions/User" + }, + "recipient": { + "$ref": "#/definitions/User" + }, + "teams": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + }, + "x-go-name": "Teams" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Repository": { + "description": "Repository represents a repository", + "type": "object", + "properties": { + "allow_fast_forward_only_merge": { + "type": "boolean", + "x-go-name": "AllowFastForwardOnly" + }, + "allow_merge_commits": { + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_explicit": { + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_rebase_update": { + "type": "boolean", + "x-go-name": "AllowRebaseUpdate" + }, + "allow_squash_merge": { + "type": "boolean", + "x-go-name": "AllowSquash" + }, + "archived": { + "type": "boolean", + "x-go-name": "Archived" + }, + "archived_at": { + "type": "string", + "format": "date-time", + "x-go-name": "ArchivedAt" + }, + "avatar_url": { + "type": "string", + "x-go-name": "AvatarURL" + }, + "clone_url": { + "type": "string", + "x-go-name": "CloneURL" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "default_allow_maintainer_edit": { + "type": "boolean", + "x-go-name": "DefaultAllowMaintainerEdit" + }, + "default_branch": { + "type": "string", + "x-go-name": "DefaultBranch" + }, + "default_delete_branch_after_merge": { + "type": "boolean", + "x-go-name": "DefaultDeleteBranchAfterMerge" + }, + "default_merge_style": { + "type": "string", + "x-go-name": "DefaultMergeStyle" + }, + "default_update_style": { + "type": "string", + "x-go-name": "DefaultUpdateStyle" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "empty": { + "type": "boolean", + "x-go-name": "Empty" + }, + "external_tracker": { + "$ref": "#/definitions/ExternalTracker" + }, + "external_wiki": { + "$ref": "#/definitions/ExternalWiki" + }, + "fork": { + "type": "boolean", + "x-go-name": "Fork" + }, + "forks_count": { + "type": "integer", + "format": "int64", + "x-go-name": "Forks" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "globally_editable_wiki": { + "type": "boolean", + "x-go-name": "GloballyEditableWiki" + }, + "has_actions": { + "type": "boolean", + "x-go-name": "HasActions" + }, + "has_issues": { + "type": "boolean", + "x-go-name": "HasIssues" + }, + "has_packages": { + "type": "boolean", + "x-go-name": "HasPackages" + }, + "has_projects": { + "type": "boolean", + "x-go-name": "HasProjects" + }, + "has_pull_requests": { + "type": "boolean", + "x-go-name": "HasPullRequests" + }, + "has_releases": { + "type": "boolean", + "x-go-name": "HasReleases" + }, + "has_wiki": { + "type": "boolean", + "x-go-name": "HasWiki" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "ignore_whitespace_conflicts": { + "type": "boolean", + "x-go-name": "IgnoreWhitespaceConflicts" + }, + "internal": { + "type": "boolean", + "x-go-name": "Internal" + }, + "internal_tracker": { + "$ref": "#/definitions/InternalTracker" + }, + "language": { + "type": "string", + "x-go-name": "Language" + }, + "languages_url": { + "type": "string", + "x-go-name": "LanguagesURL" + }, + "link": { + "type": "string", + "x-go-name": "Link" + }, + "mirror": { + "type": "boolean", + "x-go-name": "Mirror" + }, + "mirror_interval": { + "type": "string", + "x-go-name": "MirrorInterval" + }, + "mirror_updated": { + "type": "string", + "format": "date-time", + "x-go-name": "MirrorUpdated" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "object_format_name": { + "description": "ObjectFormatName of the underlying git repository", + "type": "string", + "enum": ["sha1", "sha256"], + "x-go-name": "ObjectFormatName" + }, + "open_issues_count": { + "type": "integer", + "format": "int64", + "x-go-name": "OpenIssues" + }, + "open_pr_counter": { + "type": "integer", + "format": "int64", + "x-go-name": "OpenPulls" + }, + "original_url": { + "type": "string", + "x-go-name": "OriginalURL" + }, + "owner": { + "$ref": "#/definitions/User" + }, + "parent": { + "$ref": "#/definitions/Repository" + }, + "permissions": { + "$ref": "#/definitions/Permission" + }, + "private": { + "type": "boolean", + "x-go-name": "Private" + }, + "release_counter": { + "type": "integer", + "format": "int64", + "x-go-name": "Releases" + }, + "repo_transfer": { + "$ref": "#/definitions/RepoTransfer" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "ssh_url": { + "type": "string", + "x-go-name": "SSHURL" + }, + "stars_count": { + "type": "integer", + "format": "int64", + "x-go-name": "Stars" + }, + "template": { + "type": "boolean", + "x-go-name": "Template" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Topics" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "watchers_count": { + "type": "integer", + "format": "int64", + "x-go-name": "Watchers" + }, + "website": { + "type": "string", + "x-go-name": "Website" + }, + "wiki_branch": { + "type": "string", + "x-go-name": "WikiBranch" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "RepositoryMeta": { + "description": "RepositoryMeta basic repository information", + "type": "object", + "properties": { + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "owner": { + "type": "string", + "x-go-name": "Owner" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ReviewStateType": { + "description": "ReviewStateType review state type", + "type": "string", + "x-go-package": "forgejo.org/modules/structs" + }, + "SearchResults": { + "description": "SearchResults results of a successful search", + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Repository" + }, + "x-go-name": "Data" + }, + "ok": { + "type": "boolean", + "x-go-name": "OK" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Secret": { + "description": "Secret represents a secret", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "name": { + "description": "the secret's name", + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "ServerVersion": { + "description": "ServerVersion wraps the version of the server", + "type": "object", + "properties": { + "version": { + "type": "string", + "x-go-name": "Version" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "SetUserQuotaGroupsOptions": { + "description": "SetUserQuotaGroupsOptions represents the quota groups of a user", + "type": "object", + "required": ["groups"], + "properties": { + "groups": { + "description": "Quota groups the user shall have", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Groups" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "StateType": { + "description": "StateType issue state type", + "type": "string", + "x-go-package": "forgejo.org/modules/structs" + }, + "StopWatch": { + "description": "StopWatch represent a running stopwatch", + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "duration": { + "type": "string", + "x-go-name": "Duration" + }, + "issue_index": { + "type": "integer", + "format": "int64", + "x-go-name": "IssueIndex" + }, + "issue_title": { + "type": "string", + "x-go-name": "IssueTitle" + }, + "repo_name": { + "type": "string", + "x-go-name": "RepoName" + }, + "repo_owner_name": { + "type": "string", + "x-go-name": "RepoOwnerName" + }, + "seconds": { + "type": "integer", + "format": "int64", + "x-go-name": "Seconds" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "SubmitPullReviewOptions": { + "description": "SubmitPullReviewOptions are options to submit a pending pull review", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "event": { + "$ref": "#/definitions/ReviewStateType" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "SyncForkInfo": { + "description": "SyncForkInfo information about syncing a fork", + "type": "object", + "properties": { + "allowed": { + "type": "boolean", + "x-go-name": "Allowed" + }, + "base_commit": { + "type": "string", + "x-go-name": "BaseCommit" + }, + "commits_behind": { + "type": "integer", + "format": "int64", + "x-go-name": "CommitsBehind" + }, + "fork_commit": { + "type": "string", + "x-go-name": "ForkCommit" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Tag": { + "description": "Tag represents a repository tag", + "type": "object", + "properties": { + "archive_download_count": { + "$ref": "#/definitions/TagArchiveDownloadCount" + }, + "commit": { + "$ref": "#/definitions/CommitMeta" + }, + "id": { + "type": "string", + "x-go-name": "ID" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "tarball_url": { + "type": "string", + "x-go-name": "TarballURL" + }, + "zipball_url": { + "type": "string", + "x-go-name": "ZipballURL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "TagArchiveDownloadCount": { + "description": "TagArchiveDownloadCount counts how many times a archive was downloaded", + "type": "object", + "properties": { + "tar_gz": { + "type": "integer", + "format": "int64", + "x-go-name": "TarGz" + }, + "zip": { + "type": "integer", + "format": "int64", + "x-go-name": "Zip" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "TagProtection": { + "description": "TagProtection represents a tag protection", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + }, + "whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistUsernames" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "Team": { + "description": "Team represents a team in an organization", + "type": "object", + "properties": { + "can_create_org_repo": { + "type": "boolean", + "x-go-name": "CanCreateOrgRepo" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "includes_all_repositories": { + "type": "boolean", + "x-go-name": "IncludesAllRepositories" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "organization": { + "$ref": "#/definitions/Organization" + }, + "permission": { + "type": "string", + "enum": ["none", "read", "write", "admin", "owner"], + "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.pulls", + "repo.releases", + "repo.projects", + "repo.ext_wiki" + ] + }, + "units_map": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "UnitsMap", + "example": { + "repo.code": "read", + "repo.ext_issues": "none", + "repo.ext_wiki": "none", + "repo.issues": "write", + "repo.projects": "none", + "repo.pulls": "owner", + "repo.releases": "none", + "repo.wiki": "admin" + } + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "TimeStamp": { + "description": "TimeStamp defines a timestamp", + "type": "integer", + "format": "int64", + "x-go-package": "forgejo.org/modules/timeutil" + }, + "TimelineComment": { + "description": "TimelineComment represents a timeline comment (comment of any type) on a commit or issue", + "type": "object", + "properties": { + "assignee": { + "$ref": "#/definitions/User" + }, + "assignee_team": { + "$ref": "#/definitions/Team" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "dependent_issue": { + "$ref": "#/definitions/Issue" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "issue_url": { + "type": "string", + "x-go-name": "IssueURL" + }, + "label": { + "$ref": "#/definitions/Label" + }, + "milestone": { + "$ref": "#/definitions/Milestone" + }, + "new_ref": { + "type": "string", + "x-go-name": "NewRef" + }, + "new_title": { + "type": "string", + "x-go-name": "NewTitle" + }, + "old_milestone": { + "$ref": "#/definitions/Milestone" + }, + "old_project_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OldProjectID" + }, + "old_ref": { + "type": "string", + "x-go-name": "OldRef" + }, + "old_title": { + "type": "string", + "x-go-name": "OldTitle" + }, + "project_id": { + "type": "integer", + "format": "int64", + "x-go-name": "ProjectID" + }, + "pull_request_url": { + "type": "string", + "x-go-name": "PRURL" + }, + "ref_action": { + "type": "string", + "x-go-name": "RefAction" + }, + "ref_comment": { + "$ref": "#/definitions/Comment" + }, + "ref_commit_sha": { + "description": "commit SHA where issue/PR was referenced", + "type": "string", + "x-go-name": "RefCommitSHA" + }, + "ref_issue": { + "$ref": "#/definitions/Issue" + }, + "removed_assignee": { + "description": "whether the assignees were removed or added", + "type": "boolean", + "x-go-name": "RemovedAssignee" + }, + "resolve_doer": { + "$ref": "#/definitions/User" + }, + "review_id": { + "type": "integer", + "format": "int64", + "x-go-name": "ReviewID" + }, + "tracked_time": { + "$ref": "#/definitions/TrackedTime" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "TopicName": { + "description": "TopicName a list of repo topic names", + "type": "object", + "properties": { + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "TopicNames" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "TopicResponse": { + "description": "TopicResponse for returning topics", + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "repo_count": { + "type": "integer", + "format": "int64", + "x-go-name": "RepoCount" + }, + "topic_name": { + "type": "string", + "x-go-name": "Name" + }, + "updated": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "TrackedTime": { + "description": "TrackedTime worked time for an issue / pr", + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "issue": { + "$ref": "#/definitions/Issue" + }, + "issue_id": { + "description": "deprecated (only for backwards compatibility)", + "type": "integer", + "format": "int64", + "x-go-name": "IssueID" + }, + "time": { + "description": "Time in seconds", + "type": "integer", + "format": "int64", + "x-go-name": "Time" + }, + "user_id": { + "description": "deprecated (only for backwards compatibility)", + "type": "integer", + "format": "int64", + "x-go-name": "UserID" + }, + "user_name": { + "type": "string", + "x-go-name": "UserName" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "TransferRepoOption": { + "description": "TransferRepoOption options when transfer a repository's ownership", + "type": "object", + "required": ["new_owner"], + "properties": { + "new_owner": { + "type": "string", + "x-go-name": "NewOwner" + }, + "team_ids": { + "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "TeamIDs" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "UpdateBranchRepoOption": { + "description": "UpdateBranchRepoOption options when updating a branch in a repository", + "type": "object", + "required": ["name"], + "properties": { + "name": { + "description": "New branch name", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "UpdateFileOptions": { + "description": "UpdateFileOptions options for updating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": ["sha", "content"], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "content": { + "description": "content must be base64 encoded", + "type": "string", + "x-go-name": "ContentBase64" + }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, + "from_path": { + "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL", + "type": "string", + "x-go-name": "FromPath" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "sha": { + "description": "sha is the SHA for the file that already exists", + "type": "string", + "x-go-name": "SHA" + }, + "signoff": { + "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", + "type": "boolean", + "x-go-name": "Signoff" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "UpdateRepoAvatarOption": { + "description": "UpdateRepoAvatarUserOption options when updating the repo avatar", + "type": "object", + "properties": { + "image": { + "description": "image must be base64 encoded", + "type": "string", + "x-go-name": "Image" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "UpdateUserAvatarOption": { + "description": "UpdateUserAvatarUserOption options when updating the user avatar", + "type": "object", + "properties": { + "image": { + "description": "image must be base64 encoded", + "type": "string", + "x-go-name": "Image" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "UpdateVariableOption": { + "description": "UpdateVariableOption the option when updating variable", + "type": "object", + "required": ["value"], + "properties": { + "name": { + "description": "New name for the variable. If the field is empty, the variable name won't be updated.", + "type": "string", + "x-go-name": "Name" + }, + "value": { + "description": "Value of the variable to update", + "type": "string", + "x-go-name": "Value" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "User": { + "description": "User represents a user", + "type": "object", + "properties": { + "active": { + "description": "Is user active", + "type": "boolean", + "x-go-name": "IsActive" + }, + "avatar_url": { + "description": "URL to the user's avatar", + "type": "string", + "x-go-name": "AvatarURL" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "description": { + "description": "the user's description", + "type": "string", + "x-go-name": "Description" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "followers_count": { + "description": "user counts", + "type": "integer", + "format": "int64", + "x-go-name": "Followers" + }, + "following_count": { + "type": "integer", + "format": "int64", + "x-go-name": "Following" + }, + "full_name": { + "description": "the user's full name", + "type": "string", + "x-go-name": "FullName" + }, + "html_url": { + "description": "URL to the user's profile page", + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "description": "the user's id", + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_admin": { + "description": "Is the user an administrator", + "type": "boolean", + "x-go-name": "IsAdmin" + }, + "language": { + "description": "User locale", + "type": "string", + "x-go-name": "Language" + }, + "last_login": { + "type": "string", + "format": "date-time", + "x-go-name": "LastLogin" + }, + "location": { + "description": "the user's location", + "type": "string", + "x-go-name": "Location" + }, + "login": { + "description": "the user's username", + "type": "string", + "x-go-name": "UserName" + }, + "login_name": { + "description": "the user's authentication sign-in name.", + "type": "string", + "default": "empty", + "x-go-name": "LoginName" + }, + "prohibit_login": { + "description": "Is user login prohibited", + "type": "boolean", + "x-go-name": "ProhibitLogin" + }, + "pronouns": { + "description": "the user's pronouns", + "type": "string", + "x-go-name": "Pronouns" + }, + "restricted": { + "description": "Is user restricted", + "type": "boolean", + "x-go-name": "Restricted" + }, + "source_id": { + "description": "The ID of the user's Authentication Source", + "type": "integer", + "format": "int64", + "x-go-name": "SourceID" + }, + "starred_repos_count": { + "type": "integer", + "format": "int64", + "x-go-name": "StarredRepos" + }, + "visibility": { + "description": "User visibility level option: public, limited, private", + "type": "string", + "x-go-name": "Visibility" + }, + "website": { + "description": "the user's website", + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "UserHeatmapData": { + "description": "UserHeatmapData represents the data needed to create a heatmap", + "type": "object", + "properties": { + "contributions": { + "type": "integer", + "format": "int64", + "x-go-name": "Contributions" + }, + "timestamp": { + "$ref": "#/definitions/TimeStamp" + } + }, + "x-go-package": "forgejo.org/models/activities" + }, + "UserSettings": { + "description": "UserSettings represents user settings", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "diff_view_style": { + "type": "string", + "x-go-name": "DiffViewStyle" + }, + "enable_repo_unit_hints": { + "type": "boolean", + "x-go-name": "EnableRepoUnitHints" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "hide_activity": { + "type": "boolean", + "x-go-name": "HideActivity" + }, + "hide_email": { + "description": "Privacy", + "type": "boolean", + "x-go-name": "HideEmail" + }, + "hide_pronouns": { + "type": "boolean", + "x-go-name": "HidePronouns" + }, + "language": { + "type": "string", + "x-go-name": "Language" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "pronouns": { + "type": "string", + "x-go-name": "Pronouns" + }, + "theme": { + "type": "string", + "x-go-name": "Theme" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "UserSettingsOptions": { + "description": "UserSettingsOptions represents options to change user settings", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "diff_view_style": { + "type": "string", + "x-go-name": "DiffViewStyle" + }, + "enable_repo_unit_hints": { + "type": "boolean", + "x-go-name": "EnableRepoUnitHints" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "hide_activity": { + "type": "boolean", + "x-go-name": "HideActivity" + }, + "hide_email": { + "description": "Privacy", + "type": "boolean", + "x-go-name": "HideEmail" + }, + "hide_pronouns": { + "type": "boolean", + "x-go-name": "HidePronouns" + }, + "language": { + "type": "string", + "x-go-name": "Language" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "pronouns": { + "type": "string", + "x-go-name": "Pronouns" + }, + "theme": { + "type": "string", + "x-go-name": "Theme" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "VerifyGPGKeyOption": { + "description": "VerifyGPGKeyOption options verifies user GPG key", + "type": "object", + "required": ["key_id"], + "properties": { + "armored_signature": { + "type": "string", + "x-go-name": "Signature" + }, + "key_id": { + "description": "An Signature for a GPG key token", + "type": "string", + "x-go-name": "KeyID" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "WatchInfo": { + "description": "WatchInfo represents an API watch status of one repository", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "ignored": { + "type": "boolean", + "x-go-name": "Ignored" + }, + "reason": { + "x-go-name": "Reason" + }, + "repository_url": { + "type": "string", + "x-go-name": "RepositoryURL" + }, + "subscribed": { + "type": "boolean", + "x-go-name": "Subscribed" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "WikiCommit": { + "description": "WikiCommit page commit/revision", + "type": "object", + "properties": { + "author": { + "$ref": "#/definitions/CommitUser" + }, + "commiter": { + "$ref": "#/definitions/CommitUser" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "sha": { + "type": "string", + "x-go-name": "ID" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "WikiCommitList": { + "description": "WikiCommitList commit/revision list", + "type": "object", + "properties": { + "commits": { + "type": "array", + "items": { + "$ref": "#/definitions/WikiCommit" + }, + "x-go-name": "WikiCommits" + }, + "count": { + "type": "integer", + "format": "int64", + "x-go-name": "Count" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "WikiPage": { + "description": "WikiPage a wiki page", + "type": "object", + "properties": { + "commit_count": { + "type": "integer", + "format": "int64", + "x-go-name": "CommitCount" + }, + "content_base64": { + "description": "Page content, base64 encoded", + "type": "string", + "x-go-name": "ContentBase64" + }, + "footer": { + "type": "string", + "x-go-name": "Footer" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "last_commit": { + "$ref": "#/definitions/WikiCommit" + }, + "sidebar": { + "type": "string", + "x-go-name": "Sidebar" + }, + "sub_url": { + "type": "string", + "x-go-name": "SubURL" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "forgejo.org/modules/structs" + }, + "WikiPageMetaData": { + "description": "WikiPageMetaData wiki page meta information", + "type": "object", + "properties": { + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "last_commit": { + "$ref": "#/definitions/WikiCommit" + }, + "sub_url": { + "type": "string", + "x-go-name": "SubURL" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "forgejo.org/modules/structs" + } + }, + "responses": { + "AccessToken": { + "description": "AccessToken represents an API access token.", + "schema": { + "$ref": "#/definitions/AccessToken" + } + }, + "AccessTokenList": { + "description": "AccessTokenList represents a list of API access token.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessToken" + } + } + }, + "ActionRun": { + "description": "ActionRun", + "schema": { + "$ref": "#/definitions/ActionRun" + } + }, + "ActionRunList": { + "description": "ActionRunList", + "schema": { + "$ref": "#/definitions/ListActionRunResponse" + } + }, + "ActionVariable": { + "description": "ActionVariable", + "schema": { + "$ref": "#/definitions/ActionVariable" + } + }, + "ActivityFeedsList": { + "description": "ActivityFeedsList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Activity" + } + } + }, + "ActivityPub": { + "description": "ActivityPub", + "schema": { + "$ref": "#/definitions/ActivityPub" + } + }, + "AnnotatedTag": { + "description": "AnnotatedTag", + "schema": { + "$ref": "#/definitions/AnnotatedTag" + } + }, + "Attachment": { + "description": "Attachment", + "schema": { + "$ref": "#/definitions/Attachment" + } + }, + "AttachmentList": { + "description": "AttachmentList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Attachment" + } + } + }, + "BlockedUserList": { + "description": "BlockedUserList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/BlockedUser" + } + } + }, + "Branch": { + "description": "Branch", + "schema": { + "$ref": "#/definitions/Branch" + } + }, + "BranchList": { + "description": "BranchList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Branch" + } + } + }, + "BranchProtection": { + "description": "BranchProtection", + "schema": { + "$ref": "#/definitions/BranchProtection" + } + }, + "BranchProtectionList": { + "description": "BranchProtectionList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/BranchProtection" + } + } + }, + "ChangedFileList": { + "description": "ChangedFileList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ChangedFile" + } + }, + "headers": { + "X-HasMore": { + "type": "boolean", + "description": "True if there is another page" + }, + "X-Page": { + "type": "integer", + "format": "int64", + "description": "The current page" + }, + "X-PageCount": { + "type": "integer", + "format": "int64", + "description": "Total number of pages" + }, + "X-PerPage": { + "type": "integer", + "format": "int64", + "description": "Commits per page" + }, + "X-Total-Count": { + "type": "integer", + "format": "int64", + "description": "Total commit count" + } + } + }, + "CombinedStatus": { + "description": "CombinedStatus", + "schema": { + "$ref": "#/definitions/CombinedStatus" + } + }, + "Comment": { + "description": "Comment", + "schema": { + "$ref": "#/definitions/Comment" + } + }, + "CommentList": { + "description": "CommentList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Comment" + } + } + }, + "Commit": { + "description": "Commit", + "schema": { + "$ref": "#/definitions/Commit" + } + }, + "CommitList": { + "description": "CommitList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Commit" + } + }, + "headers": { + "X-HasMore": { + "type": "boolean", + "description": "True if there is another page" + }, + "X-Page": { + "type": "integer", + "format": "int64", + "description": "The current page" + }, + "X-PageCount": { + "type": "integer", + "format": "int64", + "description": "Total number of pages" + }, + "X-PerPage": { + "type": "integer", + "format": "int64", + "description": "Commits per page" + }, + "X-Total": { + "type": "integer", + "format": "int64", + "description": "Total commit count" + } + } + }, + "CommitStatus": { + "description": "CommitStatus", + "schema": { + "$ref": "#/definitions/CommitStatus" + } + }, + "CommitStatusList": { + "description": "CommitStatusList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitStatus" + } + } + }, + "Compare": { + "description": "", + "schema": { + "$ref": "#/definitions/Compare" + } + }, + "ContentsListResponse": { + "description": "ContentsListResponse", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentsResponse" + } + } + }, + "ContentsResponse": { + "description": "ContentsResponse", + "schema": { + "$ref": "#/definitions/ContentsResponse" + } + }, + "CronList": { + "description": "CronList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Cron" + } + } + }, + "DeployKey": { + "description": "DeployKey", + "schema": { + "$ref": "#/definitions/DeployKey" + } + }, + "DeployKeyList": { + "description": "DeployKeyList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeployKey" + } + } + }, + "DispatchWorkflowRun": { + "description": "DispatchWorkflowRun is a Workflow Run after dispatching", + "schema": { + "$ref": "#/definitions/DispatchWorkflowRun" + } + }, + "EmailList": { + "description": "EmailList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Email" + } + } + }, + "EmptyRepository": { + "description": "EmptyRepository", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "FileDeleteResponse": { + "description": "FileDeleteResponse", + "schema": { + "$ref": "#/definitions/FileDeleteResponse" + } + }, + "FileResponse": { + "description": "FileResponse", + "schema": { + "$ref": "#/definitions/FileResponse" + } + }, + "FilesResponse": { + "description": "FilesResponse", + "schema": { + "$ref": "#/definitions/FilesResponse" + } + }, + "GPGKey": { + "description": "GPGKey", + "schema": { + "$ref": "#/definitions/GPGKey" + } + }, + "GPGKeyList": { + "description": "GPGKeyList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GPGKey" + } + } + }, + "GeneralAPISettings": { + "description": "GeneralAPISettings", + "schema": { + "$ref": "#/definitions/GeneralAPISettings" + } + }, + "GeneralAttachmentSettings": { + "description": "GeneralAttachmentSettings", + "schema": { + "$ref": "#/definitions/GeneralAttachmentSettings" + } + }, + "GeneralRepoSettings": { + "description": "GeneralRepoSettings", + "schema": { + "$ref": "#/definitions/GeneralRepoSettings" + } + }, + "GeneralUISettings": { + "description": "GeneralUISettings", + "schema": { + "$ref": "#/definitions/GeneralUISettings" + } + }, + "GitBlob": { + "description": "GitBlob", + "schema": { + "$ref": "#/definitions/GitBlob" + } + }, + "GitBlobList": { + "description": "GitBlobList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GitBlob" + } + } + }, + "GitHook": { + "description": "GitHook", + "schema": { + "$ref": "#/definitions/GitHook" + } + }, + "GitHookList": { + "description": "GitHookList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GitHook" + } + } + }, + "GitTreeResponse": { + "description": "GitTreeResponse", + "schema": { + "$ref": "#/definitions/GitTreeResponse" + } + }, + "GitignoreTemplateInfo": { + "description": "GitignoreTemplateInfo", + "schema": { + "$ref": "#/definitions/GitignoreTemplateInfo" + } + }, + "GitignoreTemplateList": { + "description": "GitignoreTemplateList", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Hook": { + "description": "Hook", + "schema": { + "$ref": "#/definitions/Hook" + } + }, + "HookList": { + "description": "HookList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Hook" + } + } + }, + "Issue": { + "description": "Issue", + "schema": { + "$ref": "#/definitions/Issue" + } + }, + "IssueDeadline": { + "description": "IssueDeadline", + "schema": { + "$ref": "#/definitions/IssueDeadline" + } + }, + "IssueList": { + "description": "IssueList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Issue" + } + } + }, + "IssueTemplates": { + "description": "IssueTemplates", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueTemplate" + } + } + }, + "Label": { + "description": "Label", + "schema": { + "$ref": "#/definitions/Label" + } + }, + "LabelList": { + "description": "LabelList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Label" + } + } + }, + "LabelTemplateInfo": { + "description": "LabelTemplateInfo", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/LabelTemplate" + } + } + }, + "LabelTemplateList": { + "description": "LabelTemplateList", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "LanguageStatistics": { + "description": "LanguageStatistics", + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + } + }, + "LicenseTemplateInfo": { + "description": "LicenseTemplateInfo", + "schema": { + "$ref": "#/definitions/LicenseTemplateInfo" + } + }, + "LicenseTemplateList": { + "description": "LicenseTemplateList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/LicensesTemplateListEntry" + } + } + }, + "MarkdownRender": { + "description": "MarkdownRender is a rendered markdown document", + "schema": { + "type": "string" + } + }, + "MarkupRender": { + "description": "MarkupRender is a rendered markup document", + "schema": { + "type": "string" + } + }, + "Milestone": { + "description": "Milestone", + "schema": { + "$ref": "#/definitions/Milestone" + } + }, + "MilestoneList": { + "description": "MilestoneList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Milestone" + } + } + }, + "NodeInfo": { + "description": "NodeInfo", + "schema": { + "$ref": "#/definitions/NodeInfo" + } + }, + "Note": { + "description": "Note", + "schema": { + "$ref": "#/definitions/Note" + } + }, + "NotificationCount": { + "description": "Number of unread notifications", + "schema": { + "$ref": "#/definitions/NotificationCount" + } + }, + "NotificationThread": { + "description": "NotificationThread", + "schema": { + "$ref": "#/definitions/NotificationThread" + } + }, + "NotificationThreadList": { + "description": "NotificationThreadList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NotificationThread" + } + } + }, + "OAuth2Application": { + "description": "OAuth2Application", + "schema": { + "$ref": "#/definitions/OAuth2Application" + } + }, + "OAuth2ApplicationList": { + "description": "OAuth2ApplicationList represents a list of OAuth2 applications.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/OAuth2Application" + } + } + }, + "Organization": { + "description": "Organization", + "schema": { + "$ref": "#/definitions/Organization" + } + }, + "OrganizationList": { + "description": "OrganizationList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Organization" + } + } + }, + "OrganizationPermissions": { + "description": "OrganizationPermissions", + "schema": { + "$ref": "#/definitions/OrganizationPermissions" + } + }, + "Outbox": { + "description": "Outbox", + "schema": { + "$ref": "#/definitions/ForgeOutbox" + } + }, + "Package": { + "description": "Package", + "schema": { + "$ref": "#/definitions/Package" + } + }, + "PackageFileList": { + "description": "PackageFileList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PackageFile" + } + } + }, + "PackageList": { + "description": "PackageList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Package" + } + } + }, + "PublicKey": { + "description": "PublicKey", + "schema": { + "$ref": "#/definitions/PublicKey" + } + }, + "PublicKeyList": { + "description": "PublicKeyList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PublicKey" + } + } + }, + "PullRequest": { + "description": "PullRequest", + "schema": { + "$ref": "#/definitions/PullRequest" + } + }, + "PullRequestList": { + "description": "PullRequestList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PullRequest" + } + } + }, + "PullReview": { + "description": "PullReview", + "schema": { + "$ref": "#/definitions/PullReview" + } + }, + "PullReviewComment": { + "description": "PullComment", + "schema": { + "$ref": "#/definitions/PullReviewComment" + } + }, + "PullReviewCommentList": { + "description": "PullCommentList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PullReviewComment" + } + } + }, + "PullReviewList": { + "description": "PullReviewList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PullReview" + } + } + }, + "PushMirror": { + "description": "PushMirror", + "schema": { + "$ref": "#/definitions/PushMirror" + } + }, + "PushMirrorList": { + "description": "PushMirrorList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PushMirror" + } + } + }, + "QuotaGroup": { + "description": "QuotaGroup", + "schema": { + "$ref": "#/definitions/QuotaGroup" + } + }, + "QuotaGroupList": { + "description": "QuotaGroupList", + "schema": { + "$ref": "#/definitions/QuotaGroupList" + } + }, + "QuotaInfo": { + "description": "QuotaInfo", + "schema": { + "$ref": "#/definitions/QuotaInfo" + } + }, + "QuotaRuleInfo": { + "description": "QuotaRuleInfo", + "schema": { + "$ref": "#/definitions/QuotaRuleInfo" + } + }, + "QuotaRuleInfoList": { + "description": "QuotaRuleInfoList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/QuotaRuleInfo" + } + } + }, + "QuotaUsedArtifactList": { + "description": "QuotaUsedArtifactList", + "schema": { + "$ref": "#/definitions/QuotaUsedArtifactList" + } + }, + "QuotaUsedAttachmentList": { + "description": "QuotaUsedAttachmentList", + "schema": { + "$ref": "#/definitions/QuotaUsedAttachmentList" + } + }, + "QuotaUsedPackageList": { + "description": "QuotaUsedPackageList", + "schema": { + "$ref": "#/definitions/QuotaUsedPackageList" + } + }, + "Reaction": { + "description": "Reaction", + "schema": { + "$ref": "#/definitions/Reaction" + } + }, + "ReactionList": { + "description": "ReactionList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Reaction" + } + } + }, + "Reference": { + "description": "Reference", + "schema": { + "$ref": "#/definitions/Reference" + } + }, + "ReferenceList": { + "description": "ReferenceList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + } + } + }, + "RegistrationToken": { + "description": "RegistrationToken is a string used to register a runner with a server", + "schema": { + "$ref": "#/definitions/RegistrationToken" + } + }, + "Release": { + "description": "Release", + "schema": { + "$ref": "#/definitions/Release" + } + }, + "ReleaseList": { + "description": "ReleaseList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Release" + } + } + }, + "RepoCollaboratorPermission": { + "description": "RepoCollaboratorPermission", + "schema": { + "$ref": "#/definitions/RepoCollaboratorPermission" + } + }, + "RepoIssueConfig": { + "description": "RepoIssueConfig", + "schema": { + "$ref": "#/definitions/IssueConfig" + } + }, + "RepoIssueConfigValidation": { + "description": "RepoIssueConfigValidation", + "schema": { + "$ref": "#/definitions/IssueConfigValidation" + } + }, + "RepoNewIssuePinsAllowed": { + "description": "RepoNewIssuePinsAllowed", + "schema": { + "$ref": "#/definitions/NewIssuePinsAllowed" + } + }, + "Repository": { + "description": "Repository", + "schema": { + "$ref": "#/definitions/Repository" + } + }, + "RepositoryList": { + "description": "RepositoryList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Repository" + } + } + }, + "RunJobList": { + "description": "RunJobList is a list of action run jobs", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionRunJob" + } + } + }, + "SearchResults": { + "description": "SearchResults", + "schema": { + "$ref": "#/definitions/SearchResults" + } + }, + "Secret": { + "description": "Secret", + "schema": { + "$ref": "#/definitions/Secret" + } + }, + "SecretList": { + "description": "SecretList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Secret" + } + } + }, + "ServerVersion": { + "description": "ServerVersion", + "schema": { + "$ref": "#/definitions/ServerVersion" + } + }, + "StopWatch": { + "description": "StopWatch", + "schema": { + "$ref": "#/definitions/StopWatch" + } + }, + "StopWatchList": { + "description": "StopWatchList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/StopWatch" + } + } + }, + "StringSlice": { + "description": "StringSlice", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "SyncForkInfo": { + "description": "SyncForkInfo", + "schema": { + "$ref": "#/definitions/SyncForkInfo" + } + }, + "Tag": { + "description": "Tag", + "schema": { + "$ref": "#/definitions/Tag" + } + }, + "TagList": { + "description": "TagList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + } + } + }, + "TagProtection": { + "description": "TagProtection", + "schema": { + "$ref": "#/definitions/TagProtection" + } + }, + "TagProtectionList": { + "description": "TagProtectionList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TagProtection" + } + } + }, + "TasksList": { + "description": "TasksList", + "schema": { + "$ref": "#/definitions/ActionTaskResponse" + } + }, + "Team": { + "description": "Team", + "schema": { + "$ref": "#/definitions/Team" + } + }, + "TeamList": { + "description": "TeamList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + } + } + }, + "TimelineList": { + "description": "TimelineList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TimelineComment" + } + } + }, + "TopicListResponse": { + "description": "TopicListResponse", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TopicResponse" + } + } + }, + "TopicNames": { + "description": "TopicNames", + "schema": { + "$ref": "#/definitions/TopicName" + } + }, + "TrackedTime": { + "description": "TrackedTime", + "schema": { + "$ref": "#/definitions/TrackedTime" + } + }, + "TrackedTimeList": { + "description": "TrackedTimeList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TrackedTime" + } + } + }, + "User": { + "description": "User", + "schema": { + "$ref": "#/definitions/User" + } + }, + "UserHeatmapData": { + "description": "UserHeatmapData", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/UserHeatmapData" + } + } + }, + "UserList": { + "description": "UserList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + } + } + }, + "UserSettings": { + "description": "UserSettings", + "schema": { + "$ref": "#/definitions/UserSettings" + } + }, + "VariableList": { + "description": "VariableList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionVariable" + } + } + }, + "WatchInfo": { + "description": "WatchInfo", + "schema": { + "$ref": "#/definitions/WatchInfo" + } + }, + "WikiCommitList": { + "description": "WikiCommitList", + "schema": { + "$ref": "#/definitions/WikiCommitList" + } + }, + "WikiPage": { + "description": "WikiPage", + "schema": { + "$ref": "#/definitions/WikiPage" + } + }, + "WikiPageList": { + "description": "WikiPageList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/WikiPageMetaData" + } + } + }, + "boolean": { + "description": "Boolean" + }, + "conflict": { + "description": "APIConflict is a conflict empty response" + }, + "empty": { + "description": "APIEmpty is an empty response" + }, + "error": { + "description": "APIError is error format response", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "forbidden": { + "description": "APIForbiddenError is a forbidden error response", + "schema": { + "$ref": "#/definitions/APIForbiddenError" + } + }, + "internalServerError": { + "description": "APIInternalServerError is an error that is raised when an internal server error occurs", + "schema": { + "$ref": "#/definitions/APIInternalServerError" + } + }, + "invalidTopicsError": { + "description": "APIInvalidTopicsError is error format response to invalid topics", + "schema": { + "$ref": "#/definitions/APIInvalidTopicsError" + } + }, + "notFound": { + "description": "APINotFound is a not found error response", + "schema": { + "$ref": "#/definitions/APINotFound" + } + }, + "parameterBodies": { + "description": "parameterBodies", + "schema": { + "$ref": "#/definitions/NoteOptions" + } + }, + "quotaExceeded": { + "description": "QuotaExceeded", + "headers": { + "message": { + "type": "string" + }, + "user_id": { + "type": "integer", + "format": "int64" + }, + "username": { + "type": "string" + } + } + }, + "redirect": { + "description": "APIRedirect is a redirect response" + }, + "repoArchivedError": { + "description": "APIRepoArchivedError is an error that is raised when an archived repo should be modified", + "schema": { + "$ref": "#/definitions/APIRepoArchivedError" + } + }, + "string": { + "description": "APIString is a string response", + "schema": { + "type": "string" + } + }, + "unauthorized": { + "description": "APIUnauthorizedError is a unauthorized error response", + "schema": { + "$ref": "#/definitions/APIUnauthorizedError" + } + }, + "validationError": { + "description": "APIValidationError is error format response related to input validation", + "schema": { + "$ref": "#/definitions/APIValidationError" + } + } + }, + "securityDefinitions": { + "AccessToken": { + "description": "This authentication option is deprecated for removal in Forgejo v13.0.0. Please use AuthorizationHeaderToken instead.", + "type": "apiKey", + "name": "access_token", + "in": "query" + }, + "AuthorizationHeaderToken": { + "description": "API tokens must be prepended with \"token\" followed by a space.", + "type": "apiKey", + "name": "Authorization", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + }, + "SudoHeader": { + "description": "Sudo API request as the user provided as the key. Admin privileges are required.", + "type": "apiKey", + "name": "Sudo", + "in": "header" + }, + "SudoParam": { + "description": "Sudo API request as the user provided as the key. Admin privileges are required.", + "type": "apiKey", + "name": "sudo", + "in": "query" + }, + "TOTPHeader": { + "description": "Must be used in combination with BasicAuth if two-factor authentication is enabled.", + "type": "apiKey", + "name": "X-FORGEJO-OTP", + "in": "header" + }, + "Token": { + "description": "This authentication option is deprecated for removal in Forgejo v13.0.0. Please use AuthorizationHeaderToken instead.", + "type": "apiKey", + "name": "token", + "in": "query" + } + }, + "security": [ + { + "BasicAuth": [] + }, + { + "Token": [] + }, + { + "AccessToken": [] + }, + { + "AuthorizationHeaderToken": [] + }, + { + "SudoParam": [] + }, + { + "SudoHeader": [] + }, + { + "TOTPHeader": [] + } + ] +} -- 2.54.0 From 7de555e13f531bc400a4977a451e776a15cdf47d Mon Sep 17 00:00:00 2001 From: dzu Date: Sun, 8 Feb 2026 02:20:14 +0000 Subject: [PATCH 2/7] cargo fmt over generated client --- forgejo-openapi/src/apis/activitypub_api.rs | 215 +- forgejo-openapi/src/apis/admin_api.rs | 781 ++- forgejo-openapi/src/apis/configuration.rs | 5 +- forgejo-openapi/src/apis/issue_api.rs | 1711 ++++++- forgejo-openapi/src/apis/miscellaneous_api.rs | 185 +- forgejo-openapi/src/apis/mod.rs | 18 +- forgejo-openapi/src/apis/notification_api.rs | 244 +- forgejo-openapi/src/apis/organization_api.rs | 1303 ++++- forgejo-openapi/src/apis/package_api.rs | 114 +- forgejo-openapi/src/apis/repository_api.rs | 4246 ++++++++++++++--- forgejo-openapi/src/apis/settings_api.rs | 56 +- forgejo-openapi/src/apis/user_api.rs | 1223 ++++- forgejo-openapi/src/lib.rs | 4 +- forgejo-openapi/src/models/access_token.rs | 3 +- forgejo-openapi/src/models/action_run.rs | 8 +- forgejo-openapi/src/models/action_run_job.rs | 3 +- forgejo-openapi/src/models/action_task.rs | 3 +- .../src/models/action_task_response.rs | 3 +- forgejo-openapi/src/models/action_variable.rs | 3 +- forgejo-openapi/src/models/activity.rs | 3 +- forgejo-openapi/src/models/activity_pub.rs | 7 +- .../src/models/add_collaborator_option.rs | 9 +- forgejo-openapi/src/models/add_time_option.rs | 3 +- forgejo-openapi/src/models/annotated_tag.rs | 8 +- .../src/models/annotated_tag_object.rs | 3 +- forgejo-openapi/src/models/api_error.rs | 3 +- .../src/models/api_forbidden_error.rs | 3 +- .../src/models/api_internal_server_error.rs | 3 +- .../src/models/api_invalid_topics_error.rs | 3 +- forgejo-openapi/src/models/api_not_found.rs | 3 +- .../src/models/api_repo_archived_error.rs | 3 +- .../src/models/api_unauthorized_error.rs | 3 +- .../src/models/api_validation_error.rs | 3 +- forgejo-openapi/src/models/attachment.rs | 10 +- forgejo-openapi/src/models/blocked_user.rs | 3 +- forgejo-openapi/src/models/branch.rs | 18 +- .../src/models/branch_protection.rs | 103 +- .../src/models/change_file_operation.rs | 3 +- .../src/models/change_files_options.rs | 3 +- forgejo-openapi/src/models/changed_file.rs | 3 +- forgejo-openapi/src/models/combined_status.rs | 3 +- forgejo-openapi/src/models/comment.rs | 3 +- forgejo-openapi/src/models/commit.rs | 3 +- .../src/models/commit_affected_files.rs | 3 +- .../src/models/commit_date_options.rs | 3 +- forgejo-openapi/src/models/commit_meta.rs | 3 +- forgejo-openapi/src/models/commit_stats.rs | 3 +- forgejo-openapi/src/models/commit_status.rs | 3 +- forgejo-openapi/src/models/commit_user.rs | 3 +- forgejo-openapi/src/models/compare.rs | 3 +- .../src/models/contents_response.rs | 3 +- .../src/models/create_access_token_option.rs | 8 +- .../models/create_branch_protection_option.rs | 103 +- .../src/models/create_branch_repo_option.rs | 3 +- .../src/models/create_email_option.rs | 7 +- .../src/models/create_file_options.rs | 3 +- .../src/models/create_fork_option.rs | 3 +- .../src/models/create_gpg_key_option.rs | 3 +- .../src/models/create_hook_option.rs | 15 +- .../src/models/create_issue_comment_option.rs | 3 +- .../src/models/create_issue_option.rs | 3 +- .../src/models/create_key_option.rs | 3 +- .../src/models/create_label_option.rs | 3 +- .../src/models/create_milestone_option.rs | 5 +- .../create_o_auth2_application_options.rs | 8 +- .../models/create_or_update_secret_option.rs | 7 +- .../src/models/create_org_option.rs | 8 +- .../src/models/create_pull_request_option.rs | 3 +- .../src/models/create_pull_review_comment.rs | 3 +- .../src/models/create_pull_review_options.rs | 3 +- .../src/models/create_push_mirror_option.rs | 3 +- .../src/models/create_quota_group_options.rs | 3 +- .../src/models/create_quota_rule_options.rs | 3 +- .../src/models/create_release_option.rs | 3 +- .../src/models/create_repo_option.rs | 3 +- .../src/models/create_status_option.rs | 3 +- .../src/models/create_tag_option.rs | 3 +- .../models/create_tag_protection_option.rs | 8 +- .../src/models/create_team_option.rs | 15 +- .../src/models/create_user_option.rs | 8 +- .../src/models/create_variable_option.rs | 7 +- .../src/models/create_wiki_page_options.rs | 3 +- forgejo-openapi/src/models/cron.rs | 3 +- .../src/models/delete_email_option.rs | 7 +- .../src/models/delete_file_options.rs | 3 +- .../src/models/delete_labels_option.rs | 7 +- forgejo-openapi/src/models/deploy_key.rs | 3 +- .../src/models/dismiss_pull_review_options.rs | 3 +- .../src/models/dispatch_workflow_option.rs | 3 +- .../src/models/dispatch_workflow_run.rs | 3 +- .../src/models/edit_attachment_options.rs | 8 +- .../models/edit_branch_protection_option.rs | 103 +- .../src/models/edit_deadline_option.rs | 7 +- .../src/models/edit_git_hook_option.rs | 7 +- .../src/models/edit_hook_option.rs | 8 +- .../src/models/edit_issue_comment_option.rs | 3 +- .../src/models/edit_issue_option.rs | 3 +- .../src/models/edit_label_option.rs | 3 +- .../src/models/edit_milestone_option.rs | 3 +- forgejo-openapi/src/models/edit_org_option.rs | 8 +- .../src/models/edit_pull_request_option.rs | 8 +- .../src/models/edit_quota_rule_options.rs | 3 +- .../src/models/edit_reaction_option.rs | 7 +- .../src/models/edit_release_option.rs | 3 +- .../src/models/edit_repo_option.rs | 58 +- .../src/models/edit_tag_protection_option.rs | 8 +- .../src/models/edit_team_option.rs | 15 +- .../src/models/edit_user_option.rs | 13 +- forgejo-openapi/src/models/email.rs | 3 +- .../src/models/external_tracker.rs | 23 +- forgejo-openapi/src/models/external_wiki.rs | 3 +- .../src/models/file_commit_response.rs | 3 +- .../src/models/file_delete_response.rs | 3 +- .../src/models/file_links_response.rs | 3 +- forgejo-openapi/src/models/file_response.rs | 3 +- forgejo-openapi/src/models/files_response.rs | 3 +- .../src/models/general_api_settings.rs | 13 +- .../src/models/general_attachment_settings.rs | 3 +- .../src/models/general_repo_settings.rs | 13 +- .../src/models/general_ui_settings.rs | 3 +- .../src/models/generate_repo_option.rs | 3 +- forgejo-openapi/src/models/git_blob.rs | 3 +- forgejo-openapi/src/models/git_entry.rs | 3 +- forgejo-openapi/src/models/git_hook.rs | 3 +- forgejo-openapi/src/models/git_object.rs | 3 +- .../src/models/git_tree_response.rs | 3 +- .../src/models/gitignore_template_info.rs | 3 +- forgejo-openapi/src/models/gpg_key.rs | 8 +- forgejo-openapi/src/models/gpg_key_email.rs | 3 +- forgejo-openapi/src/models/hook.rs | 8 +- forgejo-openapi/src/models/identity.rs | 3 +- .../src/models/internal_tracker.rs | 18 +- forgejo-openapi/src/models/issue.rs | 3 +- forgejo-openapi/src/models/issue_config.rs | 8 +- .../src/models/issue_config_contact_link.rs | 3 +- .../src/models/issue_config_validation.rs | 3 +- forgejo-openapi/src/models/issue_deadline.rs | 7 +- .../src/models/issue_form_field.rs | 3 +- .../src/models/issue_labels_option.rs | 3 +- forgejo-openapi/src/models/issue_meta.rs | 3 +- forgejo-openapi/src/models/issue_template.rs | 3 +- forgejo-openapi/src/models/label.rs | 3 +- forgejo-openapi/src/models/label_template.rs | 3 +- .../src/models/license_template_info.rs | 3 +- .../models/licenses_template_list_entry.rs | 3 +- .../src/models/list_action_run_response.rs | 3 +- forgejo-openapi/src/models/markdown_option.rs | 3 +- forgejo-openapi/src/models/markup_option.rs | 3 +- .../src/models/merge_pull_request_option.rs | 15 +- .../src/models/migrate_repo_options.rs | 5 +- forgejo-openapi/src/models/milestone.rs | 3 +- .../src/models/new_issue_pins_allowed.rs | 3 +- forgejo-openapi/src/models/node_info.rs | 3 +- .../src/models/node_info_services.rs | 3 +- .../src/models/node_info_software.rs | 3 +- forgejo-openapi/src/models/node_info_usage.rs | 3 +- .../src/models/node_info_usage_users.rs | 3 +- forgejo-openapi/src/models/note.rs | 3 +- forgejo-openapi/src/models/note_options.rs | 7 +- .../src/models/notification_count.rs | 7 +- .../src/models/notification_subject.rs | 8 +- .../src/models/notification_thread.rs | 3 +- .../src/models/o_auth2_application.rs | 8 +- forgejo-openapi/src/models/organization.rs | 8 +- .../src/models/organization_permissions.rs | 8 +- forgejo-openapi/src/models/package.rs | 3 +- forgejo-openapi/src/models/package_file.rs | 3 +- forgejo-openapi/src/models/payload_commit.rs | 3 +- .../src/models/payload_commit_verification.rs | 3 +- forgejo-openapi/src/models/payload_user.rs | 3 +- forgejo-openapi/src/models/permission.rs | 3 +- forgejo-openapi/src/models/pr_branch_info.rs | 3 +- forgejo-openapi/src/models/public_key.rs | 3 +- forgejo-openapi/src/models/pull_request.rs | 18 +- .../src/models/pull_request_meta.rs | 3 +- forgejo-openapi/src/models/pull_review.rs | 3 +- .../src/models/pull_review_comment.rs | 8 +- .../src/models/pull_review_request_options.rs | 3 +- forgejo-openapi/src/models/push_mirror.rs | 3 +- forgejo-openapi/src/models/quota_group.rs | 3 +- forgejo-openapi/src/models/quota_info.rs | 3 +- forgejo-openapi/src/models/quota_rule_info.rs | 3 +- forgejo-openapi/src/models/quota_used.rs | 7 +- .../src/models/quota_used_artifact.rs | 3 +- .../src/models/quota_used_attachment.rs | 3 +- .../quota_used_attachment_contained_in.rs | 3 +- .../src/models/quota_used_package.rs | 3 +- forgejo-openapi/src/models/quota_used_size.rs | 3 +- .../src/models/quota_used_size_assets.rs | 3 +- .../quota_used_size_assets_attachments.rs | 3 +- .../models/quota_used_size_assets_packages.rs | 7 +- .../src/models/quota_used_size_git.rs | 7 +- .../src/models/quota_used_size_repos.rs | 3 +- forgejo-openapi/src/models/reaction.rs | 3 +- forgejo-openapi/src/models/reference.rs | 3 +- .../src/models/registration_token.rs | 7 +- forgejo-openapi/src/models/release.rs | 8 +- .../src/models/rename_org_option.rs | 7 +- .../src/models/rename_user_option.rs | 7 +- .../src/models/replace_flags_option.rs | 7 +- .../models/repo_collaborator_permission.rs | 3 +- forgejo-openapi/src/models/repo_commit.rs | 3 +- .../repo_create_release_attachment_request.rs | 3 +- .../src/models/repo_topic_options.rs | 7 +- forgejo-openapi/src/models/repo_transfer.rs | 3 +- forgejo-openapi/src/models/repository.rs | 53 +- forgejo-openapi/src/models/repository_meta.rs | 3 +- forgejo-openapi/src/models/search_results.rs | 3 +- forgejo-openapi/src/models/secret.rs | 3 +- forgejo-openapi/src/models/server_version.rs | 7 +- .../models/set_user_quota_groups_options.rs | 7 +- forgejo-openapi/src/models/stop_watch.rs | 3 +- .../src/models/submit_pull_review_options.rs | 3 +- forgejo-openapi/src/models/sync_fork_info.rs | 3 +- forgejo-openapi/src/models/tag.rs | 8 +- .../src/models/tag_archive_download_count.rs | 3 +- forgejo-openapi/src/models/tag_protection.rs | 8 +- forgejo-openapi/src/models/team.rs | 15 +- .../src/models/team_search_results.rs | 3 +- .../src/models/timeline_comment.rs | 3 +- forgejo-openapi/src/models/topic_name.rs | 7 +- forgejo-openapi/src/models/topic_response.rs | 3 +- .../src/models/topic_search_results.rs | 7 +- forgejo-openapi/src/models/tracked_time.rs | 3 +- .../src/models/transfer_repo_option.rs | 3 +- .../src/models/update_branch_repo_option.rs | 7 +- .../src/models/update_file_options.rs | 3 +- .../src/models/update_repo_avatar_option.rs | 7 +- .../src/models/update_user_avatar_option.rs | 7 +- .../src/models/update_variable_option.rs | 8 +- forgejo-openapi/src/models/user.rs | 8 +- .../src/models/user_heatmap_data.rs | 3 +- .../src/models/user_search_results.rs | 3 +- forgejo-openapi/src/models/user_settings.rs | 8 +- .../src/models/user_settings_options.rs | 8 +- .../src/models/verify_gpg_key_option.rs | 3 +- forgejo-openapi/src/models/watch_info.rs | 3 +- forgejo-openapi/src/models/wiki_commit.rs | 3 +- .../src/models/wiki_commit_list.rs | 3 +- forgejo-openapi/src/models/wiki_page.rs | 3 +- .../src/models/wiki_page_meta_data.rs | 3 +- 241 files changed, 9216 insertions(+), 2393 deletions(-) diff --git a/forgejo-openapi/src/apis/activitypub_api.rs b/forgejo-openapi/src/apis/activitypub_api.rs index 1fa7c4c..1700177 100644 --- a/forgejo-openapi/src/apis/activitypub_api.rs +++ b/forgejo-openapi/src/apis/activitypub_api.rs @@ -4,16 +4,14 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ - -use reqwest; -use serde::{Deserialize, Serialize, de::Error as _}; +use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; /// struct for typed errors of method [`activitypub_instance_actor`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -93,9 +91,9 @@ pub enum ActivitypubRepositoryOutboxError { UnknownValue(serde_json::Value), } - -pub async fn activitypub_instance_actor(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn activitypub_instance_actor( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/activitypub/actor", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -175,14 +173,21 @@ pub async fn activitypub_instance_actor(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn activitypub_instance_actor_inbox(configuration: &configuration::Configuration, ) -> Result<(), Error> { - +pub async fn activitypub_instance_actor_inbox( + configuration: &configuration::Configuration, +) -> Result<(), Error> { let uri_str = format!("{}/activitypub/actor/inbox", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -248,15 +253,23 @@ pub async fn activitypub_instance_actor_inbox(configuration: &configuration::Con Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn activitypub_instance_actor_outbox(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn activitypub_instance_actor_outbox( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/activitypub/actor/outbox", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -333,16 +346,28 @@ pub async fn activitypub_instance_actor_outbox(configuration: &configuration::Co } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn activitypub_person(configuration: &configuration::Configuration, user_id: i64) -> Result> { +pub async fn activitypub_person( + configuration: &configuration::Configuration, + user_id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_user_id = user_id; - let uri_str = format!("{}/activitypub/user-id/{user_id}", configuration.base_path, user_id=p_path_user_id); + let uri_str = format!( + "{}/activitypub/user-id/{user_id}", + configuration.base_path, + user_id = p_path_user_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -421,16 +446,29 @@ pub async fn activitypub_person(configuration: &configuration::Configuration, us } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn activitypub_person_activity(configuration: &configuration::Configuration, user_id: i32, activity_id: i32) -> Result> { +pub async fn activitypub_person_activity( + configuration: &configuration::Configuration, + user_id: i32, + activity_id: i32, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_user_id = user_id; let p_path_activity_id = activity_id; - let uri_str = format!("{}/activitypub/user-id/{user_id}/activities/{activity_id}/activity", configuration.base_path, user_id=p_path_user_id, activity_id=p_path_activity_id); + let uri_str = format!( + "{}/activitypub/user-id/{user_id}/activities/{activity_id}/activity", + configuration.base_path, + user_id = p_path_user_id, + activity_id = p_path_activity_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -509,16 +547,29 @@ pub async fn activitypub_person_activity(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn activitypub_person_activity_note(configuration: &configuration::Configuration, user_id: i32, activity_id: i32) -> Result> { +pub async fn activitypub_person_activity_note( + configuration: &configuration::Configuration, + user_id: i32, + activity_id: i32, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_user_id = user_id; let p_path_activity_id = activity_id; - let uri_str = format!("{}/activitypub/user-id/{user_id}/activities/{activity_id}", configuration.base_path, user_id=p_path_user_id, activity_id=p_path_activity_id); + let uri_str = format!( + "{}/activitypub/user-id/{user_id}/activities/{activity_id}", + configuration.base_path, + user_id = p_path_user_id, + activity_id = p_path_activity_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -596,16 +647,28 @@ pub async fn activitypub_person_activity_note(configuration: &configuration::Con } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn activitypub_person_feed(configuration: &configuration::Configuration, user_id: i32) -> Result> { +pub async fn activitypub_person_feed( + configuration: &configuration::Configuration, + user_id: i32, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_user_id = user_id; - let uri_str = format!("{}/activitypub/user-id/{user_id}/outbox", configuration.base_path, user_id=p_path_user_id); + let uri_str = format!( + "{}/activitypub/user-id/{user_id}/outbox", + configuration.base_path, + user_id = p_path_user_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -684,16 +747,29 @@ pub async fn activitypub_person_feed(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn activitypub_person_inbox(configuration: &configuration::Configuration, user_id: i64) -> Result<(), Error> { +pub async fn activitypub_person_inbox( + configuration: &configuration::Configuration, + user_id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_user_id = user_id; - let uri_str = format!("{}/activitypub/user-id/{user_id}/inbox", configuration.base_path, user_id=p_path_user_id); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/activitypub/user-id/{user_id}/inbox", + configuration.base_path, + user_id = p_path_user_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -760,15 +836,26 @@ pub async fn activitypub_person_inbox(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn activitypub_repository(configuration: &configuration::Configuration, repository_id: i64) -> Result> { +pub async fn activitypub_repository( + configuration: &configuration::Configuration, + repository_id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_repository_id = repository_id; - let uri_str = format!("{}/activitypub/repository-id/{repository_id}", configuration.base_path, repository_id=p_path_repository_id); + let uri_str = format!( + "{}/activitypub/repository-id/{repository_id}", + configuration.base_path, + repository_id = p_path_repository_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -847,17 +934,31 @@ pub async fn activitypub_repository(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn activitypub_repository_inbox(configuration: &configuration::Configuration, repository_id: i64, body: Option) -> Result<(), Error> { +pub async fn activitypub_repository_inbox( + configuration: &configuration::Configuration, + repository_id: i64, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_repository_id = repository_id; let p_body_body = body; - let uri_str = format!("{}/activitypub/repository-id/{repository_id}/inbox", configuration.base_path, repository_id=p_path_repository_id); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/activitypub/repository-id/{repository_id}/inbox", + configuration.base_path, + repository_id = p_path_repository_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -925,16 +1026,29 @@ pub async fn activitypub_repository_inbox(configuration: &configuration::Configu } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn activitypub_repository_outbox(configuration: &configuration::Configuration, repository_id: i64) -> Result> { +pub async fn activitypub_repository_outbox( + configuration: &configuration::Configuration, + repository_id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_repository_id = repository_id; - let uri_str = format!("{}/activitypub/repository-id/{repository_id}/outbox", configuration.base_path, repository_id=p_path_repository_id); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/activitypub/repository-id/{repository_id}/outbox", + configuration.base_path, + repository_id = p_path_repository_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1012,7 +1126,10 @@ pub async fn activitypub_repository_outbox(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/forgejo-openapi/src/apis/admin_api.rs b/forgejo-openapi/src/apis/admin_api.rs index eb4872d..30be5f2 100644 --- a/forgejo-openapi/src/apis/admin_api.rs +++ b/forgejo-openapi/src/apis/admin_api.rs @@ -4,16 +4,14 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ - -use reqwest; -use serde::{Deserialize, Serialize, de::Error as _}; +use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; /// struct for typed errors of method [`admin_add_rule_to_quota_group`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -399,13 +397,21 @@ pub enum AdminUnadoptedListError { UnknownValue(serde_json::Value), } - -pub async fn admin_add_rule_to_quota_group(configuration: &configuration::Configuration, quotagroup: &str, quotarule: &str) -> Result<(), Error> { +pub async fn admin_add_rule_to_quota_group( + configuration: &configuration::Configuration, + quotagroup: &str, + quotarule: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_quotagroup = quotagroup; let p_path_quotarule = quotarule; - let uri_str = format!("{}/admin/quota/groups/{quotagroup}/rules/{quotarule}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup), quotarule=crate::apis::urlencode(p_path_quotarule)); + let uri_str = format!( + "{}/admin/quota/groups/{quotagroup}/rules/{quotarule}", + configuration.base_path, + quotagroup = crate::apis::urlencode(p_path_quotagroup), + quotarule = crate::apis::urlencode(p_path_quotarule) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -473,16 +479,29 @@ pub async fn admin_add_rule_to_quota_group(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_add_user_to_quota_group(configuration: &configuration::Configuration, quotagroup: &str, username: &str) -> Result<(), Error> { +pub async fn admin_add_user_to_quota_group( + configuration: &configuration::Configuration, + quotagroup: &str, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_quotagroup = quotagroup; let p_path_username = username; - let uri_str = format!("{}/admin/quota/groups/{quotagroup}/users/{username}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup), username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/admin/quota/groups/{quotagroup}/users/{username}", + configuration.base_path, + quotagroup = crate::apis::urlencode(p_path_quotagroup), + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -550,17 +569,32 @@ pub async fn admin_add_user_to_quota_group(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_adopt_repository(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn admin_adopt_repository( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/admin/unadopted/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/admin/unadopted/{owner}/{repo}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -627,16 +661,25 @@ pub async fn admin_adopt_repository(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_create_hook(configuration: &configuration::Configuration, body: models::CreateHookOption) -> Result> { +pub async fn admin_create_hook( + configuration: &configuration::Configuration, + body: models::CreateHookOption, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/admin/hooks", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -715,17 +758,31 @@ pub async fn admin_create_hook(configuration: &configuration::Configuration, bod } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_create_org(configuration: &configuration::Configuration, username: &str, organization: models::CreateOrgOption) -> Result> { +pub async fn admin_create_org( + configuration: &configuration::Configuration, + username: &str, + organization: models::CreateOrgOption, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_body_organization = organization; - let uri_str = format!("{}/admin/users/{username}/orgs", configuration.base_path, username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/admin/users/{username}/orgs", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -804,17 +861,31 @@ pub async fn admin_create_org(configuration: &configuration::Configuration, user } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_create_public_key(configuration: &configuration::Configuration, username: &str, key: Option) -> Result> { +pub async fn admin_create_public_key( + configuration: &configuration::Configuration, + username: &str, + key: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_body_key = key; - let uri_str = format!("{}/admin/users/{username}/keys", configuration.base_path, username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/admin/users/{username}/keys", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -893,16 +964,25 @@ pub async fn admin_create_public_key(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_create_quota_group(configuration: &configuration::Configuration, group: models::CreateQuotaGroupOptions) -> Result> { +pub async fn admin_create_quota_group( + configuration: &configuration::Configuration, + group: models::CreateQuotaGroupOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_group = group; let uri_str = format!("{}/admin/quota/groups", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -981,16 +1061,25 @@ pub async fn admin_create_quota_group(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_create_quota_rule(configuration: &configuration::Configuration, rule: models::CreateQuotaRuleOptions) -> Result> { +pub async fn admin_create_quota_rule( + configuration: &configuration::Configuration, + rule: models::CreateQuotaRuleOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_rule = rule; let uri_str = format!("{}/admin/quota/rules", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1069,17 +1158,31 @@ pub async fn admin_create_quota_rule(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_create_repo(configuration: &configuration::Configuration, username: &str, repository: models::CreateRepoOption) -> Result> { +pub async fn admin_create_repo( + configuration: &configuration::Configuration, + username: &str, + repository: models::CreateRepoOption, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_body_repository = repository; - let uri_str = format!("{}/admin/users/{username}/repos", configuration.base_path, username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/admin/users/{username}/repos", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1158,16 +1261,25 @@ pub async fn admin_create_repo(configuration: &configuration::Configuration, use } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_create_user(configuration: &configuration::Configuration, body: Option) -> Result> { +pub async fn admin_create_user( + configuration: &configuration::Configuration, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/admin/users", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1246,11 +1358,19 @@ pub async fn admin_create_user(configuration: &configuration::Configuration, bod } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_cron_list(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn admin_cron_list( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -1340,16 +1460,29 @@ pub async fn admin_cron_list(configuration: &configuration::Configuration, page: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_cron_run(configuration: &configuration::Configuration, task: &str) -> Result<(), Error> { +pub async fn admin_cron_run( + configuration: &configuration::Configuration, + task: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_task = task; - let uri_str = format!("{}/admin/cron/{task}", configuration.base_path, task=crate::apis::urlencode(p_path_task)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/admin/cron/{task}", + configuration.base_path, + task = crate::apis::urlencode(p_path_task) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1416,16 +1549,29 @@ pub async fn admin_cron_run(configuration: &configuration::Configuration, task: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_delete_hook(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { +pub async fn admin_delete_hook( + configuration: &configuration::Configuration, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/admin/hooks/{id}", configuration.base_path, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/admin/hooks/{id}", + configuration.base_path, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1492,16 +1638,29 @@ pub async fn admin_delete_hook(configuration: &configuration::Configuration, id: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_delete_quota_group(configuration: &configuration::Configuration, quotagroup: &str) -> Result<(), Error> { +pub async fn admin_delete_quota_group( + configuration: &configuration::Configuration, + quotagroup: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_quotagroup = quotagroup; - let uri_str = format!("{}/admin/quota/groups/{quotagroup}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/admin/quota/groups/{quotagroup}", + configuration.base_path, + quotagroup = crate::apis::urlencode(p_path_quotagroup) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1568,16 +1727,29 @@ pub async fn admin_delete_quota_group(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_delete_quota_rule(configuration: &configuration::Configuration, quotarule: &str) -> Result<(), Error> { +pub async fn admin_delete_quota_rule( + configuration: &configuration::Configuration, + quotarule: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_quotarule = quotarule; - let uri_str = format!("{}/admin/quota/rules/{quotarule}", configuration.base_path, quotarule=crate::apis::urlencode(p_path_quotarule)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/admin/quota/rules/{quotarule}", + configuration.base_path, + quotarule = crate::apis::urlencode(p_path_quotarule) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1644,17 +1816,32 @@ pub async fn admin_delete_quota_rule(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_delete_unadopted_repository(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn admin_delete_unadopted_repository( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/admin/unadopted/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/admin/unadopted/{owner}/{repo}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1720,18 +1907,33 @@ pub async fn admin_delete_unadopted_repository(configuration: &configuration::Co Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_delete_user(configuration: &configuration::Configuration, username: &str, purge: Option) -> Result<(), Error> { +pub async fn admin_delete_user( + configuration: &configuration::Configuration, + username: &str, + purge: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_query_purge = purge; - let uri_str = format!("{}/admin/users/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/admin/users/{username}", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref param_value) = p_query_purge { req_builder = req_builder.query(&[("purge", ¶m_value.to_string())]); @@ -1801,17 +2003,31 @@ pub async fn admin_delete_user(configuration: &configuration::Configuration, use } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_delete_user_emails(configuration: &configuration::Configuration, username: &str, body: Option) -> Result<(), Error> { +pub async fn admin_delete_user_emails( + configuration: &configuration::Configuration, + username: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_body_body = body; - let uri_str = format!("{}/admin/users/{username}/emails", configuration.base_path, username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/admin/users/{username}/emails", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1879,17 +2095,32 @@ pub async fn admin_delete_user_emails(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_delete_user_public_key(configuration: &configuration::Configuration, username: &str, id: i64) -> Result<(), Error> { +pub async fn admin_delete_user_public_key( + configuration: &configuration::Configuration, + username: &str, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_path_id = id; - let uri_str = format!("{}/admin/users/{username}/keys/{id}", configuration.base_path, username=crate::apis::urlencode(p_path_username), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/admin/users/{username}/keys/{id}", + configuration.base_path, + username = crate::apis::urlencode(p_path_username), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1956,17 +2187,31 @@ pub async fn admin_delete_user_public_key(configuration: &configuration::Configu } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_edit_hook(configuration: &configuration::Configuration, id: i64, body: Option) -> Result> { +pub async fn admin_edit_hook( + configuration: &configuration::Configuration, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/admin/hooks/{id}", configuration.base_path, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/admin/hooks/{id}", + configuration.base_path, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2045,17 +2290,31 @@ pub async fn admin_edit_hook(configuration: &configuration::Configuration, id: i } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_edit_quota_rule(configuration: &configuration::Configuration, quotarule: &str, rule: models::EditQuotaRuleOptions) -> Result> { +pub async fn admin_edit_quota_rule( + configuration: &configuration::Configuration, + quotarule: &str, + rule: models::EditQuotaRuleOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_quotarule = quotarule; let p_body_rule = rule; - let uri_str = format!("{}/admin/quota/rules/{quotarule}", configuration.base_path, quotarule=crate::apis::urlencode(p_path_quotarule)); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/admin/quota/rules/{quotarule}", + configuration.base_path, + quotarule = crate::apis::urlencode(p_path_quotarule) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2134,17 +2393,31 @@ pub async fn admin_edit_quota_rule(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_edit_user(configuration: &configuration::Configuration, username: &str, body: Option) -> Result> { +pub async fn admin_edit_user( + configuration: &configuration::Configuration, + username: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_body_body = body; - let uri_str = format!("{}/admin/users/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/admin/users/{username}", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2223,11 +2496,19 @@ pub async fn admin_edit_user(configuration: &configuration::Configuration, usern } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_get_all_emails(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn admin_get_all_emails( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -2317,11 +2598,19 @@ pub async fn admin_get_all_emails(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_get_all_orgs(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn admin_get_all_orgs( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -2411,15 +2700,26 @@ pub async fn admin_get_all_orgs(configuration: &configuration::Configuration, pa } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_get_hook(configuration: &configuration::Configuration, id: i64) -> Result> { +pub async fn admin_get_hook( + configuration: &configuration::Configuration, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/admin/hooks/{id}", configuration.base_path, id=p_path_id); + let uri_str = format!( + "{}/admin/hooks/{id}", + configuration.base_path, + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2498,15 +2798,26 @@ pub async fn admin_get_hook(configuration: &configuration::Configuration, id: i6 } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_get_quota_group(configuration: &configuration::Configuration, quotagroup: &str) -> Result> { +pub async fn admin_get_quota_group( + configuration: &configuration::Configuration, + quotagroup: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_quotagroup = quotagroup; - let uri_str = format!("{}/admin/quota/groups/{quotagroup}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup)); + let uri_str = format!( + "{}/admin/quota/groups/{quotagroup}", + configuration.base_path, + quotagroup = crate::apis::urlencode(p_path_quotagroup) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2585,15 +2896,26 @@ pub async fn admin_get_quota_group(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_get_quota_rule(configuration: &configuration::Configuration, quotarule: &str) -> Result> { +pub async fn admin_get_quota_rule( + configuration: &configuration::Configuration, + quotarule: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_quotarule = quotarule; - let uri_str = format!("{}/admin/quota/rules/{quotarule}", configuration.base_path, quotarule=crate::apis::urlencode(p_path_quotarule)); + let uri_str = format!( + "{}/admin/quota/rules/{quotarule}", + configuration.base_path, + quotarule = crate::apis::urlencode(p_path_quotarule) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2672,13 +2994,21 @@ pub async fn admin_get_quota_rule(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_get_runner_registration_token(configuration: &configuration::Configuration, ) -> Result> { - - let uri_str = format!("{}/admin/runners/registration-token", configuration.base_path); +pub async fn admin_get_runner_registration_token( + configuration: &configuration::Configuration, +) -> Result> { + let uri_str = format!( + "{}/admin/runners/registration-token", + configuration.base_path + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2756,16 +3086,28 @@ pub async fn admin_get_runner_registration_token(configuration: &configuration:: } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_get_user_quota(configuration: &configuration::Configuration, username: &str) -> Result> { +pub async fn admin_get_user_quota( + configuration: &configuration::Configuration, + username: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; - let uri_str = format!("{}/admin/users/{username}/quota", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/admin/users/{username}/quota", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2844,11 +3186,19 @@ pub async fn admin_get_user_quota(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_list_hooks(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn admin_list_hooks( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -2938,12 +3288,17 @@ pub async fn admin_list_hooks(configuration: &configuration::Configuration, page } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_list_quota_groups(configuration: &configuration::Configuration, ) -> Result, Error> { - +pub async fn admin_list_quota_groups( + configuration: &configuration::Configuration, +) -> Result, Error> { let uri_str = format!("{}/admin/quota/groups", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -3023,12 +3378,17 @@ pub async fn admin_list_quota_groups(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_list_quota_rules(configuration: &configuration::Configuration, ) -> Result, Error> { - +pub async fn admin_list_quota_rules( + configuration: &configuration::Configuration, +) -> Result, Error> { let uri_str = format!("{}/admin/quota/rules", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -3108,15 +3468,26 @@ pub async fn admin_list_quota_rules(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_list_user_emails(configuration: &configuration::Configuration, username: &str) -> Result, Error> { +pub async fn admin_list_user_emails( + configuration: &configuration::Configuration, + username: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; - let uri_str = format!("{}/admin/users/{username}/emails", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/admin/users/{username}/emails", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3195,15 +3566,26 @@ pub async fn admin_list_user_emails(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_list_users_in_quota_group(configuration: &configuration::Configuration, quotagroup: &str) -> Result, Error> { +pub async fn admin_list_users_in_quota_group( + configuration: &configuration::Configuration, + quotagroup: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_quotagroup = quotagroup; - let uri_str = format!("{}/admin/quota/groups/{quotagroup}/users", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup)); + let uri_str = format!( + "{}/admin/quota/groups/{quotagroup}/users", + configuration.base_path, + quotagroup = crate::apis::urlencode(p_path_quotagroup) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3282,17 +3664,32 @@ pub async fn admin_list_users_in_quota_group(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_remove_rule_from_quota_group(configuration: &configuration::Configuration, quotagroup: &str, quotarule: &str) -> Result<(), Error> { +pub async fn admin_remove_rule_from_quota_group( + configuration: &configuration::Configuration, + quotagroup: &str, + quotarule: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_quotagroup = quotagroup; let p_path_quotarule = quotarule; - let uri_str = format!("{}/admin/quota/groups/{quotagroup}/rules/{quotarule}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup), quotarule=crate::apis::urlencode(p_path_quotarule)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/admin/quota/groups/{quotagroup}/rules/{quotarule}", + configuration.base_path, + quotagroup = crate::apis::urlencode(p_path_quotagroup), + quotarule = crate::apis::urlencode(p_path_quotarule) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3358,18 +3755,34 @@ pub async fn admin_remove_rule_from_quota_group(configuration: &configuration::C Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_remove_user_from_quota_group(configuration: &configuration::Configuration, quotagroup: &str, username: &str) -> Result<(), Error> { +pub async fn admin_remove_user_from_quota_group( + configuration: &configuration::Configuration, + quotagroup: &str, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_quotagroup = quotagroup; let p_path_username = username; - let uri_str = format!("{}/admin/quota/groups/{quotagroup}/users/{username}", configuration.base_path, quotagroup=crate::apis::urlencode(p_path_quotagroup), username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/admin/quota/groups/{quotagroup}/users/{username}", + configuration.base_path, + quotagroup = crate::apis::urlencode(p_path_quotagroup), + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3435,18 +3848,33 @@ pub async fn admin_remove_user_from_quota_group(configuration: &configuration::C Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_rename_user(configuration: &configuration::Configuration, username: &str, body: models::RenameUserOption) -> Result<(), Error> { +pub async fn admin_rename_user( + configuration: &configuration::Configuration, + username: &str, + body: models::RenameUserOption, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_body_body = body; - let uri_str = format!("{}/admin/users/{username}/rename", configuration.base_path, username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/admin/users/{username}/rename", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3514,11 +3942,20 @@ pub async fn admin_rename_user(configuration: &configuration::Configuration, use } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_search_emails(configuration: &configuration::Configuration, q: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn admin_search_emails( + configuration: &configuration::Configuration, + q: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_q = q; let p_query_page = page; @@ -3612,11 +4049,18 @@ pub async fn admin_search_emails(configuration: &configuration::Configuration, q } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_search_run_jobs(configuration: &configuration::Configuration, labels: Option<&str>) -> Result, Error> { +pub async fn admin_search_run_jobs( + configuration: &configuration::Configuration, + labels: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_labels = labels; @@ -3702,11 +4146,22 @@ pub async fn admin_search_run_jobs(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_search_users(configuration: &configuration::Configuration, source_id: Option, login_name: Option<&str>, sort: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn admin_search_users( + configuration: &configuration::Configuration, + source_id: Option, + login_name: Option<&str>, + sort: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_source_id = source_id; let p_query_login_name = login_name; @@ -3808,17 +4263,31 @@ pub async fn admin_search_users(configuration: &configuration::Configuration, so } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_set_user_quota_groups(configuration: &configuration::Configuration, username: &str, groups: models::SetUserQuotaGroupsOptions) -> Result<(), Error> { +pub async fn admin_set_user_quota_groups( + configuration: &configuration::Configuration, + username: &str, + groups: models::SetUserQuotaGroupsOptions, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_body_groups = groups; - let uri_str = format!("{}/admin/users/{username}/quota/groups", configuration.base_path, username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/admin/users/{username}/quota/groups", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3886,11 +4355,20 @@ pub async fn admin_set_user_quota_groups(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn admin_unadopted_list(configuration: &configuration::Configuration, page: Option, limit: Option, pattern: Option<&str>) -> Result, Error> { +pub async fn admin_unadopted_list( + configuration: &configuration::Configuration, + page: Option, + limit: Option, + pattern: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -3984,7 +4462,10 @@ pub async fn admin_unadopted_list(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/forgejo-openapi/src/apis/configuration.rs b/forgejo-openapi/src/apis/configuration.rs index 78bb985..442c861 100644 --- a/forgejo-openapi/src/apis/configuration.rs +++ b/forgejo-openapi/src/apis/configuration.rs @@ -4,12 +4,10 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, @@ -29,7 +27,6 @@ pub struct ApiKey { pub key: String, } - impl Configuration { pub fn new() -> Configuration { Configuration::default() diff --git a/forgejo-openapi/src/apis/issue_api.rs b/forgejo-openapi/src/apis/issue_api.rs index 9cb81b0..debd2bc 100644 --- a/forgejo-openapi/src/apis/issue_api.rs +++ b/forgejo-openapi/src/apis/issue_api.rs @@ -4,19 +4,17 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ - -use reqwest; -use serde::{Deserialize, Serialize, de::Error as _}; +use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; use tokio::fs::File as TokioFile; use tokio_util::codec::{BytesCodec, FramedRead}; - /// struct for typed errors of method [`issue_add_label`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -624,16 +622,29 @@ pub enum UnpinIssueError { UnknownValue(serde_json::Value), } - -pub async fn issue_add_label(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result, Error> { +pub async fn issue_add_label( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/labels", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -712,18 +723,35 @@ pub async fn issue_add_label(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_add_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, user: &str) -> Result<(), Error> { +pub async fn issue_add_subscription( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + user: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_path_user = user; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, user=crate::apis::urlencode(p_path_user)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + user = crate::apis::urlencode(p_path_user) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -791,19 +819,37 @@ pub async fn issue_add_subscription(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_add_time(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { +pub async fn issue_add_time( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/times", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/times", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -882,17 +928,32 @@ pub async fn issue_add_time(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_check_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result> { +pub async fn issue_check_subscription( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/subscriptions/check", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/subscriptions/check", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -971,19 +1032,37 @@ pub async fn issue_check_subscription(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_clear_labels(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result<(), Error> { +pub async fn issue_clear_labels( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/labels", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1051,19 +1130,37 @@ pub async fn issue_clear_labels(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_create_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { +pub async fn issue_create_comment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/comments", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/comments", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1142,18 +1239,34 @@ pub async fn issue_create_comment(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_create_issue(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn issue_create_issue( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1232,11 +1345,23 @@ pub async fn issue_create_issue(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_create_issue_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, attachment: std::path::PathBuf, name: Option<&str>, updated_at: Option) -> Result> { +pub async fn issue_create_issue_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + attachment: std::path::PathBuf, + name: Option<&str>, + updated_at: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -1245,8 +1370,16 @@ pub async fn issue_create_issue_attachment(configuration: &configuration::Config let p_query_name = name; let p_query_updated_at = updated_at; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/assets", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref param_value) = p_query_name { req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); @@ -1311,8 +1444,12 @@ pub async fn issue_create_issue_attachment(configuration: &configuration::Config let mut multipart_form = reqwest::multipart::Form::new(); let file = TokioFile::open(&p_form_attachment).await?; let stream = FramedRead::new(file, BytesCodec::new()); - let file_name = p_form_attachment.file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_default(); - let file_part = reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)).file_name(file_name); + let file_name = p_form_attachment + .file_name() + .map(|n| n.to_string_lossy().to_string()) + .unwrap_or_default(); + let file_part = + reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)).file_name(file_name); multipart_form = multipart_form.part("attachment", file_part); req_builder = req_builder.multipart(multipart_form); @@ -1337,19 +1474,37 @@ pub async fn issue_create_issue_attachment(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_create_issue_blocking(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { +pub async fn issue_create_issue_blocking( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/blocks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/blocks", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1428,11 +1583,23 @@ pub async fn issue_create_issue_blocking(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_create_issue_comment_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment: std::path::PathBuf, name: Option<&str>, updated_at: Option) -> Result> { +pub async fn issue_create_issue_comment_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + attachment: std::path::PathBuf, + name: Option<&str>, + updated_at: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -1441,8 +1608,16 @@ pub async fn issue_create_issue_comment_attachment(configuration: &configuration let p_query_name = name; let p_query_updated_at = updated_at; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments/{id}/assets", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref param_value) = p_query_name { req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); @@ -1507,8 +1682,12 @@ pub async fn issue_create_issue_comment_attachment(configuration: &configuration let mut multipart_form = reqwest::multipart::Form::new(); let file = TokioFile::open(&p_form_attachment).await?; let stream = FramedRead::new(file, BytesCodec::new()); - let file_name = p_form_attachment.file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_default(); - let file_part = reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)).file_name(file_name); + let file_name = p_form_attachment + .file_name() + .map(|n| n.to_string_lossy().to_string()) + .unwrap_or_default(); + let file_part = + reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)).file_name(file_name); multipart_form = multipart_form.part("attachment", file_part); req_builder = req_builder.multipart(multipart_form); @@ -1532,20 +1711,39 @@ pub async fn issue_create_issue_comment_attachment(configuration: &configuration } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_create_issue_dependencies(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { +pub async fn issue_create_issue_dependencies( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/dependencies", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/dependencies", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1624,18 +1822,34 @@ pub async fn issue_create_issue_dependencies(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_create_label(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn issue_create_label( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/labels", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1714,18 +1928,34 @@ pub async fn issue_create_label(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_create_milestone(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn issue_create_milestone( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/milestones", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/milestones", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1804,18 +2034,35 @@ pub async fn issue_create_milestone(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_delete(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { +pub async fn issue_delete( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1882,18 +2129,35 @@ pub async fn issue_delete(configuration: &configuration::Configuration, owner: & } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_delete_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { +pub async fn issue_delete_comment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1960,20 +2224,39 @@ pub async fn issue_delete_comment(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } #[deprecated] -pub async fn issue_delete_comment_deprecated(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i32, id: i64) -> Result<(), Error> { +pub async fn issue_delete_comment_deprecated( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i32, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/comments/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/comments/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2040,19 +2323,37 @@ pub async fn issue_delete_comment_deprecated(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_delete_comment_reaction(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, content: Option) -> Result<(), Error> { +pub async fn issue_delete_comment_reaction( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + content: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_body_content = content; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2120,19 +2421,38 @@ pub async fn issue_delete_comment_reaction(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_delete_issue_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, attachment_id: i64) -> Result<(), Error> { +pub async fn issue_delete_issue_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + attachment_id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_path_attachment_id = attachment_id; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, attachment_id=p_path_attachment_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + attachment_id = p_path_attachment_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2199,19 +2519,38 @@ pub async fn issue_delete_issue_attachment(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_delete_issue_comment_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64) -> Result<(), Error> { +pub async fn issue_delete_issue_comment_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + attachment_id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_path_attachment_id = attachment_id; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id, + attachment_id = p_path_attachment_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2277,20 +2616,39 @@ pub async fn issue_delete_issue_comment_attachment(configuration: &configuration Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_delete_issue_reaction(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, content: Option) -> Result<(), Error> { +pub async fn issue_delete_issue_reaction( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + content: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_content = content; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/reactions", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2358,18 +2716,35 @@ pub async fn issue_delete_issue_reaction(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_delete_label(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { +pub async fn issue_delete_label( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/labels/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/labels/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2436,18 +2811,35 @@ pub async fn issue_delete_label(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_delete_milestone(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { +pub async fn issue_delete_milestone( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/milestones/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/milestones/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2514,18 +2906,35 @@ pub async fn issue_delete_milestone(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_delete_stop_watch(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { +pub async fn issue_delete_stop_watch( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/stopwatch/delete", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/stopwatch/delete", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2592,19 +3001,38 @@ pub async fn issue_delete_stop_watch(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_delete_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, user: &str) -> Result<(), Error> { +pub async fn issue_delete_subscription( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + user: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_path_user = user; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, user=crate::apis::urlencode(p_path_user)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + user = crate::apis::urlencode(p_path_user) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2671,19 +3099,38 @@ pub async fn issue_delete_subscription(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_delete_time(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64) -> Result<(), Error> { +pub async fn issue_delete_time( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/times/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/times/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2750,19 +3197,37 @@ pub async fn issue_delete_time(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_edit_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { +pub async fn issue_edit_comment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2841,12 +3306,23 @@ pub async fn issue_edit_comment(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } #[deprecated] -pub async fn issue_edit_comment_deprecated(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i32, id: i64, body: Option) -> Result> { +pub async fn issue_edit_comment_deprecated( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i32, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -2854,8 +3330,17 @@ pub async fn issue_edit_comment_deprecated(configuration: &configuration::Config let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/comments/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/comments/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2934,19 +3419,37 @@ pub async fn issue_edit_comment_deprecated(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_edit_issue(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { +pub async fn issue_edit_issue( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3025,11 +3528,22 @@ pub async fn issue_edit_issue(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_edit_issue_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, attachment_id: i64, body: Option) -> Result> { +pub async fn issue_edit_issue_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + attachment_id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -3037,8 +3551,17 @@ pub async fn issue_edit_issue_attachment(configuration: &configuration::Configur let p_path_attachment_id = attachment_id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, attachment_id=p_path_attachment_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + attachment_id = p_path_attachment_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3117,11 +3640,22 @@ pub async fn issue_edit_issue_attachment(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_edit_issue_comment_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64, body: Option) -> Result> { +pub async fn issue_edit_issue_comment_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + attachment_id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -3129,8 +3663,17 @@ pub async fn issue_edit_issue_comment_attachment(configuration: &configuration:: let p_path_attachment_id = attachment_id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id, + attachment_id = p_path_attachment_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3208,20 +3751,39 @@ pub async fn issue_edit_issue_comment_attachment(configuration: &configuration:: } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_edit_issue_deadline(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { +pub async fn issue_edit_issue_deadline( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/deadline", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/deadline", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3300,19 +3862,37 @@ pub async fn issue_edit_issue_deadline(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_edit_label(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { +pub async fn issue_edit_label( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/labels/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/labels/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3391,19 +3971,37 @@ pub async fn issue_edit_label(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_edit_milestone(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { +pub async fn issue_edit_milestone( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/milestones/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/milestones/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3482,17 +4080,32 @@ pub async fn issue_edit_milestone(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { +pub async fn issue_get_comment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3571,17 +4184,32 @@ pub async fn issue_get_comment(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_comment_reactions(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result, Error> { +pub async fn issue_get_comment_reactions( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3660,11 +4288,22 @@ pub async fn issue_get_comment_reactions(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_comments(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, since: Option, before: Option) -> Result, Error> { +pub async fn issue_get_comments( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + since: Option, + before: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -3672,7 +4311,13 @@ pub async fn issue_get_comments(configuration: &configuration::Configuration, ow let p_query_since = since; let p_query_before = before; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/comments", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/comments", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_since { @@ -3757,11 +4402,24 @@ pub async fn issue_get_comments(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_comments_and_timeline(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, since: Option, page: Option, limit: Option, before: Option) -> Result, Error> { +pub async fn issue_get_comments_and_timeline( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + since: Option, + page: Option, + limit: Option, + before: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -3771,7 +4429,13 @@ pub async fn issue_get_comments_and_timeline(configuration: &configuration::Conf let p_query_limit = limit; let p_query_before = before; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/timeline", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/timeline", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_since { @@ -3862,17 +4526,32 @@ pub async fn issue_get_comments_and_timeline(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_issue(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result> { +pub async fn issue_get_issue( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3951,18 +4630,35 @@ pub async fn issue_get_issue(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_issue_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, attachment_id: i64) -> Result> { +pub async fn issue_get_issue_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + attachment_id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_path_attachment_id = attachment_id; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, attachment_id=p_path_attachment_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + attachment_id = p_path_attachment_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4041,18 +4737,35 @@ pub async fn issue_get_issue_attachment(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_issue_comment_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64) -> Result> { +pub async fn issue_get_issue_comment_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + attachment_id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_path_attachment_id = attachment_id; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id, + attachment_id = p_path_attachment_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4130,12 +4843,24 @@ pub async fn issue_get_issue_comment_attachment(configuration: &configuration::C } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_issue_reactions(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option) -> Result, Error> { +pub async fn issue_get_issue_reactions( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -4143,7 +4868,13 @@ pub async fn issue_get_issue_reactions(configuration: &configuration::Configurat let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/reactions", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -4228,17 +4959,32 @@ pub async fn issue_get_issue_reactions(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_label(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { +pub async fn issue_get_label( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/labels/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/labels/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4317,17 +5063,32 @@ pub async fn issue_get_label(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_labels(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result, Error> { +pub async fn issue_get_labels( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/labels", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4406,17 +5167,32 @@ pub async fn issue_get_labels(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_milestone(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { +pub async fn issue_get_milestone( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/milestones/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/milestones/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4495,11 +5271,23 @@ pub async fn issue_get_milestone(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_milestones_list(configuration: &configuration::Configuration, owner: &str, repo: &str, state: Option<&str>, name: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn issue_get_milestones_list( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + state: Option<&str>, + name: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -4508,7 +5296,12 @@ pub async fn issue_get_milestones_list(configuration: &configuration::Configurat let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/milestones", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/milestones", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_state { @@ -4599,11 +5392,23 @@ pub async fn issue_get_milestones_list(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_get_repo_comments(configuration: &configuration::Configuration, owner: &str, repo: &str, since: Option, before: Option, page: Option, limit: Option) -> Result, Error> { +pub async fn issue_get_repo_comments( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + since: Option, + before: Option, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -4612,7 +5417,12 @@ pub async fn issue_get_repo_comments(configuration: &configuration::Configuratio let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_since { @@ -4703,11 +5513,22 @@ pub async fn issue_get_repo_comments(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_list_blocks(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option) -> Result, Error> { +pub async fn issue_list_blocks( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -4715,7 +5536,13 @@ pub async fn issue_list_blocks(configuration: &configuration::Configuration, own let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/blocks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/blocks", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -4800,17 +5627,32 @@ pub async fn issue_list_blocks(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_list_issue_attachments(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result, Error> { +pub async fn issue_list_issue_attachments( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/assets", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4889,17 +5731,32 @@ pub async fn issue_list_issue_attachments(configuration: &configuration::Configu } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_list_issue_comment_attachments(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result, Error> { +pub async fn issue_list_issue_comment_attachments( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments/{id}/assets", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4977,12 +5834,24 @@ pub async fn issue_list_issue_comment_attachments(configuration: &configuration: } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_list_issue_dependencies(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option) -> Result, Error> { +pub async fn issue_list_issue_dependencies( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -4990,7 +5859,13 @@ pub async fn issue_list_issue_dependencies(configuration: &configuration::Config let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/dependencies", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/dependencies", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -5075,11 +5950,32 @@ pub async fn issue_list_issue_dependencies(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_list_issues(configuration: &configuration::Configuration, owner: &str, repo: &str, state: Option<&str>, labels: Option<&str>, q: Option<&str>, r#type: Option<&str>, milestones: Option<&str>, since: Option, before: Option, created_by: Option<&str>, assigned_by: Option<&str>, mentioned_by: Option<&str>, page: Option, limit: Option, sort: Option<&str>) -> Result, Error> { +pub async fn issue_list_issues( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + state: Option<&str>, + labels: Option<&str>, + q: Option<&str>, + r#type: Option<&str>, + milestones: Option<&str>, + since: Option, + before: Option, + created_by: Option<&str>, + assigned_by: Option<&str>, + mentioned_by: Option<&str>, + page: Option, + limit: Option, + sort: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -5097,7 +5993,12 @@ pub async fn issue_list_issues(configuration: &configuration::Configuration, own let p_query_limit = limit; let p_query_sort = sort; - let uri_str = format!("{}/repos/{owner}/{repo}/issues", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_state { @@ -5215,11 +6116,22 @@ pub async fn issue_list_issues(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_list_labels(configuration: &configuration::Configuration, owner: &str, repo: &str, sort: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn issue_list_labels( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sort: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -5227,7 +6139,12 @@ pub async fn issue_list_labels(configuration: &configuration::Configuration, own let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/labels", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_sort { @@ -5315,19 +6232,37 @@ pub async fn issue_list_labels(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_post_comment_reaction(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, content: Option) -> Result> { +pub async fn issue_post_comment_reaction( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + content: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_body_content = content; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5406,19 +6341,37 @@ pub async fn issue_post_comment_reaction(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_post_issue_reaction(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, content: Option) -> Result> { +pub async fn issue_post_issue_reaction( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + content: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_content = content; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/reactions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/reactions", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5497,19 +6450,37 @@ pub async fn issue_post_issue_reaction(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_remove_issue_blocking(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { +pub async fn issue_remove_issue_blocking( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/blocks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/blocks", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5588,19 +6559,37 @@ pub async fn issue_remove_issue_blocking(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_remove_issue_dependencies(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { +pub async fn issue_remove_issue_dependencies( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/dependencies", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/dependencies", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5679,11 +6668,22 @@ pub async fn issue_remove_issue_dependencies(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_remove_label(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, identifier: &str, body: Option) -> Result<(), Error> { +pub async fn issue_remove_label( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + identifier: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -5691,8 +6691,17 @@ pub async fn issue_remove_label(configuration: &configuration::Configuration, ow let p_path_identifier = identifier; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/labels/{identifier}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, identifier=crate::apis::urlencode(p_path_identifier)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/labels/{identifier}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + identifier = crate::apis::urlencode(p_path_identifier) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5760,18 +6769,34 @@ pub async fn issue_remove_label(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_replace_labels(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result, Error> { +pub async fn issue_replace_labels( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/labels", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/labels", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -5851,18 +6876,35 @@ pub async fn issue_replace_labels(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_reset_time(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { +pub async fn issue_reset_time( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/times", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/times", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5929,11 +6971,35 @@ pub async fn issue_reset_time(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_search_issues(configuration: &configuration::Configuration, state: Option<&str>, labels: Option<&str>, milestones: Option<&str>, q: Option<&str>, priority_repo_id: Option, r#type: Option<&str>, since: Option, before: Option, assigned: Option, created: Option, mentioned: Option, review_requested: Option, reviewed: Option, owner: Option<&str>, team: Option<&str>, page: Option, limit: Option, sort: Option<&str>) -> Result, Error> { +pub async fn issue_search_issues( + configuration: &configuration::Configuration, + state: Option<&str>, + labels: Option<&str>, + milestones: Option<&str>, + q: Option<&str>, + priority_repo_id: Option, + r#type: Option<&str>, + since: Option, + before: Option, + assigned: Option, + created: Option, + mentioned: Option, + review_requested: Option, + reviewed: Option, + owner: Option<&str>, + team: Option<&str>, + page: Option, + limit: Option, + sort: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_state = state; let p_query_labels = labels; @@ -6087,18 +7153,35 @@ pub async fn issue_search_issues(configuration: &configuration::Configuration, s } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_start_stop_watch(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { +pub async fn issue_start_stop_watch( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/stopwatch/start", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/stopwatch/start", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6165,18 +7248,35 @@ pub async fn issue_start_stop_watch(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_stop_stop_watch(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { +pub async fn issue_stop_stop_watch( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/stopwatch/stop", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/stopwatch/stop", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6243,11 +7343,22 @@ pub async fn issue_stop_stop_watch(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_subscriptions(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option) -> Result, Error> { +pub async fn issue_subscriptions( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -6255,7 +7366,13 @@ pub async fn issue_subscriptions(configuration: &configuration::Configuration, o let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/subscriptions", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/subscriptions", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -6340,11 +7457,25 @@ pub async fn issue_subscriptions(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn issue_tracked_times(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, user: Option<&str>, since: Option, before: Option, page: Option, limit: Option) -> Result, Error> { +pub async fn issue_tracked_times( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + user: Option<&str>, + since: Option, + before: Option, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -6355,7 +7486,13 @@ pub async fn issue_tracked_times(configuration: &configuration::Configuration, o let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/times", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/times", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_user { @@ -6449,19 +7586,38 @@ pub async fn issue_tracked_times(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn move_issue_pin(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, position: i64) -> Result<(), Error> { +pub async fn move_issue_pin( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + position: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_path_position = position; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/pin/{position}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, position=p_path_position); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/pin/{position}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + position = p_path_position + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6528,18 +7684,35 @@ pub async fn move_issue_pin(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn pin_issue(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { +pub async fn pin_issue( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/pin", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/pin", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6606,18 +7779,35 @@ pub async fn pin_issue(configuration: &configuration::Configuration, owner: &str } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn unpin_issue(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { +pub async fn unpin_issue( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/{index}/pin", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/{index}/pin", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6684,7 +7874,10 @@ pub async fn unpin_issue(configuration: &configuration::Configuration, owner: &s } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/forgejo-openapi/src/apis/miscellaneous_api.rs b/forgejo-openapi/src/apis/miscellaneous_api.rs index 73db474..9b34ecc 100644 --- a/forgejo-openapi/src/apis/miscellaneous_api.rs +++ b/forgejo-openapi/src/apis/miscellaneous_api.rs @@ -4,16 +4,14 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ - -use reqwest; -use serde::{Deserialize, Serialize, de::Error as _}; +use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; /// struct for typed errors of method [`get_gitignore_template_info`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -113,12 +111,18 @@ pub enum RenderMarkupError { UnknownValue(serde_json::Value), } - -pub async fn get_gitignore_template_info(configuration: &configuration::Configuration, name: &str) -> Result> { +pub async fn get_gitignore_template_info( + configuration: &configuration::Configuration, + name: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_name = name; - let uri_str = format!("{}/gitignore/templates/{name}", configuration.base_path, name=crate::apis::urlencode(p_path_name)); + let uri_str = format!( + "{}/gitignore/templates/{name}", + configuration.base_path, + name = crate::apis::urlencode(p_path_name) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -197,15 +201,26 @@ pub async fn get_gitignore_template_info(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_label_template_info(configuration: &configuration::Configuration, name: &str) -> Result, Error> { +pub async fn get_label_template_info( + configuration: &configuration::Configuration, + name: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_name = name; - let uri_str = format!("{}/label/templates/{name}", configuration.base_path, name=crate::apis::urlencode(p_path_name)); + let uri_str = format!( + "{}/label/templates/{name}", + configuration.base_path, + name = crate::apis::urlencode(p_path_name) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -284,15 +299,26 @@ pub async fn get_label_template_info(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_license_template_info(configuration: &configuration::Configuration, name: &str) -> Result> { +pub async fn get_license_template_info( + configuration: &configuration::Configuration, + name: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_name = name; - let uri_str = format!("{}/licenses/{name}", configuration.base_path, name=crate::apis::urlencode(p_path_name)); + let uri_str = format!( + "{}/licenses/{name}", + configuration.base_path, + name = crate::apis::urlencode(p_path_name) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -371,12 +397,17 @@ pub async fn get_license_template_info(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_node_info(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn get_node_info( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/nodeinfo", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -456,12 +487,17 @@ pub async fn get_node_info(configuration: &configuration::Configuration, ) -> Re } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_signing_key(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn get_signing_key( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/signing-key.gpg", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -541,12 +577,17 @@ pub async fn get_signing_key(configuration: &configuration::Configuration, ) -> } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_ssh_signing_key(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn get_ssh_signing_key( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/signing-key.ssh", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -626,12 +667,17 @@ pub async fn get_ssh_signing_key(configuration: &configuration::Configuration, ) } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_version(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn get_version( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/version", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -711,12 +757,17 @@ pub async fn get_version(configuration: &configuration::Configuration, ) -> Resu } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn list_gitignores_templates(configuration: &configuration::Configuration, ) -> Result, Error> { - +pub async fn list_gitignores_templates( + configuration: &configuration::Configuration, +) -> Result, Error> { let uri_str = format!("{}/gitignore/templates", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -796,12 +847,17 @@ pub async fn list_gitignores_templates(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn list_label_templates(configuration: &configuration::Configuration, ) -> Result, Error> { - +pub async fn list_label_templates( + configuration: &configuration::Configuration, +) -> Result, Error> { let uri_str = format!("{}/label/templates", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -881,12 +937,17 @@ pub async fn list_label_templates(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn list_license_templates(configuration: &configuration::Configuration, ) -> Result, Error> { - +pub async fn list_license_templates( + configuration: &configuration::Configuration, +) -> Result, Error> { let uri_str = format!("{}/licenses", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -966,16 +1027,25 @@ pub async fn list_license_templates(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn render_markdown(configuration: &configuration::Configuration, body: Option) -> Result> { +pub async fn render_markdown( + configuration: &configuration::Configuration, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/markdown", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1054,16 +1124,25 @@ pub async fn render_markdown(configuration: &configuration::Configuration, body: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn render_markdown_raw(configuration: &configuration::Configuration, body: &str) -> Result> { +pub async fn render_markdown_raw( + configuration: &configuration::Configuration, + body: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/markdown/raw", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1142,16 +1221,25 @@ pub async fn render_markdown_raw(configuration: &configuration::Configuration, b } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn render_markup(configuration: &configuration::Configuration, body: Option) -> Result> { +pub async fn render_markup( + configuration: &configuration::Configuration, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/markup", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1230,7 +1318,10 @@ pub async fn render_markup(configuration: &configuration::Configuration, body: O } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/forgejo-openapi/src/apis/mod.rs b/forgejo-openapi/src/apis/mod.rs index 8e80732..447fc60 100644 --- a/forgejo-openapi/src/apis/mod.rs +++ b/forgejo-openapi/src/apis/mod.rs @@ -16,7 +16,7 @@ pub enum Error { ResponseError(ResponseContent), } -impl fmt::Display for Error { +impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), @@ -28,7 +28,7 @@ impl fmt::Display for Error { } } -impl error::Error for Error { +impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, @@ -39,19 +39,19 @@ impl error::Error for Error { } } -impl From for Error { +impl From for Error { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } -impl From for Error { +impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } -impl From for Error { +impl From for Error { fn from(e: std::io::Error) -> Self { Error::Io(e) } @@ -78,8 +78,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String value, )); } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } @@ -96,7 +98,7 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String enum ContentType { Json, Text, - Unsupported(String) + Unsupported(String), } impl From<&str> for ContentType { diff --git a/forgejo-openapi/src/apis/notification_api.rs b/forgejo-openapi/src/apis/notification_api.rs index a90f309..b1652cd 100644 --- a/forgejo-openapi/src/apis/notification_api.rs +++ b/forgejo-openapi/src/apis/notification_api.rs @@ -4,16 +4,14 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ - -use reqwest; -use serde::{Deserialize, Serialize, de::Error as _}; +use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; /// struct for typed errors of method [`notify_get_list`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -68,8 +66,16 @@ pub enum NotifyReadThreadError { UnknownValue(serde_json::Value), } - -pub async fn notify_get_list(configuration: &configuration::Configuration, all: Option, status_types: Option>, subject_type: Option>, since: Option, before: Option, page: Option, limit: Option) -> Result, Error> { +pub async fn notify_get_list( + configuration: &configuration::Configuration, + all: Option, + status_types: Option>, + subject_type: Option>, + since: Option, + before: Option, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_all = all; let p_query_status_types = status_types; @@ -87,14 +93,40 @@ pub async fn notify_get_list(configuration: &configuration::Configuration, all: } if let Some(ref param_value) = p_query_status_types { req_builder = match "multi" { - "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("status-types".to_owned(), p.to_string())).collect::>()), - _ => req_builder.query(&[("status-types", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + "multi" => req_builder.query( + ¶m_value + .into_iter() + .map(|p| ("status-types".to_owned(), p.to_string())) + .collect::>(), + ), + _ => req_builder.query(&[( + "status-types", + ¶m_value + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]), }; } if let Some(ref param_value) = p_query_subject_type { req_builder = match "multi" { - "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("subject-type".to_owned(), p.to_string())).collect::>()), - _ => req_builder.query(&[("subject-type", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + "multi" => req_builder.query( + ¶m_value + .into_iter() + .map(|p| ("subject-type".to_owned(), p.to_string())) + .collect::>(), + ), + _ => req_builder.query(&[( + "subject-type", + ¶m_value + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]), }; } if let Some(ref param_value) = p_query_since { @@ -185,11 +217,26 @@ pub async fn notify_get_list(configuration: &configuration::Configuration, all: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn notify_get_repo_list(configuration: &configuration::Configuration, owner: &str, repo: &str, all: Option, status_types: Option>, subject_type: Option>, since: Option, before: Option, page: Option, limit: Option) -> Result, Error> { +pub async fn notify_get_repo_list( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + all: Option, + status_types: Option>, + subject_type: Option>, + since: Option, + before: Option, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -201,7 +248,12 @@ pub async fn notify_get_repo_list(configuration: &configuration::Configuration, let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/notifications", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/notifications", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_all { @@ -209,14 +261,40 @@ pub async fn notify_get_repo_list(configuration: &configuration::Configuration, } if let Some(ref param_value) = p_query_status_types { req_builder = match "multi" { - "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("status-types".to_owned(), p.to_string())).collect::>()), - _ => req_builder.query(&[("status-types", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + "multi" => req_builder.query( + ¶m_value + .into_iter() + .map(|p| ("status-types".to_owned(), p.to_string())) + .collect::>(), + ), + _ => req_builder.query(&[( + "status-types", + ¶m_value + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]), }; } if let Some(ref param_value) = p_query_subject_type { req_builder = match "multi" { - "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("subject-type".to_owned(), p.to_string())).collect::>()), - _ => req_builder.query(&[("subject-type", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + "multi" => req_builder.query( + ¶m_value + .into_iter() + .map(|p| ("subject-type".to_owned(), p.to_string())) + .collect::>(), + ), + _ => req_builder.query(&[( + "subject-type", + ¶m_value + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]), }; } if let Some(ref param_value) = p_query_since { @@ -307,15 +385,26 @@ pub async fn notify_get_repo_list(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn notify_get_thread(configuration: &configuration::Configuration, id: i64) -> Result> { +pub async fn notify_get_thread( + configuration: &configuration::Configuration, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/notifications/threads/{id}", configuration.base_path, id=p_path_id); + let uri_str = format!( + "{}/notifications/threads/{id}", + configuration.base_path, + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -394,12 +483,17 @@ pub async fn notify_get_thread(configuration: &configuration::Configuration, id: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn notify_new_available(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn notify_new_available( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/notifications/new", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -479,11 +573,21 @@ pub async fn notify_new_available(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn notify_read_list(configuration: &configuration::Configuration, last_read_at: Option, all: Option, status_types: Option>, to_status: Option<&str>) -> Result, Error> { +pub async fn notify_read_list( + configuration: &configuration::Configuration, + last_read_at: Option, + all: Option, + status_types: Option>, + to_status: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_last_read_at = last_read_at; let p_query_all = all; @@ -501,8 +605,21 @@ pub async fn notify_read_list(configuration: &configuration::Configuration, last } if let Some(ref param_value) = p_query_status_types { req_builder = match "multi" { - "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("status-types".to_owned(), p.to_string())).collect::>()), - _ => req_builder.query(&[("status-types", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + "multi" => req_builder.query( + ¶m_value + .into_iter() + .map(|p| ("status-types".to_owned(), p.to_string())) + .collect::>(), + ), + _ => req_builder.query(&[( + "status-types", + ¶m_value + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]), }; } if let Some(ref param_value) = p_query_to_status { @@ -584,11 +701,23 @@ pub async fn notify_read_list(configuration: &configuration::Configuration, last } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn notify_read_repo_list(configuration: &configuration::Configuration, owner: &str, repo: &str, all: Option, status_types: Option>, to_status: Option<&str>, last_read_at: Option) -> Result, Error> { +pub async fn notify_read_repo_list( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + all: Option, + status_types: Option>, + to_status: Option<&str>, + last_read_at: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -597,7 +726,12 @@ pub async fn notify_read_repo_list(configuration: &configuration::Configuration, let p_query_to_status = to_status; let p_query_last_read_at = last_read_at; - let uri_str = format!("{}/repos/{owner}/{repo}/notifications", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/notifications", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref param_value) = p_query_all { @@ -605,8 +739,21 @@ pub async fn notify_read_repo_list(configuration: &configuration::Configuration, } if let Some(ref param_value) = p_query_status_types { req_builder = match "multi" { - "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("status-types".to_owned(), p.to_string())).collect::>()), - _ => req_builder.query(&[("status-types", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + "multi" => req_builder.query( + ¶m_value + .into_iter() + .map(|p| ("status-types".to_owned(), p.to_string())) + .collect::>(), + ), + _ => req_builder.query(&[( + "status-types", + ¶m_value + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]), }; } if let Some(ref param_value) = p_query_to_status { @@ -691,17 +838,31 @@ pub async fn notify_read_repo_list(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn notify_read_thread(configuration: &configuration::Configuration, id: i64, to_status: Option<&str>) -> Result> { +pub async fn notify_read_thread( + configuration: &configuration::Configuration, + id: i64, + to_status: Option<&str>, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_query_to_status = to_status; - let uri_str = format!("{}/notifications/threads/{id}", configuration.base_path, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/notifications/threads/{id}", + configuration.base_path, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref param_value) = p_query_to_status { req_builder = req_builder.query(&[("to-status", ¶m_value.to_string())]); @@ -782,7 +943,10 @@ pub async fn notify_read_thread(configuration: &configuration::Configuration, id } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/forgejo-openapi/src/apis/organization_api.rs b/forgejo-openapi/src/apis/organization_api.rs index 150b4f4..e988c0b 100644 --- a/forgejo-openapi/src/apis/organization_api.rs +++ b/forgejo-openapi/src/apis/organization_api.rs @@ -4,16 +4,14 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ - -use reqwest; -use serde::{Deserialize, Serialize, de::Error as _}; +use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; /// struct for typed errors of method [`create_org_repo`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -564,14 +562,23 @@ pub enum UpdateOrgVariableError { UnknownValue(serde_json::Value), } - -pub async fn create_org_repo(configuration: &configuration::Configuration, org: &str, body: Option) -> Result> { +pub async fn create_org_repo( + configuration: &configuration::Configuration, + org: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}/repos", configuration.base_path, org=crate::apis::urlencode(p_path_org)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/repos", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -650,18 +657,32 @@ pub async fn create_org_repo(configuration: &configuration::Configuration, org: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } #[deprecated] -pub async fn create_org_repo_deprecated(configuration: &configuration::Configuration, org: &str, body: Option) -> Result> { +pub async fn create_org_repo_deprecated( + configuration: &configuration::Configuration, + org: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_body_body = body; - let uri_str = format!("{}/org/{org}/repos", configuration.base_path, org=crate::apis::urlencode(p_path_org)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/org/{org}/repos", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -740,18 +761,34 @@ pub async fn create_org_repo_deprecated(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn create_org_variable(configuration: &configuration::Configuration, org: &str, variablename: &str, body: Option) -> Result<(), Error> { +pub async fn create_org_variable( + configuration: &configuration::Configuration, + org: &str, + variablename: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_variablename = variablename; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}/actions/variables/{variablename}", configuration.base_path, org=crate::apis::urlencode(p_path_org), variablename=crate::apis::urlencode(p_path_variablename)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/actions/variables/{variablename}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + variablename = crate::apis::urlencode(p_path_variablename) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -819,17 +856,32 @@ pub async fn create_org_variable(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn delete_org_secret(configuration: &configuration::Configuration, org: &str, secretname: &str) -> Result<(), Error> { +pub async fn delete_org_secret( + configuration: &configuration::Configuration, + org: &str, + secretname: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_secretname = secretname; - let uri_str = format!("{}/orgs/{org}/actions/secrets/{secretname}", configuration.base_path, org=crate::apis::urlencode(p_path_org), secretname=crate::apis::urlencode(p_path_secretname)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/actions/secrets/{secretname}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + secretname = crate::apis::urlencode(p_path_secretname) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -896,17 +948,32 @@ pub async fn delete_org_secret(configuration: &configuration::Configuration, org } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn delete_org_variable(configuration: &configuration::Configuration, org: &str, variablename: &str) -> Result<(), Error> { +pub async fn delete_org_variable( + configuration: &configuration::Configuration, + org: &str, + variablename: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_variablename = variablename; - let uri_str = format!("{}/orgs/{org}/actions/variables/{variablename}", configuration.base_path, org=crate::apis::urlencode(p_path_org), variablename=crate::apis::urlencode(p_path_variablename)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/actions/variables/{variablename}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + variablename = crate::apis::urlencode(p_path_variablename) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -973,16 +1040,29 @@ pub async fn delete_org_variable(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_org_variable(configuration: &configuration::Configuration, org: &str, variablename: &str) -> Result> { +pub async fn get_org_variable( + configuration: &configuration::Configuration, + org: &str, + variablename: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_variablename = variablename; - let uri_str = format!("{}/orgs/{org}/actions/variables/{variablename}", configuration.base_path, org=crate::apis::urlencode(p_path_org), variablename=crate::apis::urlencode(p_path_variablename)); + let uri_str = format!( + "{}/orgs/{org}/actions/variables/{variablename}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + variablename = crate::apis::urlencode(p_path_variablename) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -1061,17 +1141,30 @@ pub async fn get_org_variable(configuration: &configuration::Configuration, org: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_org_variables_list(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn get_org_variables_list( + configuration: &configuration::Configuration, + org: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/actions/variables", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/actions/variables", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -1156,16 +1249,29 @@ pub async fn get_org_variables_list(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_add_team_member(configuration: &configuration::Configuration, id: i64, username: &str) -> Result<(), Error> { +pub async fn org_add_team_member( + configuration: &configuration::Configuration, + id: i64, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_path_username = username; - let uri_str = format!("{}/teams/{id}/members/{username}", configuration.base_path, id=p_path_id, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/teams/{id}/members/{username}", + configuration.base_path, + id = p_path_id, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -1233,17 +1339,32 @@ pub async fn org_add_team_member(configuration: &configuration::Configuration, i } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_add_team_repository(configuration: &configuration::Configuration, id: i64, org: &str, repo: &str) -> Result<(), Error> { +pub async fn org_add_team_repository( + configuration: &configuration::Configuration, + id: i64, + org: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_path_org = org; let p_path_repo = repo; - let uri_str = format!("{}/teams/{id}/repos/{org}/{repo}", configuration.base_path, id=p_path_id, org=crate::apis::urlencode(p_path_org), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/teams/{id}/repos/{org}/{repo}", + configuration.base_path, + id = p_path_id, + org = crate::apis::urlencode(p_path_org), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -1311,16 +1432,29 @@ pub async fn org_add_team_repository(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_block_user(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { +pub async fn org_block_user( + configuration: &configuration::Configuration, + org: &str, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_username = username; - let uri_str = format!("{}/orgs/{org}/block/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/orgs/{org}/block/{username}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -1388,16 +1522,28 @@ pub async fn org_block_user(configuration: &configuration::Configuration, org: & } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_check_quota(configuration: &configuration::Configuration, org: &str, subject: &str) -> Result> { +pub async fn org_check_quota( + configuration: &configuration::Configuration, + org: &str, + subject: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_subject = subject; - let uri_str = format!("{}/orgs/{org}/quota/check", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/quota/check", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("subject", &p_query_subject.to_string())]); @@ -1477,17 +1623,32 @@ pub async fn org_check_quota(configuration: &configuration::Configuration, org: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_conceal_member(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { +pub async fn org_conceal_member( + configuration: &configuration::Configuration, + org: &str, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_username = username; - let uri_str = format!("{}/orgs/{org}/public_members/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/public_members/{username}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1554,16 +1715,25 @@ pub async fn org_conceal_member(configuration: &configuration::Configuration, or } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_create(configuration: &configuration::Configuration, organization: models::CreateOrgOption) -> Result> { +pub async fn org_create( + configuration: &configuration::Configuration, + organization: models::CreateOrgOption, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_organization = organization; let uri_str = format!("{}/orgs", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1642,17 +1812,31 @@ pub async fn org_create(configuration: &configuration::Configuration, organizati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_create_hook(configuration: &configuration::Configuration, org: &str, body: models::CreateHookOption) -> Result> { +pub async fn org_create_hook( + configuration: &configuration::Configuration, + org: &str, + body: models::CreateHookOption, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}/hooks", configuration.base_path, org=crate::apis::urlencode(p_path_org)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/hooks", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1731,17 +1915,31 @@ pub async fn org_create_hook(configuration: &configuration::Configuration, org: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_create_label(configuration: &configuration::Configuration, org: &str, body: Option) -> Result> { +pub async fn org_create_label( + configuration: &configuration::Configuration, + org: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}/labels", configuration.base_path, org=crate::apis::urlencode(p_path_org)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/labels", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1820,17 +2018,31 @@ pub async fn org_create_label(configuration: &configuration::Configuration, org: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_create_team(configuration: &configuration::Configuration, org: &str, body: Option) -> Result> { +pub async fn org_create_team( + configuration: &configuration::Configuration, + org: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}/teams", configuration.base_path, org=crate::apis::urlencode(p_path_org)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/teams", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1909,16 +2121,29 @@ pub async fn org_create_team(configuration: &configuration::Configuration, org: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_delete(configuration: &configuration::Configuration, org: &str) -> Result<(), Error> { +pub async fn org_delete( + configuration: &configuration::Configuration, + org: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; - let uri_str = format!("{}/orgs/{org}", configuration.base_path, org=crate::apis::urlencode(p_path_org)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/orgs/{org}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1985,16 +2210,29 @@ pub async fn org_delete(configuration: &configuration::Configuration, org: &str) } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_delete_avatar(configuration: &configuration::Configuration, org: &str) -> Result<(), Error> { +pub async fn org_delete_avatar( + configuration: &configuration::Configuration, + org: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; - let uri_str = format!("{}/orgs/{org}/avatar", configuration.base_path, org=crate::apis::urlencode(p_path_org)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/avatar", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2061,17 +2299,32 @@ pub async fn org_delete_avatar(configuration: &configuration::Configuration, org } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_delete_hook(configuration: &configuration::Configuration, org: &str, id: i64) -> Result<(), Error> { +pub async fn org_delete_hook( + configuration: &configuration::Configuration, + org: &str, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_id = id; - let uri_str = format!("{}/orgs/{org}/hooks/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/hooks/{id}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2138,17 +2391,32 @@ pub async fn org_delete_hook(configuration: &configuration::Configuration, org: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_delete_label(configuration: &configuration::Configuration, org: &str, id: i64) -> Result<(), Error> { +pub async fn org_delete_label( + configuration: &configuration::Configuration, + org: &str, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_id = id; - let uri_str = format!("{}/orgs/{org}/labels/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/labels/{id}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2215,17 +2483,32 @@ pub async fn org_delete_label(configuration: &configuration::Configuration, org: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_delete_member(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { +pub async fn org_delete_member( + configuration: &configuration::Configuration, + org: &str, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_username = username; - let uri_str = format!("{}/orgs/{org}/members/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/members/{username}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2292,16 +2575,25 @@ pub async fn org_delete_member(configuration: &configuration::Configuration, org } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_delete_team(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { +pub async fn org_delete_team( + configuration: &configuration::Configuration, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/teams/{id}", configuration.base_path, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!("{}/teams/{id}", configuration.base_path, id = p_path_id); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2368,17 +2660,31 @@ pub async fn org_delete_team(configuration: &configuration::Configuration, id: i } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_edit(configuration: &configuration::Configuration, org: &str, body: models::EditOrgOption) -> Result> { +pub async fn org_edit( + configuration: &configuration::Configuration, + org: &str, + body: models::EditOrgOption, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}", configuration.base_path, org=crate::apis::urlencode(p_path_org)); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/orgs/{org}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2457,18 +2763,34 @@ pub async fn org_edit(configuration: &configuration::Configuration, org: &str, b } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_edit_hook(configuration: &configuration::Configuration, org: &str, id: i64, body: Option) -> Result> { +pub async fn org_edit_hook( + configuration: &configuration::Configuration, + org: &str, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}/hooks/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/hooks/{id}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2547,18 +2869,34 @@ pub async fn org_edit_hook(configuration: &configuration::Configuration, org: &s } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_edit_label(configuration: &configuration::Configuration, org: &str, id: i64, body: Option) -> Result> { +pub async fn org_edit_label( + configuration: &configuration::Configuration, + org: &str, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}/labels/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/labels/{id}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2637,17 +2975,27 @@ pub async fn org_edit_label(configuration: &configuration::Configuration, org: & } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_edit_team(configuration: &configuration::Configuration, id: i64, body: Option) -> Result> { +pub async fn org_edit_team( + configuration: &configuration::Configuration, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/teams/{id}", configuration.base_path, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!("{}/teams/{id}", configuration.base_path, id = p_path_id); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2726,15 +3074,26 @@ pub async fn org_edit_team(configuration: &configuration::Configuration, id: i64 } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_get(configuration: &configuration::Configuration, org: &str) -> Result> { +pub async fn org_get( + configuration: &configuration::Configuration, + org: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; - let uri_str = format!("{}/orgs/{org}", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2813,11 +3172,19 @@ pub async fn org_get(configuration: &configuration::Configuration, org: &str) -> } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_get_all(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn org_get_all( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -2907,16 +3274,29 @@ pub async fn org_get_all(configuration: &configuration::Configuration, page: Opt } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_get_hook(configuration: &configuration::Configuration, org: &str, id: i64) -> Result> { +pub async fn org_get_hook( + configuration: &configuration::Configuration, + org: &str, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_id = id; - let uri_str = format!("{}/orgs/{org}/hooks/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); + let uri_str = format!( + "{}/orgs/{org}/hooks/{id}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2995,16 +3375,29 @@ pub async fn org_get_hook(configuration: &configuration::Configuration, org: &st } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_get_label(configuration: &configuration::Configuration, org: &str, id: i64) -> Result> { +pub async fn org_get_label( + configuration: &configuration::Configuration, + org: &str, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_id = id; - let uri_str = format!("{}/orgs/{org}/labels/{id}", configuration.base_path, org=crate::apis::urlencode(p_path_org), id=p_path_id); + let uri_str = format!( + "{}/orgs/{org}/labels/{id}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3083,15 +3476,26 @@ pub async fn org_get_label(configuration: &configuration::Configuration, org: &s } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_get_quota(configuration: &configuration::Configuration, org: &str) -> Result> { +pub async fn org_get_quota( + configuration: &configuration::Configuration, + org: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; - let uri_str = format!("{}/orgs/{org}/quota", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/quota", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3170,15 +3574,26 @@ pub async fn org_get_quota(configuration: &configuration::Configuration, org: &s } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_get_runner_registration_token(configuration: &configuration::Configuration, org: &str) -> Result> { +pub async fn org_get_runner_registration_token( + configuration: &configuration::Configuration, + org: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; - let uri_str = format!("{}/orgs/{org}/actions/runners/registration-token", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/actions/runners/registration-token", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3256,16 +3671,24 @@ pub async fn org_get_runner_registration_token(configuration: &configuration::Co } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_get_team(configuration: &configuration::Configuration, id: i64) -> Result> { +pub async fn org_get_team( + configuration: &configuration::Configuration, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/teams/{id}", configuration.base_path, id=p_path_id); + let uri_str = format!("{}/teams/{id}", configuration.base_path, id = p_path_id); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3344,16 +3767,29 @@ pub async fn org_get_team(configuration: &configuration::Configuration, id: i64) } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_get_user_permissions(configuration: &configuration::Configuration, username: &str, org: &str) -> Result> { +pub async fn org_get_user_permissions( + configuration: &configuration::Configuration, + username: &str, + org: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_path_org = org; - let uri_str = format!("{}/users/{username}/orgs/{org}/permissions", configuration.base_path, username=crate::apis::urlencode(p_path_username), org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/users/{username}/orgs/{org}/permissions", + configuration.base_path, + username = crate::apis::urlencode(p_path_username), + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3432,16 +3868,29 @@ pub async fn org_get_user_permissions(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_is_member(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { +pub async fn org_is_member( + configuration: &configuration::Configuration, + org: &str, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_username = username; - let uri_str = format!("{}/orgs/{org}/members/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/orgs/{org}/members/{username}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3509,16 +3958,29 @@ pub async fn org_is_member(configuration: &configuration::Configuration, org: &s } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_is_public_member(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { +pub async fn org_is_public_member( + configuration: &configuration::Configuration, + org: &str, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_username = username; - let uri_str = format!("{}/orgs/{org}/public_members/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/orgs/{org}/public_members/{username}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3586,17 +4048,30 @@ pub async fn org_is_public_member(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_actions_secrets(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_actions_secrets( + configuration: &configuration::Configuration, + org: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/actions/secrets", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/actions/secrets", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -3681,18 +4156,32 @@ pub async fn org_list_actions_secrets(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_activity_feeds(configuration: &configuration::Configuration, org: &str, date: Option, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_activity_feeds( + configuration: &configuration::Configuration, + org: &str, + date: Option, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_date = date; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/activities/feeds", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/activities/feeds", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_date { @@ -3780,17 +4269,30 @@ pub async fn org_list_activity_feeds(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_blocked_users(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_blocked_users( + configuration: &configuration::Configuration, + org: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/list_blocked", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/list_blocked", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -3875,11 +4377,19 @@ pub async fn org_list_blocked_users(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_current_user_orgs(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_current_user_orgs( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -3969,17 +4479,30 @@ pub async fn org_list_current_user_orgs(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_hooks(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_hooks( + configuration: &configuration::Configuration, + org: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/hooks", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/hooks", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -4064,18 +4587,32 @@ pub async fn org_list_hooks(configuration: &configuration::Configuration, org: & } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_labels(configuration: &configuration::Configuration, org: &str, sort: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_labels( + configuration: &configuration::Configuration, + org: &str, + sort: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_sort = sort; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/labels", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/labels", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_sort { @@ -4163,17 +4700,30 @@ pub async fn org_list_labels(configuration: &configuration::Configuration, org: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_members(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_members( + configuration: &configuration::Configuration, + org: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/members", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/members", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -4258,17 +4808,30 @@ pub async fn org_list_members(configuration: &configuration::Configuration, org: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_public_members(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_public_members( + configuration: &configuration::Configuration, + org: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/public_members", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/public_members", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -4353,17 +4916,30 @@ pub async fn org_list_public_members(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_quota_artifacts(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_quota_artifacts( + configuration: &configuration::Configuration, + org: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/quota/artifacts", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/quota/artifacts", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -4448,17 +5024,30 @@ pub async fn org_list_quota_artifacts(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_quota_attachments(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_quota_attachments( + configuration: &configuration::Configuration, + org: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/quota/attachments", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/quota/attachments", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -4543,17 +5132,30 @@ pub async fn org_list_quota_attachments(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_quota_packages(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_quota_packages( + configuration: &configuration::Configuration, + org: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/quota/packages", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/quota/packages", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -4638,17 +5240,30 @@ pub async fn org_list_quota_packages(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_repos(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_repos( + configuration: &configuration::Configuration, + org: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/repos", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/repos", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -4733,18 +5348,32 @@ pub async fn org_list_repos(configuration: &configuration::Configuration, org: & } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_team_activity_feeds(configuration: &configuration::Configuration, id: i64, date: Option, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_team_activity_feeds( + configuration: &configuration::Configuration, + id: i64, + date: Option, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_query_date = date; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/teams/{id}/activities/feeds", configuration.base_path, id=p_path_id); + let uri_str = format!( + "{}/teams/{id}/activities/feeds", + configuration.base_path, + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_date { @@ -4832,16 +5461,29 @@ pub async fn org_list_team_activity_feeds(configuration: &configuration::Configu } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_team_member(configuration: &configuration::Configuration, id: i64, username: &str) -> Result> { +pub async fn org_list_team_member( + configuration: &configuration::Configuration, + id: i64, + username: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_path_username = username; - let uri_str = format!("{}/teams/{id}/members/{username}", configuration.base_path, id=p_path_id, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/teams/{id}/members/{username}", + configuration.base_path, + id = p_path_id, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4920,17 +5562,30 @@ pub async fn org_list_team_member(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_team_members(configuration: &configuration::Configuration, id: i64, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_team_members( + configuration: &configuration::Configuration, + id: i64, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/teams/{id}/members", configuration.base_path, id=p_path_id); + let uri_str = format!( + "{}/teams/{id}/members", + configuration.base_path, + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -5015,17 +5670,32 @@ pub async fn org_list_team_members(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_team_repo(configuration: &configuration::Configuration, id: i64, org: &str, repo: &str) -> Result> { +pub async fn org_list_team_repo( + configuration: &configuration::Configuration, + id: i64, + org: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_path_org = org; let p_path_repo = repo; - let uri_str = format!("{}/teams/{id}/repos/{org}/{repo}", configuration.base_path, id=p_path_id, org=crate::apis::urlencode(p_path_org), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/teams/{id}/repos/{org}/{repo}", + configuration.base_path, + id = p_path_id, + org = crate::apis::urlencode(p_path_org), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -5104,17 +5774,30 @@ pub async fn org_list_team_repo(configuration: &configuration::Configuration, id } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_team_repos(configuration: &configuration::Configuration, id: i64, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_team_repos( + configuration: &configuration::Configuration, + id: i64, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/teams/{id}/repos", configuration.base_path, id=p_path_id); + let uri_str = format!( + "{}/teams/{id}/repos", + configuration.base_path, + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -5199,17 +5882,30 @@ pub async fn org_list_team_repos(configuration: &configuration::Configuration, i } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_teams(configuration: &configuration::Configuration, org: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_teams( + configuration: &configuration::Configuration, + org: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/teams", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/teams", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -5294,17 +5990,30 @@ pub async fn org_list_teams(configuration: &configuration::Configuration, org: & } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_list_user_orgs(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn org_list_user_orgs( + configuration: &configuration::Configuration, + username: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/users/{username}/orgs", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}/orgs", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -5389,16 +6098,29 @@ pub async fn org_list_user_orgs(configuration: &configuration::Configuration, us } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_publicize_member(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { +pub async fn org_publicize_member( + configuration: &configuration::Configuration, + org: &str, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_username = username; - let uri_str = format!("{}/orgs/{org}/public_members/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/orgs/{org}/public_members/{username}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -5466,17 +6188,32 @@ pub async fn org_publicize_member(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_remove_team_member(configuration: &configuration::Configuration, id: i64, username: &str) -> Result<(), Error> { +pub async fn org_remove_team_member( + configuration: &configuration::Configuration, + id: i64, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_path_username = username; - let uri_str = format!("{}/teams/{id}/members/{username}", configuration.base_path, id=p_path_id, username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/teams/{id}/members/{username}", + configuration.base_path, + id = p_path_id, + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5543,19 +6280,36 @@ pub async fn org_remove_team_member(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } /// This does not delete the repository, it only removes the repository from the team. -pub async fn org_remove_team_repository(configuration: &configuration::Configuration, id: i64, org: &str, repo: &str) -> Result<(), Error> { +pub async fn org_remove_team_repository( + configuration: &configuration::Configuration, + id: i64, + org: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_path_org = org; let p_path_repo = repo; - let uri_str = format!("{}/teams/{id}/repos/{org}/{repo}", configuration.base_path, id=p_path_id, org=crate::apis::urlencode(p_path_org), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/teams/{id}/repos/{org}/{repo}", + configuration.base_path, + id = p_path_id, + org = crate::apis::urlencode(p_path_org), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5622,16 +6376,28 @@ pub async fn org_remove_team_repository(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_search_run_jobs(configuration: &configuration::Configuration, org: &str, labels: Option<&str>) -> Result, Error> { +pub async fn org_search_run_jobs( + configuration: &configuration::Configuration, + org: &str, + labels: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_labels = labels; - let uri_str = format!("{}/orgs/{org}/actions/runners/jobs", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/actions/runners/jobs", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_labels { @@ -5713,16 +6479,29 @@ pub async fn org_search_run_jobs(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_unblock_user(configuration: &configuration::Configuration, org: &str, username: &str) -> Result<(), Error> { +pub async fn org_unblock_user( + configuration: &configuration::Configuration, + org: &str, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_username = username; - let uri_str = format!("{}/orgs/{org}/unblock/{username}", configuration.base_path, org=crate::apis::urlencode(p_path_org), username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/orgs/{org}/unblock/{username}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -5790,17 +6569,31 @@ pub async fn org_unblock_user(configuration: &configuration::Configuration, org: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn org_update_avatar(configuration: &configuration::Configuration, org: &str, body: Option) -> Result<(), Error> { +pub async fn org_update_avatar( + configuration: &configuration::Configuration, + org: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}/avatar", configuration.base_path, org=crate::apis::urlencode(p_path_org)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/avatar", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5868,17 +6661,31 @@ pub async fn org_update_avatar(configuration: &configuration::Configuration, org } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn rename_org(configuration: &configuration::Configuration, org: &str, body: models::RenameOrgOption) -> Result<(), Error> { +pub async fn rename_org( + configuration: &configuration::Configuration, + org: &str, + body: models::RenameOrgOption, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}/rename", configuration.base_path, org=crate::apis::urlencode(p_path_org)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/orgs/{org}/rename", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5946,11 +6753,22 @@ pub async fn rename_org(configuration: &configuration::Configuration, org: &str, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn team_search(configuration: &configuration::Configuration, org: &str, q: Option<&str>, include_desc: Option, page: Option, limit: Option) -> Result> { +pub async fn team_search( + configuration: &configuration::Configuration, + org: &str, + q: Option<&str>, + include_desc: Option, + page: Option, + limit: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_query_q = q; @@ -5958,7 +6776,11 @@ pub async fn team_search(configuration: &configuration::Configuration, org: &str let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/orgs/{org}/teams/search", configuration.base_path, org=crate::apis::urlencode(p_path_org)); + let uri_str = format!( + "{}/orgs/{org}/teams/search", + configuration.base_path, + org = crate::apis::urlencode(p_path_org) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_q { @@ -6049,17 +6871,31 @@ pub async fn team_search(configuration: &configuration::Configuration, org: &str } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn update_org_secret(configuration: &configuration::Configuration, org: &str, secretname: &str, body: Option) -> Result<(), Error> { +pub async fn update_org_secret( + configuration: &configuration::Configuration, + org: &str, + secretname: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_secretname = secretname; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}/actions/secrets/{secretname}", configuration.base_path, org=crate::apis::urlencode(p_path_org), secretname=crate::apis::urlencode(p_path_secretname)); + let uri_str = format!( + "{}/orgs/{org}/actions/secrets/{secretname}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + secretname = crate::apis::urlencode(p_path_secretname) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -6128,17 +6964,31 @@ pub async fn update_org_secret(configuration: &configuration::Configuration, org } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn update_org_variable(configuration: &configuration::Configuration, org: &str, variablename: &str, body: Option) -> Result<(), Error> { +pub async fn update_org_variable( + configuration: &configuration::Configuration, + org: &str, + variablename: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_org = org; let p_path_variablename = variablename; let p_body_body = body; - let uri_str = format!("{}/orgs/{org}/actions/variables/{variablename}", configuration.base_path, org=crate::apis::urlencode(p_path_org), variablename=crate::apis::urlencode(p_path_variablename)); + let uri_str = format!( + "{}/orgs/{org}/actions/variables/{variablename}", + configuration.base_path, + org = crate::apis::urlencode(p_path_org), + variablename = crate::apis::urlencode(p_path_variablename) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -6207,7 +7057,10 @@ pub async fn update_org_variable(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/forgejo-openapi/src/apis/package_api.rs b/forgejo-openapi/src/apis/package_api.rs index 147844d..143d0a9 100644 --- a/forgejo-openapi/src/apis/package_api.rs +++ b/forgejo-openapi/src/apis/package_api.rs @@ -4,16 +4,14 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ - -use reqwest; -use serde::{Deserialize, Serialize, de::Error as _}; +use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; /// struct for typed errors of method [`delete_package`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -63,8 +61,13 @@ pub enum UnlinkPackageError { UnknownValue(serde_json::Value), } - -pub async fn delete_package(configuration: &configuration::Configuration, owner: &str, r#type: &str, name: &str, version: &str) -> Result<(), Error> { +pub async fn delete_package( + configuration: &configuration::Configuration, + owner: &str, + r#type: &str, + name: &str, + version: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_type = r#type; @@ -72,7 +75,9 @@ pub async fn delete_package(configuration: &configuration::Configuration, owner: let p_path_version = version; let uri_str = format!("{}/packages/{owner}/{type}/{name}/{version}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name), version=crate::apis::urlencode(p_path_version)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -139,11 +144,21 @@ pub async fn delete_package(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_package(configuration: &configuration::Configuration, owner: &str, r#type: &str, name: &str, version: &str) -> Result> { +pub async fn get_package( + configuration: &configuration::Configuration, + owner: &str, + r#type: &str, + name: &str, + version: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_type = r#type; @@ -229,11 +244,21 @@ pub async fn get_package(configuration: &configuration::Configuration, owner: &s } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn link_package(configuration: &configuration::Configuration, owner: &str, r#type: &str, name: &str, repo_name: &str) -> Result<(), Error> { +pub async fn link_package( + configuration: &configuration::Configuration, + owner: &str, + r#type: &str, + name: &str, + repo_name: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_type = r#type; @@ -241,7 +266,9 @@ pub async fn link_package(configuration: &configuration::Configuration, owner: & let p_path_repo_name = repo_name; let uri_str = format!("{}/packages/{owner}/{type}/{name}/-/link/{repo_name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name), repo_name=crate::apis::urlencode(p_path_repo_name)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -308,11 +335,21 @@ pub async fn link_package(configuration: &configuration::Configuration, owner: & } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn list_package_files(configuration: &configuration::Configuration, owner: &str, r#type: &str, name: &str, version: &str) -> Result, Error> { +pub async fn list_package_files( + configuration: &configuration::Configuration, + owner: &str, + r#type: &str, + name: &str, + version: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_type = r#type; @@ -398,11 +435,22 @@ pub async fn list_package_files(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn list_packages(configuration: &configuration::Configuration, owner: &str, page: Option, limit: Option, r#type: Option<&str>, q: Option<&str>) -> Result, Error> { +pub async fn list_packages( + configuration: &configuration::Configuration, + owner: &str, + page: Option, + limit: Option, + r#type: Option<&str>, + q: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_query_page = page; @@ -410,7 +458,11 @@ pub async fn list_packages(configuration: &configuration::Configuration, owner: let p_query_type = r#type; let p_query_q = q; - let uri_str = format!("{}/packages/{owner}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner)); + let uri_str = format!( + "{}/packages/{owner}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -501,18 +553,29 @@ pub async fn list_packages(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn unlink_package(configuration: &configuration::Configuration, owner: &str, r#type: &str, name: &str) -> Result<(), Error> { +pub async fn unlink_package( + configuration: &configuration::Configuration, + owner: &str, + r#type: &str, + name: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_type = r#type; let p_path_name = name; let uri_str = format!("{}/packages/{owner}/{type}/{name}/-/unlink", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -579,7 +642,10 @@ pub async fn unlink_package(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/forgejo-openapi/src/apis/repository_api.rs b/forgejo-openapi/src/apis/repository_api.rs index b019380..41ff658 100644 --- a/forgejo-openapi/src/apis/repository_api.rs +++ b/forgejo-openapi/src/apis/repository_api.rs @@ -4,19 +4,17 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ - -use reqwest; -use serde::{Deserialize, Serialize, de::Error as _}; +use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; use tokio::fs::File as TokioFile; use tokio_util::codec::{BytesCodec, FramedRead}; - /// struct for typed errors of method [`accept_repo_transfer`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -1677,14 +1675,24 @@ pub enum UserTrackedTimesError { UnknownValue(serde_json::Value), } - -pub async fn accept_repo_transfer(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn accept_repo_transfer( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/transfer/accept", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/transfer/accept", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1762,17 +1770,32 @@ pub async fn accept_repo_transfer(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn action_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i64) -> Result> { +pub async fn action_run( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + run_id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_run_id = run_id; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), run_id=p_path_run_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/runs/{run_id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + run_id = p_path_run_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -1851,16 +1874,25 @@ pub async fn action_run(configuration: &configuration::Configuration, owner: &st } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn create_current_user_repo(configuration: &configuration::Configuration, body: Option) -> Result> { +pub async fn create_current_user_repo( + configuration: &configuration::Configuration, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/user/repos", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1939,18 +1971,34 @@ pub async fn create_current_user_repo(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn create_fork(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn create_fork( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/forks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/forks", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2029,19 +2077,37 @@ pub async fn create_fork(configuration: &configuration::Configuration, owner: &s } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn create_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, variablename: &str, body: Option) -> Result<(), Error> { +pub async fn create_repo_variable( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + variablename: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_variablename = variablename; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/variables/{variablename}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), variablename=crate::apis::urlencode(p_path_variablename)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/variables/{variablename}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + variablename = crate::apis::urlencode(p_path_variablename) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2109,18 +2175,35 @@ pub async fn create_repo_variable(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn delete_repo_secret(configuration: &configuration::Configuration, owner: &str, repo: &str, secretname: &str) -> Result<(), Error> { +pub async fn delete_repo_secret( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + secretname: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_secretname = secretname; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/secrets/{secretname}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), secretname=crate::apis::urlencode(p_path_secretname)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/secrets/{secretname}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + secretname = crate::apis::urlencode(p_path_secretname) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2187,18 +2270,35 @@ pub async fn delete_repo_secret(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn delete_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, variablename: &str) -> Result<(), Error> { +pub async fn delete_repo_variable( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + variablename: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_variablename = variablename; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/variables/{variablename}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), variablename=crate::apis::urlencode(p_path_variablename)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/variables/{variablename}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + variablename = crate::apis::urlencode(p_path_variablename) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2265,19 +2365,37 @@ pub async fn delete_repo_variable(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn dispatch_workflow(configuration: &configuration::Configuration, owner: &str, repo: &str, workflowfilename: &str, body: Option) -> Result> { +pub async fn dispatch_workflow( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + workflowfilename: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_workflowfilename = workflowfilename; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), workflowfilename=crate::apis::urlencode(p_path_workflowfilename)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + workflowfilename = crate::apis::urlencode(p_path_workflowfilename) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2356,18 +2474,34 @@ pub async fn dispatch_workflow(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn generate_repo(configuration: &configuration::Configuration, template_owner: &str, template_repo: &str, body: Option) -> Result> { +pub async fn generate_repo( + configuration: &configuration::Configuration, + template_owner: &str, + template_repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_template_owner = template_owner; let p_path_template_repo = template_repo; let p_body_body = body; - let uri_str = format!("{}/repos/{template_owner}/{template_repo}/generate", configuration.base_path, template_owner=crate::apis::urlencode(p_path_template_owner), template_repo=crate::apis::urlencode(p_path_template_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{template_owner}/{template_repo}/generate", + configuration.base_path, + template_owner = crate::apis::urlencode(p_path_template_owner), + template_repo = crate::apis::urlencode(p_path_template_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2446,17 +2580,32 @@ pub async fn generate_repo(configuration: &configuration::Configuration, templat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_annotated_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str) -> Result> { +pub async fn get_annotated_tag( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_sha = sha; - let uri_str = format!("{}/repos/{owner}/{repo}/git/tags/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/git/tags/{sha}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + sha = crate::apis::urlencode(p_path_sha) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2535,17 +2684,32 @@ pub async fn get_annotated_tag(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_blob(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str) -> Result> { +pub async fn get_blob( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_sha = sha; - let uri_str = format!("{}/repos/{owner}/{repo}/git/blobs/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/git/blobs/{sha}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + sha = crate::apis::urlencode(p_path_sha) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2624,17 +2788,31 @@ pub async fn get_blob(configuration: &configuration::Configuration, owner: &str, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_blobs(configuration: &configuration::Configuration, owner: &str, repo: &str, shas: &str) -> Result, Error> { +pub async fn get_blobs( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + shas: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_shas = shas; - let uri_str = format!("{}/repos/{owner}/{repo}/git/blobs", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/git/blobs", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("shas", &p_query_shas.to_string())]); @@ -2714,17 +2892,32 @@ pub async fn get_blobs(configuration: &configuration::Configuration, owner: &str } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, variablename: &str) -> Result> { +pub async fn get_repo_variable( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + variablename: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_variablename = variablename; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/variables/{variablename}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), variablename=crate::apis::urlencode(p_path_variablename)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/variables/{variablename}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + variablename = crate::apis::urlencode(p_path_variablename) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2803,18 +2996,33 @@ pub async fn get_repo_variable(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_repo_variables_list(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn get_repo_variables_list( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/variables", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/variables", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -2899,11 +3107,23 @@ pub async fn get_repo_variables_list(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_tree(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, recursive: Option, page: Option, per_page: Option) -> Result> { +pub async fn get_tree( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: &str, + recursive: Option, + page: Option, + per_page: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -2912,7 +3132,13 @@ pub async fn get_tree(configuration: &configuration::Configuration, owner: &str, let p_query_page = page; let p_query_per_page = per_page; - let uri_str = format!("{}/repos/{owner}/{repo}/git/trees/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/git/trees/{sha}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + sha = crate::apis::urlencode(p_path_sha) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_recursive { @@ -3000,11 +3226,25 @@ pub async fn get_tree(configuration: &configuration::Configuration, owner: &str, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn list_action_runs(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option, event: Option>, status: Option>, run_number: Option, head_sha: Option<&str>) -> Result> { +pub async fn list_action_runs( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, + event: Option>, + status: Option>, + run_number: Option, + head_sha: Option<&str>, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -3015,7 +3255,12 @@ pub async fn list_action_runs(configuration: &configuration::Configuration, owne let p_query_run_number = run_number; let p_query_head_sha = head_sha; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/runs", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/runs", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -3026,14 +3271,40 @@ pub async fn list_action_runs(configuration: &configuration::Configuration, owne } if let Some(ref param_value) = p_query_event { req_builder = match "csv" { - "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("event".to_owned(), p.to_string())).collect::>()), - _ => req_builder.query(&[("event", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + "multi" => req_builder.query( + ¶m_value + .into_iter() + .map(|p| ("event".to_owned(), p.to_string())) + .collect::>(), + ), + _ => req_builder.query(&[( + "event", + ¶m_value + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]), }; } if let Some(ref param_value) = p_query_status { req_builder = match "csv" { - "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("status".to_owned(), p.to_string())).collect::>()), - _ => req_builder.query(&[("status", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + "multi" => req_builder.query( + ¶m_value + .into_iter() + .map(|p| ("status".to_owned(), p.to_string())) + .collect::>(), + ), + _ => req_builder.query(&[( + "status", + ¶m_value + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]), }; } if let Some(ref param_value) = p_query_run_number { @@ -3118,18 +3389,33 @@ pub async fn list_action_runs(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn list_action_tasks(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result> { +pub async fn list_action_tasks( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/tasks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/tasks", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -3214,18 +3500,33 @@ pub async fn list_action_tasks(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn list_forks(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn list_forks( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/forks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/forks", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -3310,17 +3611,32 @@ pub async fn list_forks(configuration: &configuration::Configuration, owner: &st } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn reject_repo_transfer(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn reject_repo_transfer( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/transfer/reject", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/transfer/reject", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3398,18 +3714,34 @@ pub async fn reject_repo_transfer(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_add_collaborator(configuration: &configuration::Configuration, owner: &str, repo: &str, collaborator: &str, body: Option) -> Result<(), Error> { +pub async fn repo_add_collaborator( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + collaborator: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_collaborator = collaborator; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/collaborators/{collaborator}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), collaborator=crate::apis::urlencode(p_path_collaborator)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/collaborators/{collaborator}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + collaborator = crate::apis::urlencode(p_path_collaborator) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3478,17 +3810,32 @@ pub async fn repo_add_collaborator(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_add_flag(configuration: &configuration::Configuration, owner: &str, repo: &str, flag: &str) -> Result<(), Error> { +pub async fn repo_add_flag( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + flag: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_flag = flag; - let uri_str = format!("{}/repos/{owner}/{repo}/flags/{flag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), flag=crate::apis::urlencode(p_path_flag)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/flags/{flag}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + flag = crate::apis::urlencode(p_path_flag) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3556,18 +3903,34 @@ pub async fn repo_add_flag(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_add_push_mirror(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn repo_add_push_mirror( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/push_mirrors", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/push_mirrors", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3646,17 +4009,32 @@ pub async fn repo_add_push_mirror(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_add_team(configuration: &configuration::Configuration, owner: &str, repo: &str, team: &str) -> Result<(), Error> { +pub async fn repo_add_team( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + team: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_team = team; - let uri_str = format!("{}/repos/{owner}/{repo}/teams/{team}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), team=crate::apis::urlencode(p_path_team)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/teams/{team}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + team = crate::apis::urlencode(p_path_team) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3724,17 +4102,32 @@ pub async fn repo_add_team(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_add_topic(configuration: &configuration::Configuration, owner: &str, repo: &str, topic: &str) -> Result<(), Error> { +pub async fn repo_add_topic( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + topic: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_topic = topic; - let uri_str = format!("{}/repos/{owner}/{repo}/topics/{topic}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), topic=crate::apis::urlencode(p_path_topic)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/topics/{topic}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + topic = crate::apis::urlencode(p_path_topic) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3802,18 +4195,34 @@ pub async fn repo_add_topic(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_apply_diff_patch(configuration: &configuration::Configuration, owner: &str, repo: &str, body: models::UpdateFileOptions) -> Result> { +pub async fn repo_apply_diff_patch( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: models::UpdateFileOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/diffpatch", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/diffpatch", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3892,18 +4301,35 @@ pub async fn repo_apply_diff_patch(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_cancel_scheduled_auto_merge(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { +pub async fn repo_cancel_scheduled_auto_merge( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/merge", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/merge", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3970,18 +4396,34 @@ pub async fn repo_cancel_scheduled_auto_merge(configuration: &configuration::Con } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_change_files(configuration: &configuration::Configuration, owner: &str, repo: &str, body: models::ChangeFilesOptions) -> Result> { +pub async fn repo_change_files( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: models::ChangeFilesOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/contents", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/contents", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4060,18 +4502,33 @@ pub async fn repo_change_files(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } /// If the user is a collaborator, return 204. If the user is not a collaborator, return 404. -pub async fn repo_check_collaborator(configuration: &configuration::Configuration, owner: &str, repo: &str, collaborator: &str) -> Result<(), Error> { +pub async fn repo_check_collaborator( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + collaborator: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_collaborator = collaborator; - let uri_str = format!("{}/repos/{owner}/{repo}/collaborators/{collaborator}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), collaborator=crate::apis::urlencode(p_path_collaborator)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/collaborators/{collaborator}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + collaborator = crate::apis::urlencode(p_path_collaborator) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4139,17 +4596,32 @@ pub async fn repo_check_collaborator(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_check_flag(configuration: &configuration::Configuration, owner: &str, repo: &str, flag: &str) -> Result<(), Error> { +pub async fn repo_check_flag( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + flag: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_flag = flag; - let uri_str = format!("{}/repos/{owner}/{repo}/flags/{flag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), flag=crate::apis::urlencode(p_path_flag)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/flags/{flag}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + flag = crate::apis::urlencode(p_path_flag) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4217,17 +4689,32 @@ pub async fn repo_check_flag(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_check_team(configuration: &configuration::Configuration, owner: &str, repo: &str, team: &str) -> Result> { +pub async fn repo_check_team( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + team: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_team = team; - let uri_str = format!("{}/repos/{owner}/{repo}/teams/{team}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), team=crate::apis::urlencode(p_path_team)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/teams/{team}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + team = crate::apis::urlencode(p_path_team) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4306,17 +4793,32 @@ pub async fn repo_check_team(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_compare_diff(configuration: &configuration::Configuration, owner: &str, repo: &str, basehead: &str) -> Result> { +pub async fn repo_compare_diff( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + basehead: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_basehead = basehead; - let uri_str = format!("{}/repos/{owner}/{repo}/compare/{basehead}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), basehead=crate::apis::urlencode(p_path_basehead)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/compare/{basehead}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + basehead = crate::apis::urlencode(p_path_basehead) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4395,17 +4897,32 @@ pub async fn repo_compare_diff(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_convert(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn repo_convert( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/convert", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/convert", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4483,18 +5000,34 @@ pub async fn repo_convert(configuration: &configuration::Configuration, owner: & } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_branch(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn repo_create_branch( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/branches", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/branches", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4573,18 +5106,34 @@ pub async fn repo_create_branch(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_branch_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn repo_create_branch_protection( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/branch_protections", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/branch_protections", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4663,19 +5212,37 @@ pub async fn repo_create_branch_protection(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_file(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, body: models::CreateFileOptions) -> Result> { +pub async fn repo_create_file( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + filepath: &str, + body: models::CreateFileOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_filepath = filepath; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/contents/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/contents/{filepath}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + filepath = crate::apis::urlencode(p_path_filepath) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4754,18 +5321,34 @@ pub async fn repo_create_file(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn repo_create_hook( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/hooks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/hooks", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4844,18 +5427,34 @@ pub async fn repo_create_hook(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_key(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn repo_create_key( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/keys", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/keys", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4934,18 +5533,34 @@ pub async fn repo_create_key(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn repo_create_pull_request( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5024,19 +5639,37 @@ pub async fn repo_create_pull_request(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: models::CreatePullReviewOptions) -> Result> { +pub async fn repo_create_pull_review( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: models::CreatePullReviewOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/reviews", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5115,11 +5748,22 @@ pub async fn repo_create_pull_review(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_pull_review_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64, body: models::CreatePullReviewComment) -> Result> { +pub async fn repo_create_pull_review_comment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + id: i64, + body: models::CreatePullReviewComment, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -5127,8 +5771,17 @@ pub async fn repo_create_pull_review_comment(configuration: &configuration::Conf let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5207,19 +5860,37 @@ pub async fn repo_create_pull_review_comment(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_pull_review_requests(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: models::PullReviewRequestOptions) -> Result, Error> { +pub async fn repo_create_pull_review_requests( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: models::PullReviewRequestOptions, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/requested_reviewers", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/requested_reviewers", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5298,18 +5969,34 @@ pub async fn repo_create_pull_review_requests(configuration: &configuration::Con } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_release(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn repo_create_release( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/releases", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5388,11 +6075,23 @@ pub async fn repo_create_release(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_release_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, name: Option<&str>, attachment: Option, external_url: Option<&str>) -> Result> { +pub async fn repo_create_release_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + name: Option<&str>, + attachment: Option, + external_url: Option<&str>, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -5401,8 +6100,16 @@ pub async fn repo_create_release_attachment(configuration: &configuration::Confi let p_form_attachment = attachment; let p_form_external_url = external_url; - let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases/{id}/assets", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref param_value) = p_query_name { req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); @@ -5465,8 +6172,12 @@ pub async fn repo_create_release_attachment(configuration: &configuration::Confi if let Some(ref param_value) = p_form_attachment { let file = TokioFile::open(param_value).await?; let stream = FramedRead::new(file, BytesCodec::new()); - let file_name = param_value.file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_default(); - let file_part = reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)).file_name(file_name); + let file_name = param_value + .file_name() + .map(|n| n.to_string_lossy().to_string()) + .unwrap_or_default(); + let file_part = reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)) + .file_name(file_name); multipart_form = multipart_form.part("attachment", file_part); } if let Some(param_value) = p_form_external_url { @@ -5495,19 +6206,37 @@ pub async fn repo_create_release_attachment(configuration: &configuration::Confi } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_status(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, body: Option) -> Result> { +pub async fn repo_create_status( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_sha = sha; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/statuses/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/statuses/{sha}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + sha = crate::apis::urlencode(p_path_sha) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5586,18 +6315,34 @@ pub async fn repo_create_status(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn repo_create_tag( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/tags", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/tags", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5676,18 +6421,34 @@ pub async fn repo_create_tag(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_tag_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn repo_create_tag_protection( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/tag_protections", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/tag_protections", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5766,18 +6527,34 @@ pub async fn repo_create_tag_protection(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_create_wiki_page(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn repo_create_wiki_page( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/wiki/new", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/wiki/new", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5856,17 +6633,32 @@ pub async fn repo_create_wiki_page(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn repo_delete( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -5933,17 +6725,32 @@ pub async fn repo_delete(configuration: &configuration::Configuration, owner: &s } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_all_flags(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn repo_delete_all_flags( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/flags", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/flags", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6010,17 +6817,32 @@ pub async fn repo_delete_all_flags(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_avatar(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn repo_delete_avatar( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/avatar", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/avatar", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6087,18 +6909,35 @@ pub async fn repo_delete_avatar(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_branch(configuration: &configuration::Configuration, owner: &str, repo: &str, branch: &str) -> Result<(), Error> { +pub async fn repo_delete_branch( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + branch: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_branch = branch; - let uri_str = format!("{}/repos/{owner}/{repo}/branches/{branch}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), branch=crate::apis::urlencode(p_path_branch)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/branches/{branch}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + branch = crate::apis::urlencode(p_path_branch) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6165,18 +7004,35 @@ pub async fn repo_delete_branch(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_branch_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str) -> Result<(), Error> { +pub async fn repo_delete_branch_protection( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + name: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_name = name; - let uri_str = format!("{}/repos/{owner}/{repo}/branch_protections/{name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), name=crate::apis::urlencode(p_path_name)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/branch_protections/{name}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + name = crate::apis::urlencode(p_path_name) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6243,18 +7099,35 @@ pub async fn repo_delete_branch_protection(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_collaborator(configuration: &configuration::Configuration, owner: &str, repo: &str, collaborator: &str) -> Result<(), Error> { +pub async fn repo_delete_collaborator( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + collaborator: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_collaborator = collaborator; - let uri_str = format!("{}/repos/{owner}/{repo}/collaborators/{collaborator}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), collaborator=crate::apis::urlencode(p_path_collaborator)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/collaborators/{collaborator}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + collaborator = crate::apis::urlencode(p_path_collaborator) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6321,19 +7194,37 @@ pub async fn repo_delete_collaborator(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_file(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, body: models::DeleteFileOptions) -> Result> { +pub async fn repo_delete_file( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + filepath: &str, + body: models::DeleteFileOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_filepath = filepath; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/contents/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/contents/{filepath}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + filepath = crate::apis::urlencode(p_path_filepath) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6412,18 +7303,35 @@ pub async fn repo_delete_file(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_flag(configuration: &configuration::Configuration, owner: &str, repo: &str, flag: &str) -> Result<(), Error> { +pub async fn repo_delete_flag( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + flag: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_flag = flag; - let uri_str = format!("{}/repos/{owner}/{repo}/flags/{flag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), flag=crate::apis::urlencode(p_path_flag)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/flags/{flag}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + flag = crate::apis::urlencode(p_path_flag) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6490,18 +7398,35 @@ pub async fn repo_delete_flag(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_git_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: &str) -> Result<(), Error> { +pub async fn repo_delete_git_hook( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/hooks/git/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=crate::apis::urlencode(p_path_id)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/hooks/git/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = crate::apis::urlencode(p_path_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6568,18 +7493,35 @@ pub async fn repo_delete_git_hook(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { +pub async fn repo_delete_hook( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/hooks/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/hooks/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6646,18 +7588,35 @@ pub async fn repo_delete_hook(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_key(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { +pub async fn repo_delete_key( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/keys/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/keys/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6724,19 +7683,38 @@ pub async fn repo_delete_key(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64) -> Result<(), Error> { +pub async fn repo_delete_pull_review( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6803,11 +7781,22 @@ pub async fn repo_delete_pull_review(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_pull_review_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64, comment: i64) -> Result<(), Error> { +pub async fn repo_delete_pull_review_comment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + id: i64, + comment: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -6815,8 +7804,18 @@ pub async fn repo_delete_pull_review_comment(configuration: &configuration::Conf let p_path_id = id; let p_path_comment = comment; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id, comment=p_path_comment); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id, + comment = p_path_comment + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6883,19 +7882,37 @@ pub async fn repo_delete_pull_review_comment(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_pull_review_requests(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: models::PullReviewRequestOptions) -> Result<(), Error> { +pub async fn repo_delete_pull_review_requests( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: models::PullReviewRequestOptions, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/requested_reviewers", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/requested_reviewers", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -6963,18 +7980,35 @@ pub async fn repo_delete_pull_review_requests(configuration: &configuration::Con } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_push_mirror(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str) -> Result<(), Error> { +pub async fn repo_delete_push_mirror( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + name: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_name = name; - let uri_str = format!("{}/repos/{owner}/{repo}/push_mirrors/{name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), name=crate::apis::urlencode(p_path_name)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/push_mirrors/{name}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + name = crate::apis::urlencode(p_path_name) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7041,18 +8075,35 @@ pub async fn repo_delete_push_mirror(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_release(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { +pub async fn repo_delete_release( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7119,19 +8170,38 @@ pub async fn repo_delete_release(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_release_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64) -> Result<(), Error> { +pub async fn repo_delete_release_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + attachment_id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_path_attachment_id = attachment_id; - let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id, + attachment_id = p_path_attachment_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7198,18 +8268,35 @@ pub async fn repo_delete_release_attachment(configuration: &configuration::Confi } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_release_by_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, tag: &str) -> Result<(), Error> { +pub async fn repo_delete_release_by_tag( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + tag: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_tag = tag; - let uri_str = format!("{}/repos/{owner}/{repo}/releases/tags/{tag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), tag=crate::apis::urlencode(p_path_tag)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases/tags/{tag}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + tag = crate::apis::urlencode(p_path_tag) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7276,18 +8363,35 @@ pub async fn repo_delete_release_by_tag(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, tag: &str) -> Result<(), Error> { +pub async fn repo_delete_tag( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + tag: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_tag = tag; - let uri_str = format!("{}/repos/{owner}/{repo}/tags/{tag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), tag=crate::apis::urlencode(p_path_tag)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/tags/{tag}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + tag = crate::apis::urlencode(p_path_tag) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7354,18 +8458,35 @@ pub async fn repo_delete_tag(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_tag_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result<(), Error> { +pub async fn repo_delete_tag_protection( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/tag_protections/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/tag_protections/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7432,18 +8553,35 @@ pub async fn repo_delete_tag_protection(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_team(configuration: &configuration::Configuration, owner: &str, repo: &str, team: &str) -> Result<(), Error> { +pub async fn repo_delete_team( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + team: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_team = team; - let uri_str = format!("{}/repos/{owner}/{repo}/teams/{team}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), team=crate::apis::urlencode(p_path_team)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/teams/{team}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + team = crate::apis::urlencode(p_path_team) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7510,18 +8648,35 @@ pub async fn repo_delete_team(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_topic(configuration: &configuration::Configuration, owner: &str, repo: &str, topic: &str) -> Result<(), Error> { +pub async fn repo_delete_topic( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + topic: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_topic = topic; - let uri_str = format!("{}/repos/{owner}/{repo}/topics/{topic}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), topic=crate::apis::urlencode(p_path_topic)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/topics/{topic}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + topic = crate::apis::urlencode(p_path_topic) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7588,18 +8743,35 @@ pub async fn repo_delete_topic(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_delete_wiki_page(configuration: &configuration::Configuration, owner: &str, repo: &str, page_name: &str) -> Result<(), Error> { +pub async fn repo_delete_wiki_page( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page_name: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_page_name = page_name; - let uri_str = format!("{}/repos/{owner}/{repo}/wiki/page/{pageName}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), pageName=crate::apis::urlencode(p_path_page_name)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/wiki/page/{pageName}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + pageName = crate::apis::urlencode(p_path_page_name) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7666,11 +8838,22 @@ pub async fn repo_delete_wiki_page(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_dismiss_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64, body: models::DismissPullReviewOptions) -> Result> { +pub async fn repo_dismiss_pull_review( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + id: i64, + body: models::DismissPullReviewOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -7678,8 +8861,17 @@ pub async fn repo_dismiss_pull_review(configuration: &configuration::Configurati let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7758,18 +8950,35 @@ pub async fn repo_dismiss_pull_review(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_download_commit_diff_or_patch(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, diff_type: &str) -> Result> { +pub async fn repo_download_commit_diff_or_patch( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: &str, + diff_type: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_sha = sha; let p_path_diff_type = diff_type; - let uri_str = format!("{}/repos/{owner}/{repo}/git/commits/{sha}.{diffType}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha), diffType=crate::apis::urlencode(p_path_diff_type)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/git/commits/{sha}.{diffType}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + sha = crate::apis::urlencode(p_path_sha), + diffType = crate::apis::urlencode(p_path_diff_type) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -7847,12 +9056,24 @@ pub async fn repo_download_commit_diff_or_patch(configuration: &configuration::C } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_download_pull_diff_or_patch(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, diff_type: &str, binary: Option) -> Result> { +pub async fn repo_download_pull_diff_or_patch( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + diff_type: &str, + binary: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -7860,7 +9081,14 @@ pub async fn repo_download_pull_diff_or_patch(configuration: &configuration::Con let p_path_diff_type = diff_type; let p_query_binary = binary; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}.{diffType}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, diffType=crate::apis::urlencode(p_path_diff_type)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}.{diffType}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + diffType = crate::apis::urlencode(p_path_diff_type) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_binary { @@ -7942,18 +9170,34 @@ pub async fn repo_download_pull_diff_or_patch(configuration: &configuration::Con } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_edit(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result> { +pub async fn repo_edit( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -8032,19 +9276,37 @@ pub async fn repo_edit(configuration: &configuration::Configuration, owner: &str } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_edit_branch_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str, body: Option) -> Result> { +pub async fn repo_edit_branch_protection( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + name: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_name = name; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/branch_protections/{name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), name=crate::apis::urlencode(p_path_name)); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/branch_protections/{name}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + name = crate::apis::urlencode(p_path_name) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -8123,19 +9385,37 @@ pub async fn repo_edit_branch_protection(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_edit_git_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: &str, body: Option) -> Result> { +pub async fn repo_edit_git_hook( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/hooks/git/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=crate::apis::urlencode(p_path_id)); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/hooks/git/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = crate::apis::urlencode(p_path_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -8214,19 +9494,37 @@ pub async fn repo_edit_git_hook(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_edit_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { +pub async fn repo_edit_hook( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/hooks/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/hooks/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -8305,19 +9603,37 @@ pub async fn repo_edit_hook(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_edit_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result> { +pub async fn repo_edit_pull_request( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -8396,19 +9712,37 @@ pub async fn repo_edit_pull_request(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_edit_release(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { +pub async fn repo_edit_release( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -8487,11 +9821,22 @@ pub async fn repo_edit_release(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_edit_release_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64, body: Option) -> Result> { +pub async fn repo_edit_release_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + attachment_id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -8499,8 +9844,17 @@ pub async fn repo_edit_release_attachment(configuration: &configuration::Configu let p_path_attachment_id = attachment_id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id, + attachment_id = p_path_attachment_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -8579,19 +9933,37 @@ pub async fn repo_edit_release_attachment(configuration: &configuration::Configu } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_edit_tag_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, body: Option) -> Result> { +pub async fn repo_edit_tag_protection( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/tag_protections/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/tag_protections/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -8670,19 +10042,37 @@ pub async fn repo_edit_tag_protection(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_edit_wiki_page(configuration: &configuration::Configuration, owner: &str, repo: &str, page_name: &str, body: Option) -> Result> { +pub async fn repo_edit_wiki_page( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page_name: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_page_name = page_name; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/wiki/page/{pageName}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), pageName=crate::apis::urlencode(p_path_page_name)); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/wiki/page/{pageName}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + pageName = crate::apis::urlencode(p_path_page_name) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -8761,16 +10151,29 @@ pub async fn repo_edit_wiki_page(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn repo_get( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -8849,11 +10252,27 @@ pub async fn repo_get(configuration: &configuration::Configuration, owner: &str, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_all_commits(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: Option<&str>, path: Option<&str>, stat: Option, verification: Option, files: Option, page: Option, limit: Option, not: Option<&str>) -> Result, Error> { +pub async fn repo_get_all_commits( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: Option<&str>, + path: Option<&str>, + stat: Option, + verification: Option, + files: Option, + page: Option, + limit: Option, + not: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -8866,7 +10285,12 @@ pub async fn repo_get_all_commits(configuration: &configuration::Configuration, let p_query_limit = limit; let p_query_not = not; - let uri_str = format!("{}/repos/{owner}/{repo}/commits", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/commits", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_sha { @@ -8969,17 +10393,32 @@ pub async fn repo_get_all_commits(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_archive(configuration: &configuration::Configuration, owner: &str, repo: &str, archive: &str) -> Result<(), Error> { +pub async fn repo_get_archive( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + archive: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_archive = archive; - let uri_str = format!("{}/repos/{owner}/{repo}/archive/{archive}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), archive=crate::apis::urlencode(p_path_archive)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/archive/{archive}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + archive = crate::apis::urlencode(p_path_archive) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -9047,16 +10486,29 @@ pub async fn repo_get_archive(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_assignees(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_get_assignees( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/assignees", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/assignees", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -9135,17 +10587,32 @@ pub async fn repo_get_assignees(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_branch(configuration: &configuration::Configuration, owner: &str, repo: &str, branch: &str) -> Result> { +pub async fn repo_get_branch( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + branch: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_branch = branch; - let uri_str = format!("{}/repos/{owner}/{repo}/branches/{branch}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), branch=crate::apis::urlencode(p_path_branch)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/branches/{branch}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + branch = crate::apis::urlencode(p_path_branch) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -9224,17 +10691,32 @@ pub async fn repo_get_branch(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_branch_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str) -> Result> { +pub async fn repo_get_branch_protection( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + name: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_name = name; - let uri_str = format!("{}/repos/{owner}/{repo}/branch_protections/{name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), name=crate::apis::urlencode(p_path_name)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/branch_protections/{name}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + name = crate::apis::urlencode(p_path_name) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -9313,15 +10795,26 @@ pub async fn repo_get_branch_protection(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_by_id(configuration: &configuration::Configuration, id: i64) -> Result> { +pub async fn repo_get_by_id( + configuration: &configuration::Configuration, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/repositories/{id}", configuration.base_path, id=p_path_id); + let uri_str = format!( + "{}/repositories/{id}", + configuration.base_path, + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -9400,11 +10893,22 @@ pub async fn repo_get_by_id(configuration: &configuration::Configuration, id: i6 } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_combined_status_by_ref(configuration: &configuration::Configuration, owner: &str, repo: &str, r#ref: &str, page: Option, limit: Option) -> Result> { +pub async fn repo_get_combined_status_by_ref( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + r#ref: &str, + page: Option, + limit: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -9497,17 +11001,32 @@ pub async fn repo_get_combined_status_by_ref(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_commit_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str) -> Result> { +pub async fn repo_get_commit_pull_request( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_sha = sha; - let uri_str = format!("{}/repos/{owner}/{repo}/commits/{sha}/pull", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/commits/{sha}/pull", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + sha = crate::apis::urlencode(p_path_sha) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -9586,18 +11105,34 @@ pub async fn repo_get_commit_pull_request(configuration: &configuration::Configu } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_contents(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, r#ref: Option<&str>) -> Result> { +pub async fn repo_get_contents( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + filepath: &str, + r#ref: Option<&str>, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_filepath = filepath; let p_query_ref = r#ref; - let uri_str = format!("{}/repos/{owner}/{repo}/contents/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/contents/{filepath}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + filepath = crate::apis::urlencode(p_path_filepath) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_ref { @@ -9679,17 +11214,31 @@ pub async fn repo_get_contents(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_contents_list(configuration: &configuration::Configuration, owner: &str, repo: &str, r#ref: Option<&str>) -> Result, Error> { +pub async fn repo_get_contents_list( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + r#ref: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_ref = r#ref; - let uri_str = format!("{}/repos/{owner}/{repo}/contents", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/contents", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_ref { @@ -9771,18 +11320,34 @@ pub async fn repo_get_contents_list(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_editor_config(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, r#ref: Option<&str>) -> Result, Error> { +pub async fn repo_get_editor_config( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + filepath: &str, + r#ref: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_filepath = filepath; let p_query_ref = r#ref; - let uri_str = format!("{}/repos/{owner}/{repo}/editorconfig/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/editorconfig/{filepath}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + filepath = crate::apis::urlencode(p_path_filepath) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_ref { @@ -9864,17 +11429,32 @@ pub async fn repo_get_editor_config(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_git_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: &str) -> Result> { +pub async fn repo_get_git_hook( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/hooks/git/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=crate::apis::urlencode(p_path_id)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/hooks/git/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = crate::apis::urlencode(p_path_id) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -9953,17 +11533,32 @@ pub async fn repo_get_git_hook(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { +pub async fn repo_get_hook( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/hooks/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/hooks/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -10042,16 +11637,29 @@ pub async fn repo_get_hook(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_issue_config(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn repo_get_issue_config( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/issue_config", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issue_config", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -10130,16 +11738,29 @@ pub async fn repo_get_issue_config(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_issue_templates(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_get_issue_templates( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/issue_templates", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issue_templates", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -10218,17 +11839,32 @@ pub async fn repo_get_issue_templates(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_key(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { +pub async fn repo_get_key( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/keys/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/keys/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -10307,16 +11943,29 @@ pub async fn repo_get_key(configuration: &configuration::Configuration, owner: & } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_languages(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_get_languages( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/languages", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/languages", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -10395,16 +12044,29 @@ pub async fn repo_get_languages(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_latest_release(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn repo_get_latest_release( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/releases/latest", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases/latest", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -10483,11 +12145,22 @@ pub async fn repo_get_latest_release(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_note(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, verification: Option, files: Option) -> Result> { +pub async fn repo_get_note( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: &str, + verification: Option, + files: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -10495,7 +12168,13 @@ pub async fn repo_get_note(configuration: &configuration::Configuration, owner: let p_query_verification = verification; let p_query_files = files; - let uri_str = format!("{}/repos/{owner}/{repo}/git/notes/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/git/notes/{sha}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + sha = crate::apis::urlencode(p_path_sha) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_verification { @@ -10580,17 +12259,32 @@ pub async fn repo_get_note(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result> { +pub async fn repo_get_pull_request( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -10669,18 +12363,35 @@ pub async fn repo_get_pull_request(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_pull_request_by_base_head(configuration: &configuration::Configuration, owner: &str, repo: &str, base: &str, head: &str) -> Result> { +pub async fn repo_get_pull_request_by_base_head( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + base: &str, + head: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_base = base; let p_path_head = head; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{base}/{head}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), base=crate::apis::urlencode(p_path_base), head=crate::apis::urlencode(p_path_head)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{base}/{head}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + base = crate::apis::urlencode(p_path_base), + head = crate::apis::urlencode(p_path_head) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -10759,11 +12470,24 @@ pub async fn repo_get_pull_request_by_base_head(configuration: &configuration::C } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_pull_request_commits(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option, verification: Option, files: Option) -> Result, Error> { +pub async fn repo_get_pull_request_commits( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + page: Option, + limit: Option, + verification: Option, + files: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -10773,7 +12497,13 @@ pub async fn repo_get_pull_request_commits(configuration: &configuration::Config let p_query_verification = verification; let p_query_files = files; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/commits", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/commits", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -10864,11 +12594,24 @@ pub async fn repo_get_pull_request_commits(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_pull_request_files(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, skip_to: Option<&str>, whitespace: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_get_pull_request_files( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + skip_to: Option<&str>, + whitespace: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -10878,7 +12621,13 @@ pub async fn repo_get_pull_request_files(configuration: &configuration::Configur let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/files", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/files", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_skip_to { @@ -10969,18 +12718,35 @@ pub async fn repo_get_pull_request_files(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64) -> Result> { +pub async fn repo_get_pull_review( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -11059,11 +12825,22 @@ pub async fn repo_get_pull_review(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_pull_review_comment(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64, comment: i64) -> Result> { +pub async fn repo_get_pull_review_comment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + id: i64, + comment: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -11071,7 +12848,15 @@ pub async fn repo_get_pull_review_comment(configuration: &configuration::Configu let p_path_id = id; let p_path_comment = comment; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id, comment=p_path_comment); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id, + comment = p_path_comment + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -11150,18 +12935,35 @@ pub async fn repo_get_pull_review_comment(configuration: &configuration::Configu } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_pull_review_comments(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64) -> Result, Error> { +pub async fn repo_get_pull_review_comments( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + id: i64, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -11240,17 +13042,32 @@ pub async fn repo_get_pull_review_comments(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_push_mirror_by_remote_name(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str) -> Result> { +pub async fn repo_get_push_mirror_by_remote_name( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + name: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_name = name; - let uri_str = format!("{}/repos/{owner}/{repo}/push_mirrors/{name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), name=crate::apis::urlencode(p_path_name)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/push_mirrors/{name}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + name = crate::apis::urlencode(p_path_name) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -11328,19 +13145,36 @@ pub async fn repo_get_push_mirror_by_remote_name(configuration: &configuration:: } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_raw_file(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, r#ref: Option<&str>) -> Result> { +pub async fn repo_get_raw_file( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + filepath: &str, + r#ref: Option<&str>, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_filepath = filepath; let p_query_ref = r#ref; - let uri_str = format!("{}/repos/{owner}/{repo}/raw/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/raw/{filepath}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + filepath = crate::apis::urlencode(p_path_filepath) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_ref { @@ -11411,18 +13245,34 @@ pub async fn repo_get_raw_file(configuration: &configuration::Configuration, own } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_raw_file_or_lfs(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, r#ref: Option<&str>) -> Result> { +pub async fn repo_get_raw_file_or_lfs( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + filepath: &str, + r#ref: Option<&str>, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_filepath = filepath; let p_query_ref = r#ref; - let uri_str = format!("{}/repos/{owner}/{repo}/media/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/media/{filepath}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + filepath = crate::apis::urlencode(p_path_filepath) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_ref { @@ -11493,17 +13343,32 @@ pub async fn repo_get_raw_file_or_lfs(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_release(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { +pub async fn repo_get_release( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -11582,18 +13447,35 @@ pub async fn repo_get_release(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_release_attachment(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, attachment_id: i64) -> Result> { +pub async fn repo_get_release_attachment( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + attachment_id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_path_attachment_id = attachment_id; - let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id, attachment_id=p_path_attachment_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id, + attachment_id = p_path_attachment_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -11672,17 +13554,32 @@ pub async fn repo_get_release_attachment(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_release_by_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, tag: &str) -> Result> { +pub async fn repo_get_release_by_tag( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + tag: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_tag = tag; - let uri_str = format!("{}/repos/{owner}/{repo}/releases/tags/{tag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), tag=crate::apis::urlencode(p_path_tag)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases/tags/{tag}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + tag = crate::apis::urlencode(p_path_tag) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -11761,17 +13658,32 @@ pub async fn repo_get_release_by_tag(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_repo_permissions(configuration: &configuration::Configuration, owner: &str, repo: &str, collaborator: &str) -> Result> { +pub async fn repo_get_repo_permissions( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + collaborator: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_collaborator = collaborator; - let uri_str = format!("{}/repos/{owner}/{repo}/collaborators/{collaborator}/permission", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), collaborator=crate::apis::urlencode(p_path_collaborator)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/collaborators/{collaborator}/permission", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + collaborator = crate::apis::urlencode(p_path_collaborator) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -11850,16 +13762,29 @@ pub async fn repo_get_repo_permissions(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_reviewers(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_get_reviewers( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/reviewers", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/reviewers", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -11938,16 +13863,29 @@ pub async fn repo_get_reviewers(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_runner_registration_token(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn repo_get_runner_registration_token( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/registration-token", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/runners/registration-token", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -12025,12 +13963,25 @@ pub async fn repo_get_runner_registration_token(configuration: &configuration::C } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_single_commit(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, stat: Option, verification: Option, files: Option) -> Result> { +pub async fn repo_get_single_commit( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: &str, + stat: Option, + verification: Option, + files: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -12039,7 +13990,13 @@ pub async fn repo_get_single_commit(configuration: &configuration::Configuration let p_query_verification = verification; let p_query_files = files; - let uri_str = format!("{}/repos/{owner}/{repo}/git/commits/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/git/commits/{sha}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + sha = crate::apis::urlencode(p_path_sha) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_stat { @@ -12127,17 +14084,32 @@ pub async fn repo_get_single_commit(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_tag(configuration: &configuration::Configuration, owner: &str, repo: &str, tag: &str) -> Result> { +pub async fn repo_get_tag( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + tag: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_tag = tag; - let uri_str = format!("{}/repos/{owner}/{repo}/tags/{tag}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), tag=crate::apis::urlencode(p_path_tag)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/tags/{tag}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + tag = crate::apis::urlencode(p_path_tag) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -12216,17 +14188,32 @@ pub async fn repo_get_tag(configuration: &configuration::Configuration, owner: & } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_tag_protection(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result> { +pub async fn repo_get_tag_protection( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/tag_protections/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/tag_protections/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -12305,17 +14292,32 @@ pub async fn repo_get_tag_protection(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_wiki_page(configuration: &configuration::Configuration, owner: &str, repo: &str, page_name: &str) -> Result> { +pub async fn repo_get_wiki_page( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page_name: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_page_name = page_name; - let uri_str = format!("{}/repos/{owner}/{repo}/wiki/page/{pageName}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), pageName=crate::apis::urlencode(p_path_page_name)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/wiki/page/{pageName}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + pageName = crate::apis::urlencode(p_path_page_name) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -12394,18 +14396,34 @@ pub async fn repo_get_wiki_page(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_wiki_page_revisions(configuration: &configuration::Configuration, owner: &str, repo: &str, page_name: &str, page: Option) -> Result> { +pub async fn repo_get_wiki_page_revisions( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page_name: &str, + page: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_page_name = page_name; let p_query_page = page; - let uri_str = format!("{}/repos/{owner}/{repo}/wiki/revisions/{pageName}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), pageName=crate::apis::urlencode(p_path_page_name)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/wiki/revisions/{pageName}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + pageName = crate::apis::urlencode(p_path_page_name) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -12487,18 +14505,33 @@ pub async fn repo_get_wiki_page_revisions(configuration: &configuration::Configu } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_get_wiki_pages(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_get_wiki_pages( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/wiki/pages", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/wiki/pages", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -12583,18 +14616,33 @@ pub async fn repo_get_wiki_pages(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_actions_secrets(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_actions_secrets( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/secrets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/secrets", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -12679,11 +14727,22 @@ pub async fn repo_list_actions_secrets(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_activity_feeds(configuration: &configuration::Configuration, owner: &str, repo: &str, date: Option, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_activity_feeds( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + date: Option, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -12691,7 +14750,12 @@ pub async fn repo_list_activity_feeds(configuration: &configuration::Configurati let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/activities/feeds", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/activities/feeds", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_date { @@ -12779,16 +14843,29 @@ pub async fn repo_list_activity_feeds(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_all_git_refs(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_list_all_git_refs( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/git/refs", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/git/refs", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -12867,16 +14944,29 @@ pub async fn repo_list_all_git_refs(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_branch_protection(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_list_branch_protection( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/branch_protections", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/branch_protections", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -12955,18 +15045,33 @@ pub async fn repo_list_branch_protection(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_branches(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_branches( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/branches", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/branches", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -13051,18 +15156,33 @@ pub async fn repo_list_branches(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_collaborators(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_collaborators( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/collaborators", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/collaborators", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -13147,16 +15267,29 @@ pub async fn repo_list_collaborators(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_flags(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_list_flags( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/flags", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/flags", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -13235,16 +15368,29 @@ pub async fn repo_list_flags(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_git_hooks(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_list_git_hooks( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/hooks/git", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/hooks/git", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -13323,11 +15469,20 @@ pub async fn repo_list_git_hooks(configuration: &configuration::Configuration, o } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_git_refs(configuration: &configuration::Configuration, owner: &str, repo: &str, r#ref: &str) -> Result, Error> { +pub async fn repo_list_git_refs( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + r#ref: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -13412,18 +15567,33 @@ pub async fn repo_list_git_refs(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_hooks(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_hooks( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/hooks", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/hooks", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -13508,11 +15678,23 @@ pub async fn repo_list_hooks(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_keys(configuration: &configuration::Configuration, owner: &str, repo: &str, key_id: Option, fingerprint: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_keys( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + key_id: Option, + fingerprint: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -13521,7 +15703,12 @@ pub async fn repo_list_keys(configuration: &configuration::Configuration, owner: let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/keys", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/keys", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_key_id { @@ -13612,16 +15799,29 @@ pub async fn repo_list_keys(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_pinned_issues(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_list_pinned_issues( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/issues/pinned", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issues/pinned", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -13700,16 +15900,29 @@ pub async fn repo_list_pinned_issues(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_pinned_pull_requests(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_list_pinned_pull_requests( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/pinned", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/pinned", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -13788,11 +16001,26 @@ pub async fn repo_list_pinned_pull_requests(configuration: &configuration::Confi } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_pull_requests(configuration: &configuration::Configuration, owner: &str, repo: &str, state: Option<&str>, sort: Option<&str>, milestone: Option, labels: Option>, poster: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_pull_requests( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + state: Option<&str>, + sort: Option<&str>, + milestone: Option, + labels: Option>, + poster: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -13804,7 +16032,12 @@ pub async fn repo_list_pull_requests(configuration: &configuration::Configuratio let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_state { @@ -13818,8 +16051,21 @@ pub async fn repo_list_pull_requests(configuration: &configuration::Configuratio } if let Some(ref param_value) = p_query_labels { req_builder = match "multi" { - "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("labels".to_owned(), p.to_string())).collect::>()), - _ => req_builder.query(&[("labels", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + "multi" => req_builder.query( + ¶m_value + .into_iter() + .map(|p| ("labels".to_owned(), p.to_string())) + .collect::>(), + ), + _ => req_builder.query(&[( + "labels", + ¶m_value + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]), }; } if let Some(ref param_value) = p_query_poster { @@ -13907,11 +16153,22 @@ pub async fn repo_list_pull_requests(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_pull_reviews(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_pull_reviews( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -13919,7 +16176,13 @@ pub async fn repo_list_pull_reviews(configuration: &configuration::Configuration let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/reviews", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -14004,18 +16267,33 @@ pub async fn repo_list_pull_reviews(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_push_mirrors(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_push_mirrors( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/push_mirrors", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/push_mirrors", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -14100,17 +16378,32 @@ pub async fn repo_list_push_mirrors(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_release_attachments(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64) -> Result, Error> { +pub async fn repo_list_release_attachments( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/releases/{id}/assets", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases/{id}/assets", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -14189,11 +16482,24 @@ pub async fn repo_list_release_attachments(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_releases(configuration: &configuration::Configuration, owner: &str, repo: &str, draft: Option, pre_release: Option, q: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_releases( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + draft: Option, + pre_release: Option, + q: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -14203,7 +16509,12 @@ pub async fn repo_list_releases(configuration: &configuration::Configuration, ow let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/releases", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/releases", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_draft { @@ -14297,18 +16608,33 @@ pub async fn repo_list_releases(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_stargazers(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_stargazers( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/stargazers", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/stargazers", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -14393,11 +16719,24 @@ pub async fn repo_list_stargazers(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_statuses(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, sort: Option<&str>, state: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_statuses( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: &str, + sort: Option<&str>, + state: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -14407,7 +16746,13 @@ pub async fn repo_list_statuses(configuration: &configuration::Configuration, ow let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/statuses/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/statuses/{sha}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + sha = crate::apis::urlencode(p_path_sha) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_sort { @@ -14498,11 +16843,24 @@ pub async fn repo_list_statuses(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_statuses_by_ref(configuration: &configuration::Configuration, owner: &str, repo: &str, r#ref: &str, sort: Option<&str>, state: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_statuses_by_ref( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + r#ref: &str, + sort: Option<&str>, + state: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -14603,18 +16961,33 @@ pub async fn repo_list_statuses_by_ref(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_subscribers(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_subscribers( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/subscribers", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/subscribers", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -14699,16 +17072,29 @@ pub async fn repo_list_subscribers(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_tag_protection(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_list_tag_protection( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/tag_protections", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/tag_protections", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -14787,18 +17173,33 @@ pub async fn repo_list_tag_protection(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_tags(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_list_tags( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/tags", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/tags", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -14883,16 +17284,29 @@ pub async fn repo_list_tags(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_teams(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result, Error> { +pub async fn repo_list_teams( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/teams", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/teams", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -14971,18 +17385,33 @@ pub async fn repo_list_teams(configuration: &configuration::Configuration, owner } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_list_topics(configuration: &configuration::Configuration, owner: &str, repo: &str, page: Option, limit: Option) -> Result> { +pub async fn repo_list_topics( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + page: Option, + limit: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/topics", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/topics", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -15067,19 +17496,37 @@ pub async fn repo_list_topics(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_merge_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, body: Option) -> Result<(), Error> { +pub async fn repo_merge_pull_request( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/merge", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/merge", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -15147,16 +17594,25 @@ pub async fn repo_merge_pull_request(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_migrate(configuration: &configuration::Configuration, body: Option) -> Result> { +pub async fn repo_migrate( + configuration: &configuration::Configuration, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/repos/migrate", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -15235,17 +17691,32 @@ pub async fn repo_migrate(configuration: &configuration::Configuration, body: Op } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_mirror_sync(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn repo_mirror_sync( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/mirror-sync", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/mirror-sync", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -15312,16 +17783,29 @@ pub async fn repo_mirror_sync(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_new_pin_allowed(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn repo_new_pin_allowed( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/new_pin_allowed", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/new_pin_allowed", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -15400,17 +17884,32 @@ pub async fn repo_new_pin_allowed(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_pull_request_is_merged(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64) -> Result<(), Error> { +pub async fn repo_pull_request_is_merged( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/merge", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/merge", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -15478,17 +17977,32 @@ pub async fn repo_pull_request_is_merged(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_push_mirror_sync(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn repo_push_mirror_sync( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/push_mirrors-sync", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/push_mirrors-sync", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -15555,18 +18069,35 @@ pub async fn repo_push_mirror_sync(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_remove_note(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str) -> Result<(), Error> { +pub async fn repo_remove_note( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_sha = sha; - let uri_str = format!("{}/repos/{owner}/{repo}/git/notes/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/git/notes/{sha}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + sha = crate::apis::urlencode(p_path_sha) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -15633,17 +18164,31 @@ pub async fn repo_remove_note(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_replace_all_flags(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result<(), Error> { +pub async fn repo_replace_all_flags( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/flags", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/flags", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -15712,11 +18257,34 @@ pub async fn repo_replace_all_flags(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_search(configuration: &configuration::Configuration, q: Option<&str>, topic: Option, include_desc: Option, uid: Option, priority_owner_id: Option, team_id: Option, starred_by: Option, private: Option, is_private: Option, template: Option, archived: Option, mode: Option<&str>, exclusive: Option, sort: Option<&str>, order: Option<&str>, page: Option, limit: Option) -> Result> { +pub async fn repo_search( + configuration: &configuration::Configuration, + q: Option<&str>, + topic: Option, + include_desc: Option, + uid: Option, + priority_owner_id: Option, + team_id: Option, + starred_by: Option, + private: Option, + is_private: Option, + template: Option, + archived: Option, + mode: Option<&str>, + exclusive: Option, + sort: Option<&str>, + order: Option<&str>, + page: Option, + limit: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_q = q; let p_query_topic = topic; @@ -15866,17 +18434,31 @@ pub async fn repo_search(configuration: &configuration::Configuration, q: Option } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_search_run_jobs(configuration: &configuration::Configuration, owner: &str, repo: &str, labels: Option<&str>) -> Result, Error> { +pub async fn repo_search_run_jobs( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + labels: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_query_labels = labels; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/jobs", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/runners/jobs", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_labels { @@ -15958,19 +18540,37 @@ pub async fn repo_search_run_jobs(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_set_note(configuration: &configuration::Configuration, owner: &str, repo: &str, sha: &str, body: Option) -> Result> { +pub async fn repo_set_note( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + sha: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_sha = sha; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/git/notes/{sha}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), sha=crate::apis::urlencode(p_path_sha)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/git/notes/{sha}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + sha = crate::apis::urlencode(p_path_sha) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -16049,16 +18649,29 @@ pub async fn repo_set_note(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_signing_key(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn repo_signing_key( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/signing-key.gpg", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/signing-key.gpg", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -16137,11 +18750,22 @@ pub async fn repo_signing_key(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_submit_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64, body: models::SubmitPullReviewOptions) -> Result> { +pub async fn repo_submit_pull_review( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + id: i64, + body: models::SubmitPullReviewOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -16149,8 +18773,17 @@ pub async fn repo_submit_pull_review(configuration: &configuration::Configuratio let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -16229,18 +18862,35 @@ pub async fn repo_submit_pull_review(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_sync_fork_branch(configuration: &configuration::Configuration, owner: &str, repo: &str, branch: &str) -> Result<(), Error> { +pub async fn repo_sync_fork_branch( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + branch: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_branch = branch; - let uri_str = format!("{}/repos/{owner}/{repo}/sync_fork/{branch}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), branch=crate::apis::urlencode(p_path_branch)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/sync_fork/{branch}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + branch = crate::apis::urlencode(p_path_branch) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -16307,17 +18957,32 @@ pub async fn repo_sync_fork_branch(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_sync_fork_branch_info(configuration: &configuration::Configuration, owner: &str, repo: &str, branch: &str) -> Result> { +pub async fn repo_sync_fork_branch_info( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + branch: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_branch = branch; - let uri_str = format!("{}/repos/{owner}/{repo}/sync_fork/{branch}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), branch=crate::apis::urlencode(p_path_branch)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/sync_fork/{branch}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + branch = crate::apis::urlencode(p_path_branch) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -16396,17 +19061,32 @@ pub async fn repo_sync_fork_branch_info(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_sync_fork_default(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn repo_sync_fork_default( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/sync_fork", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/sync_fork", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -16473,16 +19153,29 @@ pub async fn repo_sync_fork_default(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_sync_fork_default_info(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn repo_sync_fork_default_info( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/sync_fork", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/sync_fork", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -16561,19 +19254,37 @@ pub async fn repo_sync_fork_default_info(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_test_hook(configuration: &configuration::Configuration, owner: &str, repo: &str, id: i64, r#ref: Option<&str>) -> Result<(), Error> { +pub async fn repo_test_hook( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + id: i64, + r#ref: Option<&str>, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_id = id; let p_query_ref = r#ref; - let uri_str = format!("{}/repos/{owner}/{repo}/hooks/{id}/tests", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/hooks/{id}/tests", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref param_value) = p_query_ref { req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); @@ -16643,11 +19354,24 @@ pub async fn repo_test_hook(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_tracked_times(configuration: &configuration::Configuration, owner: &str, repo: &str, user: Option<&str>, since: Option, before: Option, page: Option, limit: Option) -> Result, Error> { +pub async fn repo_tracked_times( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + user: Option<&str>, + since: Option, + before: Option, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; @@ -16657,7 +19381,12 @@ pub async fn repo_tracked_times(configuration: &configuration::Configuration, ow let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/repos/{owner}/{repo}/times", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/times", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_user { @@ -16751,18 +19480,34 @@ pub async fn repo_tracked_times(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_transfer(configuration: &configuration::Configuration, owner: &str, repo: &str, body: models::TransferRepoOption) -> Result> { +pub async fn repo_transfer( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: models::TransferRepoOption, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/transfer", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/transfer", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -16841,19 +19586,38 @@ pub async fn repo_transfer(configuration: &configuration::Configuration, owner: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_un_dismiss_pull_review(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, id: i64) -> Result> { +pub async fn repo_un_dismiss_pull_review( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_path_id = id; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -16931,18 +19695,34 @@ pub async fn repo_un_dismiss_pull_review(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_update_avatar(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result<(), Error> { +pub async fn repo_update_avatar( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/avatar", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/avatar", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -17010,19 +19790,37 @@ pub async fn repo_update_avatar(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_update_branch(configuration: &configuration::Configuration, owner: &str, repo: &str, branch: &str, body: Option) -> Result<(), Error> { +pub async fn repo_update_branch( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + branch: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_branch = branch; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/branches/{branch}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), branch=crate::apis::urlencode(p_path_branch)); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/branches/{branch}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + branch = crate::apis::urlencode(p_path_branch) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -17090,18 +19888,34 @@ pub async fn repo_update_branch(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_update_file(configuration: &configuration::Configuration, owner: &str, repo: &str, filepath: &str, body: models::UpdateFileOptions) -> Result> { +pub async fn repo_update_file( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + filepath: &str, + body: models::UpdateFileOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_filepath = filepath; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/contents/{filepath}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), filepath=crate::apis::urlencode(p_path_filepath)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/contents/{filepath}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + filepath = crate::apis::urlencode(p_path_filepath) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -17181,19 +19995,37 @@ pub async fn repo_update_file(configuration: &configuration::Configuration, owne } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_update_pull_request(configuration: &configuration::Configuration, owner: &str, repo: &str, index: i64, style: Option<&str>) -> Result<(), Error> { +pub async fn repo_update_pull_request( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + index: i64, + style: Option<&str>, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_index = index; let p_query_style = style; - let uri_str = format!("{}/repos/{owner}/{repo}/pulls/{index}/update", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), index=p_path_index); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/pulls/{index}/update", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + index = p_path_index + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref param_value) = p_query_style { req_builder = req_builder.query(&[("style", ¶m_value.to_string())]); @@ -17263,17 +20095,31 @@ pub async fn repo_update_pull_request(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_update_topics(configuration: &configuration::Configuration, owner: &str, repo: &str, body: Option) -> Result<(), Error> { +pub async fn repo_update_topics( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/topics", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/topics", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -17342,16 +20188,29 @@ pub async fn repo_update_topics(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn repo_validate_issue_config(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn repo_validate_issue_config( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/issue_config/validate", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/issue_config/validate", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -17430,11 +20289,20 @@ pub async fn repo_validate_issue_config(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn topic_search(configuration: &configuration::Configuration, q: &str, page: Option, limit: Option) -> Result> { +pub async fn topic_search( + configuration: &configuration::Configuration, + q: &str, + page: Option, + limit: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_q = q; let p_query_page = page; @@ -17526,18 +20394,34 @@ pub async fn topic_search(configuration: &configuration::Configuration, q: &str, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn update_repo_secret(configuration: &configuration::Configuration, owner: &str, repo: &str, secretname: &str, body: Option) -> Result<(), Error> { +pub async fn update_repo_secret( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + secretname: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_secretname = secretname; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/secrets/{secretname}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), secretname=crate::apis::urlencode(p_path_secretname)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/secrets/{secretname}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + secretname = crate::apis::urlencode(p_path_secretname) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -17606,18 +20490,34 @@ pub async fn update_repo_secret(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn update_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, variablename: &str, body: Option) -> Result<(), Error> { +pub async fn update_repo_variable( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + variablename: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_variablename = variablename; let p_body_body = body; - let uri_str = format!("{}/repos/{owner}/{repo}/actions/variables/{variablename}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), variablename=crate::apis::urlencode(p_path_variablename)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/actions/variables/{variablename}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + variablename = crate::apis::urlencode(p_path_variablename) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -17686,16 +20586,29 @@ pub async fn update_repo_variable(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_check_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn user_current_check_subscription( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/subscription", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/subscription", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -17774,17 +20687,32 @@ pub async fn user_current_check_subscription(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_delete_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn user_current_delete_subscription( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/subscription", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/repos/{owner}/{repo}/subscription", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -17850,17 +20778,31 @@ pub async fn user_current_delete_subscription(configuration: &configuration::Con Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_put_subscription(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result> { +pub async fn user_current_put_subscription( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/repos/{owner}/{repo}/subscription", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/subscription", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -17939,18 +20881,33 @@ pub async fn user_current_put_subscription(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } #[deprecated] -pub async fn user_tracked_times(configuration: &configuration::Configuration, owner: &str, repo: &str, user: &str) -> Result, Error> { +pub async fn user_tracked_times( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, + user: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; let p_path_user = user; - let uri_str = format!("{}/repos/{owner}/{repo}/times/{user}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), user=crate::apis::urlencode(p_path_user)); + let uri_str = format!( + "{}/repos/{owner}/{repo}/times/{user}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo), + user = crate::apis::urlencode(p_path_user) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -18029,7 +20986,10 @@ pub async fn user_tracked_times(configuration: &configuration::Configuration, ow } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/forgejo-openapi/src/apis/settings_api.rs b/forgejo-openapi/src/apis/settings_api.rs index 826c4f9..96bb2f7 100644 --- a/forgejo-openapi/src/apis/settings_api.rs +++ b/forgejo-openapi/src/apis/settings_api.rs @@ -4,16 +4,14 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ - -use reqwest; -use serde::{Deserialize, Serialize, de::Error as _}; +use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; /// struct for typed errors of method [`get_general_api_settings`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -43,9 +41,9 @@ pub enum GetGeneralUiSettingsError { UnknownValue(serde_json::Value), } - -pub async fn get_general_api_settings(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn get_general_api_settings( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/settings/api", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -125,12 +123,17 @@ pub async fn get_general_api_settings(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_general_attachment_settings(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn get_general_attachment_settings( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/settings/attachment", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -210,12 +213,17 @@ pub async fn get_general_attachment_settings(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_general_repository_settings(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn get_general_repository_settings( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/settings/repository", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -295,12 +303,17 @@ pub async fn get_general_repository_settings(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_general_ui_settings(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn get_general_ui_settings( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/settings/ui", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -380,7 +393,10 @@ pub async fn get_general_ui_settings(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/forgejo-openapi/src/apis/user_api.rs b/forgejo-openapi/src/apis/user_api.rs index 8e330c3..1b2e7a2 100644 --- a/forgejo-openapi/src/apis/user_api.rs +++ b/forgejo-openapi/src/apis/user_api.rs @@ -4,16 +4,14 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ - -use reqwest; -use serde::{Deserialize, Serialize, de::Error as _}; +use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; /// struct for typed errors of method [`create_current_user_repo`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -725,13 +723,17 @@ pub enum UserVerifyGpgKeyError { UnknownValue(serde_json::Value), } - -pub async fn create_current_user_repo(configuration: &configuration::Configuration, body: Option) -> Result> { +pub async fn create_current_user_repo( + configuration: &configuration::Configuration, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/user/repos", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -810,17 +812,31 @@ pub async fn create_current_user_repo(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn create_user_variable(configuration: &configuration::Configuration, variablename: &str, body: Option) -> Result<(), Error> { +pub async fn create_user_variable( + configuration: &configuration::Configuration, + variablename: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_variablename = variablename; let p_body_body = body; - let uri_str = format!("{}/user/actions/variables/{variablename}", configuration.base_path, variablename=crate::apis::urlencode(p_path_variablename)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/user/actions/variables/{variablename}", + configuration.base_path, + variablename = crate::apis::urlencode(p_path_variablename) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -888,16 +904,29 @@ pub async fn create_user_variable(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn delete_user_secret(configuration: &configuration::Configuration, secretname: &str) -> Result<(), Error> { +pub async fn delete_user_secret( + configuration: &configuration::Configuration, + secretname: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_secretname = secretname; - let uri_str = format!("{}/user/actions/secrets/{secretname}", configuration.base_path, secretname=crate::apis::urlencode(p_path_secretname)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/user/actions/secrets/{secretname}", + configuration.base_path, + secretname = crate::apis::urlencode(p_path_secretname) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -964,16 +993,29 @@ pub async fn delete_user_secret(configuration: &configuration::Configuration, se } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn delete_user_variable(configuration: &configuration::Configuration, variablename: &str) -> Result<(), Error> { +pub async fn delete_user_variable( + configuration: &configuration::Configuration, + variablename: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_variablename = variablename; - let uri_str = format!("{}/user/actions/variables/{variablename}", configuration.base_path, variablename=crate::apis::urlencode(p_path_variablename)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/user/actions/variables/{variablename}", + configuration.base_path, + variablename = crate::apis::urlencode(p_path_variablename) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1040,12 +1082,17 @@ pub async fn delete_user_variable(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_user_settings(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn get_user_settings( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/user/settings", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -1125,15 +1172,26 @@ pub async fn get_user_settings(configuration: &configuration::Configuration, ) - } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_user_variable(configuration: &configuration::Configuration, variablename: &str) -> Result> { +pub async fn get_user_variable( + configuration: &configuration::Configuration, + variablename: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_variablename = variablename; - let uri_str = format!("{}/user/actions/variables/{variablename}", configuration.base_path, variablename=crate::apis::urlencode(p_path_variablename)); + let uri_str = format!( + "{}/user/actions/variables/{variablename}", + configuration.base_path, + variablename = crate::apis::urlencode(p_path_variablename) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -1212,11 +1270,19 @@ pub async fn get_user_variable(configuration: &configuration::Configuration, var } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_user_variables_list(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn get_user_variables_list( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -1306,12 +1372,17 @@ pub async fn get_user_variables_list(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn get_verification_token(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn get_verification_token( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/user/gpg_key_token", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -1391,16 +1462,28 @@ pub async fn get_verification_token(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn update_user_secret(configuration: &configuration::Configuration, secretname: &str, body: Option) -> Result<(), Error> { +pub async fn update_user_secret( + configuration: &configuration::Configuration, + secretname: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_secretname = secretname; let p_body_body = body; - let uri_str = format!("{}/user/actions/secrets/{secretname}", configuration.base_path, secretname=crate::apis::urlencode(p_path_secretname)); + let uri_str = format!( + "{}/user/actions/secrets/{secretname}", + configuration.base_path, + secretname = crate::apis::urlencode(p_path_secretname) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -1469,16 +1552,25 @@ pub async fn update_user_secret(configuration: &configuration::Configuration, se } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn update_user_settings(configuration: &configuration::Configuration, body: Option) -> Result> { +pub async fn update_user_settings( + configuration: &configuration::Configuration, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/user/settings", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1557,16 +1649,28 @@ pub async fn update_user_settings(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn update_user_variable(configuration: &configuration::Configuration, variablename: &str, body: Option) -> Result<(), Error> { +pub async fn update_user_variable( + configuration: &configuration::Configuration, + variablename: &str, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_variablename = variablename; let p_body_body = body; - let uri_str = format!("{}/user/actions/variables/{variablename}", configuration.base_path, variablename=crate::apis::urlencode(p_path_variablename)); + let uri_str = format!( + "{}/user/actions/variables/{variablename}", + configuration.base_path, + variablename = crate::apis::urlencode(p_path_variablename) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -1635,16 +1739,25 @@ pub async fn update_user_variable(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_add_email(configuration: &configuration::Configuration, body: Option) -> Result, Error> { +pub async fn user_add_email( + configuration: &configuration::Configuration, + body: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/user/emails", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -1723,15 +1836,26 @@ pub async fn user_add_email(configuration: &configuration::Configuration, body: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_block_user(configuration: &configuration::Configuration, username: &str) -> Result<(), Error> { +pub async fn user_block_user( + configuration: &configuration::Configuration, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; - let uri_str = format!("{}/user/block/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/user/block/{username}", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -1799,16 +1923,29 @@ pub async fn user_block_user(configuration: &configuration::Configuration, usern } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_check_following(configuration: &configuration::Configuration, username: &str, target: &str) -> Result<(), Error> { +pub async fn user_check_following( + configuration: &configuration::Configuration, + username: &str, + target: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_path_target = target; - let uri_str = format!("{}/users/{username}/following/{target}", configuration.base_path, username=crate::apis::urlencode(p_path_username), target=crate::apis::urlencode(p_path_target)); + let uri_str = format!( + "{}/users/{username}/following/{target}", + configuration.base_path, + username = crate::apis::urlencode(p_path_username), + target = crate::apis::urlencode(p_path_target) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -1876,11 +2013,18 @@ pub async fn user_check_following(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_check_quota(configuration: &configuration::Configuration, subject: &str) -> Result> { +pub async fn user_check_quota( + configuration: &configuration::Configuration, + subject: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_subject = subject; @@ -1964,16 +2108,25 @@ pub async fn user_check_quota(configuration: &configuration::Configuration, subj } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_create_hook(configuration: &configuration::Configuration, body: models::CreateHookOption) -> Result> { +pub async fn user_create_hook( + configuration: &configuration::Configuration, + body: models::CreateHookOption, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/user/hooks", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2052,16 +2205,25 @@ pub async fn user_create_hook(configuration: &configuration::Configuration, body } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_create_o_auth2_application(configuration: &configuration::Configuration, body: models::CreateOAuth2ApplicationOptions) -> Result> { +pub async fn user_create_o_auth2_application( + configuration: &configuration::Configuration, + body: models::CreateOAuth2ApplicationOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/user/applications/oauth2", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2140,17 +2302,31 @@ pub async fn user_create_o_auth2_application(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_create_token(configuration: &configuration::Configuration, username: &str, body: Option) -> Result> { +pub async fn user_create_token( + configuration: &configuration::Configuration, + username: &str, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_body_body = body; - let uri_str = format!("{}/users/{username}/tokens", configuration.base_path, username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/users/{username}/tokens", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2229,15 +2405,26 @@ pub async fn user_create_token(configuration: &configuration::Configuration, use } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_check_following(configuration: &configuration::Configuration, username: &str) -> Result<(), Error> { +pub async fn user_current_check_following( + configuration: &configuration::Configuration, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; - let uri_str = format!("{}/user/following/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/user/following/{username}", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2305,16 +2492,29 @@ pub async fn user_current_check_following(configuration: &configuration::Configu } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_check_starring(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn user_current_check_starring( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/user/starred/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/user/starred/{owner}/{repo}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2382,16 +2582,29 @@ pub async fn user_current_check_starring(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_delete_follow(configuration: &configuration::Configuration, username: &str) -> Result<(), Error> { +pub async fn user_current_delete_follow( + configuration: &configuration::Configuration, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; - let uri_str = format!("{}/user/following/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/user/following/{username}", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2458,16 +2671,29 @@ pub async fn user_current_delete_follow(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_delete_gpg_key(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { +pub async fn user_current_delete_gpg_key( + configuration: &configuration::Configuration, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/user/gpg_keys/{id}", configuration.base_path, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/user/gpg_keys/{id}", + configuration.base_path, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2534,16 +2760,25 @@ pub async fn user_current_delete_gpg_key(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_delete_key(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { +pub async fn user_current_delete_key( + configuration: &configuration::Configuration, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/user/keys/{id}", configuration.base_path, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!("{}/user/keys/{id}", configuration.base_path, id = p_path_id); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2610,17 +2845,32 @@ pub async fn user_current_delete_key(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_delete_star(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn user_current_delete_star( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/user/starred/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/user/starred/{owner}/{repo}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -2687,15 +2937,26 @@ pub async fn user_current_delete_star(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_get_gpg_key(configuration: &configuration::Configuration, id: i64) -> Result> { +pub async fn user_current_get_gpg_key( + configuration: &configuration::Configuration, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/user/gpg_keys/{id}", configuration.base_path, id=p_path_id); + let uri_str = format!( + "{}/user/gpg_keys/{id}", + configuration.base_path, + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2774,15 +3035,22 @@ pub async fn user_current_get_gpg_key(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_get_key(configuration: &configuration::Configuration, id: i64) -> Result> { +pub async fn user_current_get_key( + configuration: &configuration::Configuration, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/user/keys/{id}", configuration.base_path, id=p_path_id); + let uri_str = format!("{}/user/keys/{id}", configuration.base_path, id = p_path_id); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -2861,11 +3129,19 @@ pub async fn user_current_get_key(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_list_followers(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_current_list_followers( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -2955,11 +3231,19 @@ pub async fn user_current_list_followers(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_list_following(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_current_list_following( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -3049,11 +3333,19 @@ pub async fn user_current_list_following(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_list_gpg_keys(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_current_list_gpg_keys( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -3143,11 +3435,20 @@ pub async fn user_current_list_gpg_keys(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_list_keys(configuration: &configuration::Configuration, fingerprint: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn user_current_list_keys( + configuration: &configuration::Configuration, + fingerprint: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_fingerprint = fingerprint; let p_query_page = page; @@ -3241,11 +3542,20 @@ pub async fn user_current_list_keys(configuration: &configuration::Configuration } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_list_repos(configuration: &configuration::Configuration, page: Option, limit: Option, order_by: Option<&str>) -> Result, Error> { +pub async fn user_current_list_repos( + configuration: &configuration::Configuration, + page: Option, + limit: Option, + order_by: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -3339,11 +3649,19 @@ pub async fn user_current_list_repos(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_list_starred(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_current_list_starred( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -3433,11 +3751,19 @@ pub async fn user_current_list_starred(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_list_subscriptions(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_current_list_subscriptions( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -3527,16 +3853,25 @@ pub async fn user_current_list_subscriptions(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_post_gpg_key(configuration: &configuration::Configuration, form: Option) -> Result> { +pub async fn user_current_post_gpg_key( + configuration: &configuration::Configuration, + form: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_form = form; let uri_str = format!("{}/user/gpg_keys", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3615,16 +3950,25 @@ pub async fn user_current_post_gpg_key(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_post_key(configuration: &configuration::Configuration, body: Option) -> Result> { +pub async fn user_current_post_key( + configuration: &configuration::Configuration, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/user/keys", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -3703,15 +4047,26 @@ pub async fn user_current_post_key(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_put_follow(configuration: &configuration::Configuration, username: &str) -> Result<(), Error> { +pub async fn user_current_put_follow( + configuration: &configuration::Configuration, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; - let uri_str = format!("{}/user/following/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/user/following/{username}", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3779,16 +4134,29 @@ pub async fn user_current_put_follow(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_put_star(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<(), Error> { +pub async fn user_current_put_star( + configuration: &configuration::Configuration, + owner: &str, + repo: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_owner = owner; let p_path_repo = repo; - let uri_str = format!("{}/user/starred/{owner}/{repo}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo)); + let uri_str = format!( + "{}/user/starred/{owner}/{repo}", + configuration.base_path, + owner = crate::apis::urlencode(p_path_owner), + repo = crate::apis::urlencode(p_path_repo) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -3856,11 +4224,21 @@ pub async fn user_current_put_star(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_current_tracked_times(configuration: &configuration::Configuration, page: Option, limit: Option, since: Option, before: Option) -> Result, Error> { +pub async fn user_current_tracked_times( + configuration: &configuration::Configuration, + page: Option, + limit: Option, + since: Option, + before: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -3958,17 +4336,32 @@ pub async fn user_current_tracked_times(configuration: &configuration::Configura } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_delete_access_token(configuration: &configuration::Configuration, username: &str, token: &str) -> Result<(), Error> { +pub async fn user_delete_access_token( + configuration: &configuration::Configuration, + username: &str, + token: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_path_token = token; - let uri_str = format!("{}/users/{username}/tokens/{token}", configuration.base_path, username=crate::apis::urlencode(p_path_username), token=crate::apis::urlencode(p_path_token)); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/users/{username}/tokens/{token}", + configuration.base_path, + username = crate::apis::urlencode(p_path_username), + token = crate::apis::urlencode(p_path_token) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4035,14 +4428,21 @@ pub async fn user_delete_access_token(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_delete_avatar(configuration: &configuration::Configuration, ) -> Result<(), Error> { - +pub async fn user_delete_avatar( + configuration: &configuration::Configuration, +) -> Result<(), Error> { let uri_str = format!("{}/user/avatar", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4109,16 +4509,25 @@ pub async fn user_delete_avatar(configuration: &configuration::Configuration, ) } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_delete_email(configuration: &configuration::Configuration, body: Option) -> Result<(), Error> { +pub async fn user_delete_email( + configuration: &configuration::Configuration, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/user/emails", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4186,16 +4595,29 @@ pub async fn user_delete_email(configuration: &configuration::Configuration, bod } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_delete_hook(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { +pub async fn user_delete_hook( + configuration: &configuration::Configuration, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/user/hooks/{id}", configuration.base_path, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/user/hooks/{id}", + configuration.base_path, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4262,16 +4684,29 @@ pub async fn user_delete_hook(configuration: &configuration::Configuration, id: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_delete_o_auth2_application(configuration: &configuration::Configuration, id: i64) -> Result<(), Error> { +pub async fn user_delete_o_auth2_application( + configuration: &configuration::Configuration, + id: i64, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/user/applications/oauth2/{id}", configuration.base_path, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/user/applications/oauth2/{id}", + configuration.base_path, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4338,17 +4773,31 @@ pub async fn user_delete_o_auth2_application(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_edit_hook(configuration: &configuration::Configuration, id: i64, body: Option) -> Result> { +pub async fn user_edit_hook( + configuration: &configuration::Configuration, + id: i64, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/user/hooks/{id}", configuration.base_path, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/user/hooks/{id}", + configuration.base_path, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -4427,15 +4876,26 @@ pub async fn user_edit_hook(configuration: &configuration::Configuration, id: i6 } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_get(configuration: &configuration::Configuration, username: &str) -> Result> { +pub async fn user_get( + configuration: &configuration::Configuration, + username: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; - let uri_str = format!("{}/users/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4514,12 +4974,17 @@ pub async fn user_get(configuration: &configuration::Configuration, username: &s } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_get_current(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn user_get_current( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/user", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -4599,15 +5064,26 @@ pub async fn user_get_current(configuration: &configuration::Configuration, ) -> } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_get_heatmap_data(configuration: &configuration::Configuration, username: &str) -> Result, Error> { +pub async fn user_get_heatmap_data( + configuration: &configuration::Configuration, + username: &str, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; - let uri_str = format!("{}/users/{username}/heatmap", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}/heatmap", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4686,15 +5162,26 @@ pub async fn user_get_heatmap_data(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_get_hook(configuration: &configuration::Configuration, id: i64) -> Result> { +pub async fn user_get_hook( + configuration: &configuration::Configuration, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/user/hooks/{id}", configuration.base_path, id=p_path_id); + let uri_str = format!( + "{}/user/hooks/{id}", + configuration.base_path, + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4773,15 +5260,26 @@ pub async fn user_get_hook(configuration: &configuration::Configuration, id: i64 } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_get_o_auth2_application(configuration: &configuration::Configuration, id: i64) -> Result> { +pub async fn user_get_o_auth2_application( + configuration: &configuration::Configuration, + id: i64, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; - let uri_str = format!("{}/user/applications/oauth2/{id}", configuration.base_path, id=p_path_id); + let uri_str = format!( + "{}/user/applications/oauth2/{id}", + configuration.base_path, + id = p_path_id + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -4860,11 +5358,19 @@ pub async fn user_get_o_auth2_application(configuration: &configuration::Configu } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_get_o_auth2_applications(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_get_o_auth2_applications( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -4954,12 +5460,17 @@ pub async fn user_get_o_auth2_applications(configuration: &configuration::Config } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_get_quota(configuration: &configuration::Configuration, ) -> Result> { - +pub async fn user_get_quota( + configuration: &configuration::Configuration, +) -> Result> { let uri_str = format!("{}/user/quota", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -5039,13 +5550,21 @@ pub async fn user_get_quota(configuration: &configuration::Configuration, ) -> R } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_get_runner_registration_token(configuration: &configuration::Configuration, ) -> Result> { - - let uri_str = format!("{}/user/actions/runners/registration-token", configuration.base_path); +pub async fn user_get_runner_registration_token( + configuration: &configuration::Configuration, +) -> Result> { + let uri_str = format!( + "{}/user/actions/runners/registration-token", + configuration.base_path + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -5123,12 +5642,21 @@ pub async fn user_get_runner_registration_token(configuration: &configuration::C } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_get_stop_watches(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_get_stop_watches( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -5218,17 +5746,30 @@ pub async fn user_get_stop_watches(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_get_tokens(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn user_get_tokens( + configuration: &configuration::Configuration, + username: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/users/{username}/tokens", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}/tokens", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -5313,11 +5854,22 @@ pub async fn user_get_tokens(configuration: &configuration::Configuration, usern } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_activity_feeds(configuration: &configuration::Configuration, username: &str, only_performed_by: Option, date: Option, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_activity_feeds( + configuration: &configuration::Configuration, + username: &str, + only_performed_by: Option, + date: Option, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_query_only_performed_by = only_performed_by; @@ -5325,7 +5877,11 @@ pub async fn user_list_activity_feeds(configuration: &configuration::Configurati let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/users/{username}/activities/feeds", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}/activities/feeds", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_only_performed_by { @@ -5416,11 +5972,19 @@ pub async fn user_list_activity_feeds(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_blocked_users(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_blocked_users( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -5510,12 +6074,17 @@ pub async fn user_list_blocked_users(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_emails(configuration: &configuration::Configuration, ) -> Result, Error> { - +pub async fn user_list_emails( + configuration: &configuration::Configuration, +) -> Result, Error> { let uri_str = format!("{}/user/emails", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -5595,17 +6164,30 @@ pub async fn user_list_emails(configuration: &configuration::Configuration, ) -> } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_followers(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_followers( + configuration: &configuration::Configuration, + username: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/users/{username}/followers", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}/followers", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -5690,17 +6272,30 @@ pub async fn user_list_followers(configuration: &configuration::Configuration, u } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_following(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_following( + configuration: &configuration::Configuration, + username: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/users/{username}/following", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}/following", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -5785,17 +6380,30 @@ pub async fn user_list_following(configuration: &configuration::Configuration, u } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_gpg_keys(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_gpg_keys( + configuration: &configuration::Configuration, + username: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/users/{username}/gpg_keys", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}/gpg_keys", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -5880,11 +6488,19 @@ pub async fn user_list_gpg_keys(configuration: &configuration::Configuration, us } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_hooks(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_hooks( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -5974,18 +6590,32 @@ pub async fn user_list_hooks(configuration: &configuration::Configuration, page: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_keys(configuration: &configuration::Configuration, username: &str, fingerprint: Option<&str>, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_keys( + configuration: &configuration::Configuration, + username: &str, + fingerprint: Option<&str>, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_query_fingerprint = fingerprint; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/users/{username}/keys", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}/keys", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_fingerprint { @@ -6073,11 +6703,19 @@ pub async fn user_list_keys(configuration: &configuration::Configuration, userna } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_quota_artifacts(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_quota_artifacts( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -6167,11 +6805,19 @@ pub async fn user_list_quota_artifacts(configuration: &configuration::Configurat } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_quota_attachments(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_quota_attachments( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -6261,11 +6907,19 @@ pub async fn user_list_quota_attachments(configuration: &configuration::Configur } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_quota_packages(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_quota_packages( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -6355,17 +7009,30 @@ pub async fn user_list_quota_packages(configuration: &configuration::Configurati } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_repos(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_repos( + configuration: &configuration::Configuration, + username: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/users/{username}/repos", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}/repos", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -6450,17 +7117,30 @@ pub async fn user_list_repos(configuration: &configuration::Configuration, usern } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_starred(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_starred( + configuration: &configuration::Configuration, + username: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/users/{username}/starred", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}/starred", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -6545,17 +7225,30 @@ pub async fn user_list_starred(configuration: &configuration::Configuration, use } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_subscriptions(configuration: &configuration::Configuration, username: &str, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_subscriptions( + configuration: &configuration::Configuration, + username: &str, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; let p_query_page = page; let p_query_limit = limit; - let uri_str = format!("{}/users/{username}/subscriptions", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/users/{username}/subscriptions", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_page { @@ -6640,11 +7333,19 @@ pub async fn user_list_subscriptions(configuration: &configuration::Configuratio } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_list_teams(configuration: &configuration::Configuration, page: Option, limit: Option) -> Result, Error> { +pub async fn user_list_teams( + configuration: &configuration::Configuration, + page: Option, + limit: Option, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_page = page; let p_query_limit = limit; @@ -6734,11 +7435,22 @@ pub async fn user_list_teams(configuration: &configuration::Configuration, page: } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_search(configuration: &configuration::Configuration, q: Option<&str>, uid: Option, sort: Option<&str>, page: Option, limit: Option) -> Result> { +pub async fn user_search( + configuration: &configuration::Configuration, + q: Option<&str>, + uid: Option, + sort: Option<&str>, + page: Option, + limit: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_q = q; let p_query_uid = uid; @@ -6840,11 +7552,18 @@ pub async fn user_search(configuration: &configuration::Configuration, q: Option } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_search_run_jobs(configuration: &configuration::Configuration, labels: Option<&str>) -> Result, Error> { +pub async fn user_search_run_jobs( + configuration: &configuration::Configuration, + labels: Option<&str>, +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_labels = labels; @@ -6930,15 +7649,26 @@ pub async fn user_search_run_jobs(configuration: &configuration::Configuration, } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_unblock_user(configuration: &configuration::Configuration, username: &str) -> Result<(), Error> { +pub async fn user_unblock_user( + configuration: &configuration::Configuration, + username: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_path_username = username; - let uri_str = format!("{}/user/unblock/{username}", configuration.base_path, username=crate::apis::urlencode(p_path_username)); + let uri_str = format!( + "{}/user/unblock/{username}", + configuration.base_path, + username = crate::apis::urlencode(p_path_username) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref apikey) = configuration.api_key { @@ -7006,16 +7736,25 @@ pub async fn user_unblock_user(configuration: &configuration::Configuration, use } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_update_avatar(configuration: &configuration::Configuration, body: Option) -> Result<(), Error> { +pub async fn user_update_avatar( + configuration: &configuration::Configuration, + body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/user/avatar", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7083,17 +7822,31 @@ pub async fn user_update_avatar(configuration: &configuration::Configuration, bo } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_update_o_auth2_application(configuration: &configuration::Configuration, id: i64, body: models::CreateOAuth2ApplicationOptions) -> Result> { +pub async fn user_update_o_auth2_application( + configuration: &configuration::Configuration, + id: i64, + body: models::CreateOAuth2ApplicationOptions, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_path_id = id; let p_body_body = body; - let uri_str = format!("{}/user/applications/oauth2/{id}", configuration.base_path, id=p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!( + "{}/user/applications/oauth2/{id}", + configuration.base_path, + id = p_path_id + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7172,16 +7925,25 @@ pub async fn user_update_o_auth2_application(configuration: &configuration::Conf } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn user_verify_gpg_key(configuration: &configuration::Configuration, body: Option) -> Result> { +pub async fn user_verify_gpg_key( + configuration: &configuration::Configuration, + body: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_body_body = body; let uri_str = format!("{}/user/gpg_key_verify", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref apikey) = configuration.api_key { let key = apikey.key.clone(); @@ -7260,7 +8022,10 @@ pub async fn user_verify_gpg_key(configuration: &configuration::Configuration, b } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/forgejo-openapi/src/lib.rs b/forgejo-openapi/src/lib.rs index e152062..9556a0a 100644 --- a/forgejo-openapi/src/lib.rs +++ b/forgejo-openapi/src/lib.rs @@ -1,11 +1,11 @@ #![allow(unused_imports)] #![allow(clippy::too_many_arguments)] -extern crate serde_repr; +extern crate reqwest; extern crate serde; extern crate serde_json; +extern crate serde_repr; extern crate url; -extern crate reqwest; pub mod apis; pub mod models; diff --git a/forgejo-openapi/src/models/access_token.rs b/forgejo-openapi/src/models/access_token.rs index 415ba63..31ba41e 100644 --- a/forgejo-openapi/src/models/access_token.rs +++ b/forgejo-openapi/src/models/access_token.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -36,4 +36,3 @@ impl AccessToken { } } } - diff --git a/forgejo-openapi/src/models/action_run.rs b/forgejo-openapi/src/models/action_run.rs index d2acb63..c31cc9b 100644 --- a/forgejo-openapi/src/models/action_run.rs +++ b/forgejo-openapi/src/models/action_run.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -45,7 +45,10 @@ pub struct ActionRun { #[serde(rename = "index_in_repo", skip_serializing_if = "Option::is_none")] pub index_in_repo: Option, /// If this is triggered by a PR from a forked repository or an untrusted user, we need to check if it is approved and limit permissions when running the workflow. - #[serde(rename = "is_fork_pull_request", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "is_fork_pull_request", + skip_serializing_if = "Option::is_none" + )] pub is_fork_pull_request: Option, /// has the commit/tag/… the action run ran on been deleted #[serde(rename = "is_ref_deleted", skip_serializing_if = "Option::is_none")] @@ -113,4 +116,3 @@ impl ActionRun { } } } - diff --git a/forgejo-openapi/src/models/action_run_job.rs b/forgejo-openapi/src/models/action_run_job.rs index 8359d11..958ecc2 100644 --- a/forgejo-openapi/src/models/action_run_job.rs +++ b/forgejo-openapi/src/models/action_run_job.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -55,4 +55,3 @@ impl ActionRunJob { } } } - diff --git a/forgejo-openapi/src/models/action_task.rs b/forgejo-openapi/src/models/action_task.rs index 4575536..eebdf41 100644 --- a/forgejo-openapi/src/models/action_task.rs +++ b/forgejo-openapi/src/models/action_task.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -62,4 +62,3 @@ impl ActionTask { } } } - diff --git a/forgejo-openapi/src/models/action_task_response.rs b/forgejo-openapi/src/models/action_task_response.rs index 7e4643c..26a8d94 100644 --- a/forgejo-openapi/src/models/action_task_response.rs +++ b/forgejo-openapi/src/models/action_task_response.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl ActionTaskResponse { } } } - diff --git a/forgejo-openapi/src/models/action_variable.rs b/forgejo-openapi/src/models/action_variable.rs index 75cf5e0..f548234 100644 --- a/forgejo-openapi/src/models/action_variable.rs +++ b/forgejo-openapi/src/models/action_variable.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -39,4 +39,3 @@ impl ActionVariable { } } } - diff --git a/forgejo-openapi/src/models/activity.rs b/forgejo-openapi/src/models/activity.rs index e8a33bd..3f9ae56 100644 --- a/forgejo-openapi/src/models/activity.rs +++ b/forgejo-openapi/src/models/activity.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -125,4 +125,3 @@ impl Default for OpType { Self::CreateRepo } } - diff --git a/forgejo-openapi/src/models/activity_pub.rs b/forgejo-openapi/src/models/activity_pub.rs index e4ddeec..5c64fdd 100644 --- a/forgejo-openapi/src/models/activity_pub.rs +++ b/forgejo-openapi/src/models/activity_pub.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct ActivityPub { impl ActivityPub { /// ActivityPub type pub fn new() -> ActivityPub { - ActivityPub { - at_context: None, - } + ActivityPub { at_context: None } } } - diff --git a/forgejo-openapi/src/models/add_collaborator_option.rs b/forgejo-openapi/src/models/add_collaborator_option.rs index 822c87a..ad484fa 100644 --- a/forgejo-openapi/src/models/add_collaborator_option.rs +++ b/forgejo-openapi/src/models/add_collaborator_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,12 +21,10 @@ pub struct AddCollaboratorOption { impl AddCollaboratorOption { /// AddCollaboratorOption options when adding a user as a collaborator of a repository pub fn new() -> AddCollaboratorOption { - AddCollaboratorOption { - permission: None, - } + AddCollaboratorOption { permission: None } } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Permission { #[serde(rename = "read")] @@ -42,4 +40,3 @@ impl Default for Permission { Self::Read } } - diff --git a/forgejo-openapi/src/models/add_time_option.rs b/forgejo-openapi/src/models/add_time_option.rs index 693c3da..85c785e 100644 --- a/forgejo-openapi/src/models/add_time_option.rs +++ b/forgejo-openapi/src/models/add_time_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -34,4 +34,3 @@ impl AddTimeOption { } } } - diff --git a/forgejo-openapi/src/models/annotated_tag.rs b/forgejo-openapi/src/models/annotated_tag.rs index 8dc3598..2f41ab0 100644 --- a/forgejo-openapi/src/models/annotated_tag.rs +++ b/forgejo-openapi/src/models/annotated_tag.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,7 +14,10 @@ use serde::{Deserialize, Serialize}; /// AnnotatedTag : AnnotatedTag represents an annotated tag #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AnnotatedTag { - #[serde(rename = "archive_download_count", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "archive_download_count", + skip_serializing_if = "Option::is_none" + )] pub archive_download_count: Option>, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, @@ -47,4 +50,3 @@ impl AnnotatedTag { } } } - diff --git a/forgejo-openapi/src/models/annotated_tag_object.rs b/forgejo-openapi/src/models/annotated_tag_object.rs index bbd67e3..d8a4809 100644 --- a/forgejo-openapi/src/models/annotated_tag_object.rs +++ b/forgejo-openapi/src/models/annotated_tag_object.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl AnnotatedTagObject { } } } - diff --git a/forgejo-openapi/src/models/api_error.rs b/forgejo-openapi/src/models/api_error.rs index 1108e3b..57c5fe5 100644 --- a/forgejo-openapi/src/models/api_error.rs +++ b/forgejo-openapi/src/models/api_error.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl ApiError { } } } - diff --git a/forgejo-openapi/src/models/api_forbidden_error.rs b/forgejo-openapi/src/models/api_forbidden_error.rs index 3b9dd74..67ee3bd 100644 --- a/forgejo-openapi/src/models/api_forbidden_error.rs +++ b/forgejo-openapi/src/models/api_forbidden_error.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -27,4 +27,3 @@ impl ApiForbiddenError { } } } - diff --git a/forgejo-openapi/src/models/api_internal_server_error.rs b/forgejo-openapi/src/models/api_internal_server_error.rs index fef2f7b..2bbb45a 100644 --- a/forgejo-openapi/src/models/api_internal_server_error.rs +++ b/forgejo-openapi/src/models/api_internal_server_error.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -27,4 +27,3 @@ impl ApiInternalServerError { } } } - diff --git a/forgejo-openapi/src/models/api_invalid_topics_error.rs b/forgejo-openapi/src/models/api_invalid_topics_error.rs index ae0adbc..f7c3ab3 100644 --- a/forgejo-openapi/src/models/api_invalid_topics_error.rs +++ b/forgejo-openapi/src/models/api_invalid_topics_error.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -27,4 +27,3 @@ impl ApiInvalidTopicsError { } } } - diff --git a/forgejo-openapi/src/models/api_not_found.rs b/forgejo-openapi/src/models/api_not_found.rs index 73c3202..6db8953 100644 --- a/forgejo-openapi/src/models/api_not_found.rs +++ b/forgejo-openapi/src/models/api_not_found.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl ApiNotFound { } } } - diff --git a/forgejo-openapi/src/models/api_repo_archived_error.rs b/forgejo-openapi/src/models/api_repo_archived_error.rs index b7c7ef8..8019d55 100644 --- a/forgejo-openapi/src/models/api_repo_archived_error.rs +++ b/forgejo-openapi/src/models/api_repo_archived_error.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -27,4 +27,3 @@ impl ApiRepoArchivedError { } } } - diff --git a/forgejo-openapi/src/models/api_unauthorized_error.rs b/forgejo-openapi/src/models/api_unauthorized_error.rs index e1bb472..94e7b8f 100644 --- a/forgejo-openapi/src/models/api_unauthorized_error.rs +++ b/forgejo-openapi/src/models/api_unauthorized_error.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -27,4 +27,3 @@ impl ApiUnauthorizedError { } } } - diff --git a/forgejo-openapi/src/models/api_validation_error.rs b/forgejo-openapi/src/models/api_validation_error.rs index 44503f8..0ce3319 100644 --- a/forgejo-openapi/src/models/api_validation_error.rs +++ b/forgejo-openapi/src/models/api_validation_error.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -27,4 +27,3 @@ impl ApiValidationError { } } } - diff --git a/forgejo-openapi/src/models/attachment.rs b/forgejo-openapi/src/models/attachment.rs index 5a8c1cc..5cf5ee4 100644 --- a/forgejo-openapi/src/models/attachment.rs +++ b/forgejo-openapi/src/models/attachment.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,7 +14,10 @@ use serde::{Deserialize, Serialize}; /// Attachment : Attachment a generic attachment #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Attachment { - #[serde(rename = "browser_download_url", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "browser_download_url", + skip_serializing_if = "Option::is_none" + )] pub browser_download_url: Option, #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, @@ -47,7 +50,7 @@ impl Attachment { } } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Type { #[serde(rename = "attachment")] @@ -61,4 +64,3 @@ impl Default for Type { Self::Attachment } } - diff --git a/forgejo-openapi/src/models/blocked_user.rs b/forgejo-openapi/src/models/blocked_user.rs index 49a5297..8d74764 100644 --- a/forgejo-openapi/src/models/blocked_user.rs +++ b/forgejo-openapi/src/models/blocked_user.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -27,4 +27,3 @@ impl BlockedUser { } } } - diff --git a/forgejo-openapi/src/models/branch.rs b/forgejo-openapi/src/models/branch.rs index 1369e8a..d12e9ed 100644 --- a/forgejo-openapi/src/models/branch.rs +++ b/forgejo-openapi/src/models/branch.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -16,9 +16,15 @@ use serde::{Deserialize, Serialize}; pub struct Branch { #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] pub commit: Option>, - #[serde(rename = "effective_branch_protection_name", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "effective_branch_protection_name", + skip_serializing_if = "Option::is_none" + )] pub effective_branch_protection_name: Option, - #[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_status_check", + skip_serializing_if = "Option::is_none" + )] pub enable_status_check: Option, #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, @@ -26,7 +32,10 @@ pub struct Branch { pub protected: Option, #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] pub required_approvals: Option, - #[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "status_check_contexts", + skip_serializing_if = "Option::is_none" + )] pub status_check_contexts: Option>, #[serde(rename = "user_can_merge", skip_serializing_if = "Option::is_none")] pub user_can_merge: Option, @@ -50,4 +59,3 @@ impl Branch { } } } - diff --git a/forgejo-openapi/src/models/branch_protection.rs b/forgejo-openapi/src/models/branch_protection.rs index da03b8c..b7a2d58 100644 --- a/forgejo-openapi/src/models/branch_protection.rs +++ b/forgejo-openapi/src/models/branch_protection.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -16,56 +16,116 @@ use serde::{Deserialize, Serialize}; pub struct BranchProtection { #[serde(rename = "apply_to_admins", skip_serializing_if = "Option::is_none")] pub apply_to_admins: Option, - #[serde(rename = "approvals_whitelist_teams", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "approvals_whitelist_teams", + skip_serializing_if = "Option::is_none" + )] pub approvals_whitelist_teams: Option>, - #[serde(rename = "approvals_whitelist_username", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "approvals_whitelist_username", + skip_serializing_if = "Option::is_none" + )] pub approvals_whitelist_username: Option>, - #[serde(rename = "block_on_official_review_requests", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "block_on_official_review_requests", + skip_serializing_if = "Option::is_none" + )] pub block_on_official_review_requests: Option, - #[serde(rename = "block_on_outdated_branch", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "block_on_outdated_branch", + skip_serializing_if = "Option::is_none" + )] pub block_on_outdated_branch: Option, - #[serde(rename = "block_on_rejected_reviews", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "block_on_rejected_reviews", + skip_serializing_if = "Option::is_none" + )] pub block_on_rejected_reviews: Option, /// Deprecated: true #[serde(rename = "branch_name", skip_serializing_if = "Option::is_none")] pub branch_name: Option, #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, - #[serde(rename = "dismiss_stale_approvals", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "dismiss_stale_approvals", + skip_serializing_if = "Option::is_none" + )] pub dismiss_stale_approvals: Option, - #[serde(rename = "enable_approvals_whitelist", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_approvals_whitelist", + skip_serializing_if = "Option::is_none" + )] pub enable_approvals_whitelist: Option, - #[serde(rename = "enable_merge_whitelist", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_merge_whitelist", + skip_serializing_if = "Option::is_none" + )] pub enable_merge_whitelist: Option, #[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")] pub enable_push: Option, - #[serde(rename = "enable_push_whitelist", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_push_whitelist", + skip_serializing_if = "Option::is_none" + )] pub enable_push_whitelist: Option, - #[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_status_check", + skip_serializing_if = "Option::is_none" + )] pub enable_status_check: Option, - #[serde(rename = "ignore_stale_approvals", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "ignore_stale_approvals", + skip_serializing_if = "Option::is_none" + )] pub ignore_stale_approvals: Option, - #[serde(rename = "merge_whitelist_teams", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "merge_whitelist_teams", + skip_serializing_if = "Option::is_none" + )] pub merge_whitelist_teams: Option>, - #[serde(rename = "merge_whitelist_usernames", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "merge_whitelist_usernames", + skip_serializing_if = "Option::is_none" + )] pub merge_whitelist_usernames: Option>, - #[serde(rename = "protected_file_patterns", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "protected_file_patterns", + skip_serializing_if = "Option::is_none" + )] pub protected_file_patterns: Option, - #[serde(rename = "push_whitelist_deploy_keys", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "push_whitelist_deploy_keys", + skip_serializing_if = "Option::is_none" + )] pub push_whitelist_deploy_keys: Option, - #[serde(rename = "push_whitelist_teams", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "push_whitelist_teams", + skip_serializing_if = "Option::is_none" + )] pub push_whitelist_teams: Option>, - #[serde(rename = "push_whitelist_usernames", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "push_whitelist_usernames", + skip_serializing_if = "Option::is_none" + )] pub push_whitelist_usernames: Option>, - #[serde(rename = "require_signed_commits", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "require_signed_commits", + skip_serializing_if = "Option::is_none" + )] pub require_signed_commits: Option, #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] pub required_approvals: Option, #[serde(rename = "rule_name", skip_serializing_if = "Option::is_none")] pub rule_name: Option, - #[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "status_check_contexts", + skip_serializing_if = "Option::is_none" + )] pub status_check_contexts: Option>, - #[serde(rename = "unprotected_file_patterns", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "unprotected_file_patterns", + skip_serializing_if = "Option::is_none" + )] pub unprotected_file_patterns: Option, #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] pub updated_at: Option, @@ -105,4 +165,3 @@ impl BranchProtection { } } } - diff --git a/forgejo-openapi/src/models/change_file_operation.rs b/forgejo-openapi/src/models/change_file_operation.rs index 108bbc4..b9f1d9c 100644 --- a/forgejo-openapi/src/models/change_file_operation.rs +++ b/forgejo-openapi/src/models/change_file_operation.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -59,4 +59,3 @@ impl Default for Operation { Self::Create } } - diff --git a/forgejo-openapi/src/models/change_files_options.rs b/forgejo-openapi/src/models/change_files_options.rs index 4978e28..abdfdd3 100644 --- a/forgejo-openapi/src/models/change_files_options.rs +++ b/forgejo-openapi/src/models/change_files_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -52,4 +52,3 @@ impl ChangeFilesOptions { } } } - diff --git a/forgejo-openapi/src/models/changed_file.rs b/forgejo-openapi/src/models/changed_file.rs index 1208a9b..6d60dc1 100644 --- a/forgejo-openapi/src/models/changed_file.rs +++ b/forgejo-openapi/src/models/changed_file.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -50,4 +50,3 @@ impl ChangedFile { } } } - diff --git a/forgejo-openapi/src/models/combined_status.rs b/forgejo-openapi/src/models/combined_status.rs index 5423fd9..aa9298b 100644 --- a/forgejo-openapi/src/models/combined_status.rs +++ b/forgejo-openapi/src/models/combined_status.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -45,4 +45,3 @@ impl CombinedStatus { } } } - diff --git a/forgejo-openapi/src/models/comment.rs b/forgejo-openapi/src/models/comment.rs index 81f2bf5..bdc579e 100644 --- a/forgejo-openapi/src/models/comment.rs +++ b/forgejo-openapi/src/models/comment.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -56,4 +56,3 @@ impl Comment { } } } - diff --git a/forgejo-openapi/src/models/commit.rs b/forgejo-openapi/src/models/commit.rs index 41bf471..362067d 100644 --- a/forgejo-openapi/src/models/commit.rs +++ b/forgejo-openapi/src/models/commit.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -51,4 +51,3 @@ impl Commit { } } } - diff --git a/forgejo-openapi/src/models/commit_affected_files.rs b/forgejo-openapi/src/models/commit_affected_files.rs index b52abd0..c1712ec 100644 --- a/forgejo-openapi/src/models/commit_affected_files.rs +++ b/forgejo-openapi/src/models/commit_affected_files.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl CommitAffectedFiles { } } } - diff --git a/forgejo-openapi/src/models/commit_date_options.rs b/forgejo-openapi/src/models/commit_date_options.rs index 4525539..e7e398f 100644 --- a/forgejo-openapi/src/models/commit_date_options.rs +++ b/forgejo-openapi/src/models/commit_date_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl CommitDateOptions { } } } - diff --git a/forgejo-openapi/src/models/commit_meta.rs b/forgejo-openapi/src/models/commit_meta.rs index df9381c..4516c94 100644 --- a/forgejo-openapi/src/models/commit_meta.rs +++ b/forgejo-openapi/src/models/commit_meta.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl CommitMeta { } } } - diff --git a/forgejo-openapi/src/models/commit_stats.rs b/forgejo-openapi/src/models/commit_stats.rs index 5eae8e9..89891f6 100644 --- a/forgejo-openapi/src/models/commit_stats.rs +++ b/forgejo-openapi/src/models/commit_stats.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl CommitStats { } } } - diff --git a/forgejo-openapi/src/models/commit_status.rs b/forgejo-openapi/src/models/commit_status.rs index fcaadac..8423fb3 100644 --- a/forgejo-openapi/src/models/commit_status.rs +++ b/forgejo-openapi/src/models/commit_status.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -51,4 +51,3 @@ impl CommitStatus { } } } - diff --git a/forgejo-openapi/src/models/commit_user.rs b/forgejo-openapi/src/models/commit_user.rs index 50a76d8..28f5909 100644 --- a/forgejo-openapi/src/models/commit_user.rs +++ b/forgejo-openapi/src/models/commit_user.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl CommitUser { } } } - diff --git a/forgejo-openapi/src/models/compare.rs b/forgejo-openapi/src/models/compare.rs index ed48273..17fd66a 100644 --- a/forgejo-openapi/src/models/compare.rs +++ b/forgejo-openapi/src/models/compare.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl Compare { } } } - diff --git a/forgejo-openapi/src/models/contents_response.rs b/forgejo-openapi/src/models/contents_response.rs index 9c683bb..f2b7f31 100644 --- a/forgejo-openapi/src/models/contents_response.rs +++ b/forgejo-openapi/src/models/contents_response.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -76,4 +76,3 @@ impl ContentsResponse { } } } - diff --git a/forgejo-openapi/src/models/create_access_token_option.rs b/forgejo-openapi/src/models/create_access_token_option.rs index a2d273e..0fc671a 100644 --- a/forgejo-openapi/src/models/create_access_token_option.rs +++ b/forgejo-openapi/src/models/create_access_token_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -23,10 +23,6 @@ pub struct CreateAccessTokenOption { impl CreateAccessTokenOption { /// CreateAccessTokenOption options when create access token pub fn new(name: String) -> CreateAccessTokenOption { - CreateAccessTokenOption { - name, - scopes: None, - } + CreateAccessTokenOption { name, scopes: None } } } - diff --git a/forgejo-openapi/src/models/create_branch_protection_option.rs b/forgejo-openapi/src/models/create_branch_protection_option.rs index a04658f..5d316d8 100644 --- a/forgejo-openapi/src/models/create_branch_protection_option.rs +++ b/forgejo-openapi/src/models/create_branch_protection_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -16,54 +16,114 @@ use serde::{Deserialize, Serialize}; pub struct CreateBranchProtectionOption { #[serde(rename = "apply_to_admins", skip_serializing_if = "Option::is_none")] pub apply_to_admins: Option, - #[serde(rename = "approvals_whitelist_teams", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "approvals_whitelist_teams", + skip_serializing_if = "Option::is_none" + )] pub approvals_whitelist_teams: Option>, - #[serde(rename = "approvals_whitelist_username", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "approvals_whitelist_username", + skip_serializing_if = "Option::is_none" + )] pub approvals_whitelist_username: Option>, - #[serde(rename = "block_on_official_review_requests", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "block_on_official_review_requests", + skip_serializing_if = "Option::is_none" + )] pub block_on_official_review_requests: Option, - #[serde(rename = "block_on_outdated_branch", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "block_on_outdated_branch", + skip_serializing_if = "Option::is_none" + )] pub block_on_outdated_branch: Option, - #[serde(rename = "block_on_rejected_reviews", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "block_on_rejected_reviews", + skip_serializing_if = "Option::is_none" + )] pub block_on_rejected_reviews: Option, /// Deprecated: true #[serde(rename = "branch_name", skip_serializing_if = "Option::is_none")] pub branch_name: Option, - #[serde(rename = "dismiss_stale_approvals", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "dismiss_stale_approvals", + skip_serializing_if = "Option::is_none" + )] pub dismiss_stale_approvals: Option, - #[serde(rename = "enable_approvals_whitelist", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_approvals_whitelist", + skip_serializing_if = "Option::is_none" + )] pub enable_approvals_whitelist: Option, - #[serde(rename = "enable_merge_whitelist", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_merge_whitelist", + skip_serializing_if = "Option::is_none" + )] pub enable_merge_whitelist: Option, #[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")] pub enable_push: Option, - #[serde(rename = "enable_push_whitelist", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_push_whitelist", + skip_serializing_if = "Option::is_none" + )] pub enable_push_whitelist: Option, - #[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_status_check", + skip_serializing_if = "Option::is_none" + )] pub enable_status_check: Option, - #[serde(rename = "ignore_stale_approvals", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "ignore_stale_approvals", + skip_serializing_if = "Option::is_none" + )] pub ignore_stale_approvals: Option, - #[serde(rename = "merge_whitelist_teams", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "merge_whitelist_teams", + skip_serializing_if = "Option::is_none" + )] pub merge_whitelist_teams: Option>, - #[serde(rename = "merge_whitelist_usernames", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "merge_whitelist_usernames", + skip_serializing_if = "Option::is_none" + )] pub merge_whitelist_usernames: Option>, - #[serde(rename = "protected_file_patterns", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "protected_file_patterns", + skip_serializing_if = "Option::is_none" + )] pub protected_file_patterns: Option, - #[serde(rename = "push_whitelist_deploy_keys", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "push_whitelist_deploy_keys", + skip_serializing_if = "Option::is_none" + )] pub push_whitelist_deploy_keys: Option, - #[serde(rename = "push_whitelist_teams", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "push_whitelist_teams", + skip_serializing_if = "Option::is_none" + )] pub push_whitelist_teams: Option>, - #[serde(rename = "push_whitelist_usernames", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "push_whitelist_usernames", + skip_serializing_if = "Option::is_none" + )] pub push_whitelist_usernames: Option>, - #[serde(rename = "require_signed_commits", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "require_signed_commits", + skip_serializing_if = "Option::is_none" + )] pub require_signed_commits: Option, #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] pub required_approvals: Option, #[serde(rename = "rule_name", skip_serializing_if = "Option::is_none")] pub rule_name: Option, - #[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "status_check_contexts", + skip_serializing_if = "Option::is_none" + )] pub status_check_contexts: Option>, - #[serde(rename = "unprotected_file_patterns", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "unprotected_file_patterns", + skip_serializing_if = "Option::is_none" + )] pub unprotected_file_patterns: Option, } @@ -99,4 +159,3 @@ impl CreateBranchProtectionOption { } } } - diff --git a/forgejo-openapi/src/models/create_branch_repo_option.rs b/forgejo-openapi/src/models/create_branch_repo_option.rs index 3db48aa..319d082 100644 --- a/forgejo-openapi/src/models/create_branch_repo_option.rs +++ b/forgejo-openapi/src/models/create_branch_repo_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl CreateBranchRepoOption { } } } - diff --git a/forgejo-openapi/src/models/create_email_option.rs b/forgejo-openapi/src/models/create_email_option.rs index 6ad8ab8..c655094 100644 --- a/forgejo-openapi/src/models/create_email_option.rs +++ b/forgejo-openapi/src/models/create_email_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct CreateEmailOption { impl CreateEmailOption { /// CreateEmailOption options when creating email addresses pub fn new() -> CreateEmailOption { - CreateEmailOption { - emails: None, - } + CreateEmailOption { emails: None } } } - diff --git a/forgejo-openapi/src/models/create_file_options.rs b/forgejo-openapi/src/models/create_file_options.rs index 72fab4a..31ff8ed 100644 --- a/forgejo-openapi/src/models/create_file_options.rs +++ b/forgejo-openapi/src/models/create_file_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -52,4 +52,3 @@ impl CreateFileOptions { } } } - diff --git a/forgejo-openapi/src/models/create_fork_option.rs b/forgejo-openapi/src/models/create_fork_option.rs index 5a4b814..577e449 100644 --- a/forgejo-openapi/src/models/create_fork_option.rs +++ b/forgejo-openapi/src/models/create_fork_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -31,4 +31,3 @@ impl CreateForkOption { } } } - diff --git a/forgejo-openapi/src/models/create_gpg_key_option.rs b/forgejo-openapi/src/models/create_gpg_key_option.rs index ac27acc..3ac1216 100644 --- a/forgejo-openapi/src/models/create_gpg_key_option.rs +++ b/forgejo-openapi/src/models/create_gpg_key_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl CreateGpgKeyOption { } } } - diff --git a/forgejo-openapi/src/models/create_hook_option.rs b/forgejo-openapi/src/models/create_hook_option.rs index f03d92e..69a1807 100644 --- a/forgejo-openapi/src/models/create_hook_option.rs +++ b/forgejo-openapi/src/models/create_hook_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -16,7 +16,10 @@ use serde::{Deserialize, Serialize}; pub struct CreateHookOption { #[serde(rename = "active", skip_serializing_if = "Option::is_none")] pub active: Option, - #[serde(rename = "authorization_header", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "authorization_header", + skip_serializing_if = "Option::is_none" + )] pub authorization_header: Option, #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] pub branch_filter: Option, @@ -31,7 +34,10 @@ pub struct CreateHookOption { impl CreateHookOption { /// CreateHookOption options when create a hook - pub fn new(config: std::collections::HashMap, r#type: Type) -> CreateHookOption { + pub fn new( + config: std::collections::HashMap, + r#type: Type, + ) -> CreateHookOption { CreateHookOption { active: None, authorization_header: None, @@ -42,7 +48,7 @@ impl CreateHookOption { } } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Type { #[serde(rename = "forgejo")] @@ -74,4 +80,3 @@ impl Default for Type { Self::Forgejo } } - diff --git a/forgejo-openapi/src/models/create_issue_comment_option.rs b/forgejo-openapi/src/models/create_issue_comment_option.rs index 8921fea..159720a 100644 --- a/forgejo-openapi/src/models/create_issue_comment_option.rs +++ b/forgejo-openapi/src/models/create_issue_comment_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl CreateIssueCommentOption { } } } - diff --git a/forgejo-openapi/src/models/create_issue_option.rs b/forgejo-openapi/src/models/create_issue_option.rs index f9517d4..922569e 100644 --- a/forgejo-openapi/src/models/create_issue_option.rs +++ b/forgejo-openapi/src/models/create_issue_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -53,4 +53,3 @@ impl CreateIssueOption { } } } - diff --git a/forgejo-openapi/src/models/create_key_option.rs b/forgejo-openapi/src/models/create_key_option.rs index 2bcde50..4fd4c32 100644 --- a/forgejo-openapi/src/models/create_key_option.rs +++ b/forgejo-openapi/src/models/create_key_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl CreateKeyOption { } } } - diff --git a/forgejo-openapi/src/models/create_label_option.rs b/forgejo-openapi/src/models/create_label_option.rs index 5a787a8..5dadd98 100644 --- a/forgejo-openapi/src/models/create_label_option.rs +++ b/forgejo-openapi/src/models/create_label_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl CreateLabelOption { } } } - diff --git a/forgejo-openapi/src/models/create_milestone_option.rs b/forgejo-openapi/src/models/create_milestone_option.rs index 18a6552..261861b 100644 --- a/forgejo-openapi/src/models/create_milestone_option.rs +++ b/forgejo-openapi/src/models/create_milestone_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,7 +35,7 @@ impl CreateMilestoneOption { } } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum State { #[serde(rename = "open")] @@ -49,4 +49,3 @@ impl Default for State { Self::Open } } - diff --git a/forgejo-openapi/src/models/create_o_auth2_application_options.rs b/forgejo-openapi/src/models/create_o_auth2_application_options.rs index d2171cc..826dd1a 100644 --- a/forgejo-openapi/src/models/create_o_auth2_application_options.rs +++ b/forgejo-openapi/src/models/create_o_auth2_application_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,7 +14,10 @@ use serde::{Deserialize, Serialize}; /// CreateOAuth2ApplicationOptions : CreateOAuth2ApplicationOptions holds options to create an oauth2 application #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateOAuth2ApplicationOptions { - #[serde(rename = "confidential_client", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "confidential_client", + skip_serializing_if = "Option::is_none" + )] pub confidential_client: Option, #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, @@ -32,4 +35,3 @@ impl CreateOAuth2ApplicationOptions { } } } - diff --git a/forgejo-openapi/src/models/create_or_update_secret_option.rs b/forgejo-openapi/src/models/create_or_update_secret_option.rs index dc45871..cb7ac74 100644 --- a/forgejo-openapi/src/models/create_or_update_secret_option.rs +++ b/forgejo-openapi/src/models/create_or_update_secret_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct CreateOrUpdateSecretOption { impl CreateOrUpdateSecretOption { /// CreateOrUpdateSecretOption options when creating or updating secret pub fn new(data: String) -> CreateOrUpdateSecretOption { - CreateOrUpdateSecretOption { - data, - } + CreateOrUpdateSecretOption { data } } } - diff --git a/forgejo-openapi/src/models/create_org_option.rs b/forgejo-openapi/src/models/create_org_option.rs index 2371bbd..a39bd6a 100644 --- a/forgejo-openapi/src/models/create_org_option.rs +++ b/forgejo-openapi/src/models/create_org_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,7 +22,10 @@ pub struct CreateOrgOption { pub full_name: Option, #[serde(rename = "location", skip_serializing_if = "Option::is_none")] pub location: Option, - #[serde(rename = "repo_admin_change_team_access", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "repo_admin_change_team_access", + skip_serializing_if = "Option::is_none" + )] pub repo_admin_change_team_access: Option, #[serde(rename = "username")] pub username: String, @@ -64,4 +67,3 @@ impl Default for Visibility { Self::Public } } - diff --git a/forgejo-openapi/src/models/create_pull_request_option.rs b/forgejo-openapi/src/models/create_pull_request_option.rs index 67c6534..0f2a670 100644 --- a/forgejo-openapi/src/models/create_pull_request_option.rs +++ b/forgejo-openapi/src/models/create_pull_request_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -50,4 +50,3 @@ impl CreatePullRequestOption { } } } - diff --git a/forgejo-openapi/src/models/create_pull_review_comment.rs b/forgejo-openapi/src/models/create_pull_review_comment.rs index 51abafb..2c94189 100644 --- a/forgejo-openapi/src/models/create_pull_review_comment.rs +++ b/forgejo-openapi/src/models/create_pull_review_comment.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl CreatePullReviewComment { } } } - diff --git a/forgejo-openapi/src/models/create_pull_review_options.rs b/forgejo-openapi/src/models/create_pull_review_options.rs index 7bb3ea0..a0226b5 100644 --- a/forgejo-openapi/src/models/create_pull_review_options.rs +++ b/forgejo-openapi/src/models/create_pull_review_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -36,4 +36,3 @@ impl CreatePullReviewOptions { } } } - diff --git a/forgejo-openapi/src/models/create_push_mirror_option.rs b/forgejo-openapi/src/models/create_push_mirror_option.rs index 9ec2736..38c343f 100644 --- a/forgejo-openapi/src/models/create_push_mirror_option.rs +++ b/forgejo-openapi/src/models/create_push_mirror_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -42,4 +42,3 @@ impl CreatePushMirrorOption { } } } - diff --git a/forgejo-openapi/src/models/create_quota_group_options.rs b/forgejo-openapi/src/models/create_quota_group_options.rs index ed17ec2..08cc2ca 100644 --- a/forgejo-openapi/src/models/create_quota_group_options.rs +++ b/forgejo-openapi/src/models/create_quota_group_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -31,4 +31,3 @@ impl CreateQuotaGroupOptions { } } } - diff --git a/forgejo-openapi/src/models/create_quota_rule_options.rs b/forgejo-openapi/src/models/create_quota_rule_options.rs index 9f664d2..f47bc67 100644 --- a/forgejo-openapi/src/models/create_quota_rule_options.rs +++ b/forgejo-openapi/src/models/create_quota_rule_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl CreateQuotaRuleOptions { } } } - diff --git a/forgejo-openapi/src/models/create_release_option.rs b/forgejo-openapi/src/models/create_release_option.rs index e69ef70..f3a4fac 100644 --- a/forgejo-openapi/src/models/create_release_option.rs +++ b/forgejo-openapi/src/models/create_release_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -44,4 +44,3 @@ impl CreateReleaseOption { } } } - diff --git a/forgejo-openapi/src/models/create_repo_option.rs b/forgejo-openapi/src/models/create_repo_option.rs index 1a843a1..6017a41 100644 --- a/forgejo-openapi/src/models/create_repo_option.rs +++ b/forgejo-openapi/src/models/create_repo_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -103,4 +103,3 @@ impl Default for TrustModel { Self::Default } } - diff --git a/forgejo-openapi/src/models/create_status_option.rs b/forgejo-openapi/src/models/create_status_option.rs index a5854f9..dd087d6 100644 --- a/forgejo-openapi/src/models/create_status_option.rs +++ b/forgejo-openapi/src/models/create_status_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -36,4 +36,3 @@ impl CreateStatusOption { } } } - diff --git a/forgejo-openapi/src/models/create_tag_option.rs b/forgejo-openapi/src/models/create_tag_option.rs index af0a4a3..86b0c97 100644 --- a/forgejo-openapi/src/models/create_tag_option.rs +++ b/forgejo-openapi/src/models/create_tag_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl CreateTagOption { } } } - diff --git a/forgejo-openapi/src/models/create_tag_protection_option.rs b/forgejo-openapi/src/models/create_tag_protection_option.rs index b3c19c0..b093768 100644 --- a/forgejo-openapi/src/models/create_tag_protection_option.rs +++ b/forgejo-openapi/src/models/create_tag_protection_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -18,7 +18,10 @@ pub struct CreateTagProtectionOption { pub name_pattern: Option, #[serde(rename = "whitelist_teams", skip_serializing_if = "Option::is_none")] pub whitelist_teams: Option>, - #[serde(rename = "whitelist_usernames", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "whitelist_usernames", + skip_serializing_if = "Option::is_none" + )] pub whitelist_usernames: Option>, } @@ -32,4 +35,3 @@ impl CreateTagProtectionOption { } } } - diff --git a/forgejo-openapi/src/models/create_team_option.rs b/forgejo-openapi/src/models/create_team_option.rs index 13ae528..da8012c 100644 --- a/forgejo-openapi/src/models/create_team_option.rs +++ b/forgejo-openapi/src/models/create_team_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,11 +14,17 @@ use serde::{Deserialize, Serialize}; /// CreateTeamOption : CreateTeamOption options for creating a team #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateTeamOption { - #[serde(rename = "can_create_org_repo", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "can_create_org_repo", + skip_serializing_if = "Option::is_none" + )] pub can_create_org_repo: Option, #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, - #[serde(rename = "includes_all_repositories", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "includes_all_repositories", + skip_serializing_if = "Option::is_none" + )] pub includes_all_repositories: Option, #[serde(rename = "name")] pub name: String, @@ -44,7 +50,7 @@ impl CreateTeamOption { } } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Permission { #[serde(rename = "read")] @@ -60,4 +66,3 @@ impl Default for Permission { Self::Read } } - diff --git a/forgejo-openapi/src/models/create_user_option.rs b/forgejo-openapi/src/models/create_user_option.rs index d264771..7972850 100644 --- a/forgejo-openapi/src/models/create_user_option.rs +++ b/forgejo-openapi/src/models/create_user_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -23,7 +23,10 @@ pub struct CreateUserOption { pub full_name: Option, #[serde(rename = "login_name", skip_serializing_if = "Option::is_none")] pub login_name: Option, - #[serde(rename = "must_change_password", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "must_change_password", + skip_serializing_if = "Option::is_none" + )] pub must_change_password: Option, #[serde(rename = "password", skip_serializing_if = "Option::is_none")] pub password: Option, @@ -57,4 +60,3 @@ impl CreateUserOption { } } } - diff --git a/forgejo-openapi/src/models/create_variable_option.rs b/forgejo-openapi/src/models/create_variable_option.rs index 04f957c..e8a2f61 100644 --- a/forgejo-openapi/src/models/create_variable_option.rs +++ b/forgejo-openapi/src/models/create_variable_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct CreateVariableOption { impl CreateVariableOption { /// CreateVariableOption the option when creating variable pub fn new(value: String) -> CreateVariableOption { - CreateVariableOption { - value, - } + CreateVariableOption { value } } } - diff --git a/forgejo-openapi/src/models/create_wiki_page_options.rs b/forgejo-openapi/src/models/create_wiki_page_options.rs index 9d6722d..d1d3aca 100644 --- a/forgejo-openapi/src/models/create_wiki_page_options.rs +++ b/forgejo-openapi/src/models/create_wiki_page_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl CreateWikiPageOptions { } } } - diff --git a/forgejo-openapi/src/models/cron.rs b/forgejo-openapi/src/models/cron.rs index 3839027..60f2144 100644 --- a/forgejo-openapi/src/models/cron.rs +++ b/forgejo-openapi/src/models/cron.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl Cron { } } } - diff --git a/forgejo-openapi/src/models/delete_email_option.rs b/forgejo-openapi/src/models/delete_email_option.rs index 1f2e63f..0c95470 100644 --- a/forgejo-openapi/src/models/delete_email_option.rs +++ b/forgejo-openapi/src/models/delete_email_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct DeleteEmailOption { impl DeleteEmailOption { /// DeleteEmailOption options when deleting email addresses pub fn new() -> DeleteEmailOption { - DeleteEmailOption { - emails: None, - } + DeleteEmailOption { emails: None } } } - diff --git a/forgejo-openapi/src/models/delete_file_options.rs b/forgejo-openapi/src/models/delete_file_options.rs index 3d8cd2a..a20e461 100644 --- a/forgejo-openapi/src/models/delete_file_options.rs +++ b/forgejo-openapi/src/models/delete_file_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -52,4 +52,3 @@ impl DeleteFileOptions { } } } - diff --git a/forgejo-openapi/src/models/delete_labels_option.rs b/forgejo-openapi/src/models/delete_labels_option.rs index 990413d..e08c81a 100644 --- a/forgejo-openapi/src/models/delete_labels_option.rs +++ b/forgejo-openapi/src/models/delete_labels_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct DeleteLabelsOption { impl DeleteLabelsOption { /// DeleteLabelOption options for deleting a label pub fn new() -> DeleteLabelsOption { - DeleteLabelsOption { - updated_at: None, - } + DeleteLabelsOption { updated_at: None } } } - diff --git a/forgejo-openapi/src/models/deploy_key.rs b/forgejo-openapi/src/models/deploy_key.rs index ef4c3d2..159d6c9 100644 --- a/forgejo-openapi/src/models/deploy_key.rs +++ b/forgejo-openapi/src/models/deploy_key.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -50,4 +50,3 @@ impl DeployKey { } } } - diff --git a/forgejo-openapi/src/models/dismiss_pull_review_options.rs b/forgejo-openapi/src/models/dismiss_pull_review_options.rs index 4a83b25..30be2f9 100644 --- a/forgejo-openapi/src/models/dismiss_pull_review_options.rs +++ b/forgejo-openapi/src/models/dismiss_pull_review_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl DismissPullReviewOptions { } } } - diff --git a/forgejo-openapi/src/models/dispatch_workflow_option.rs b/forgejo-openapi/src/models/dispatch_workflow_option.rs index 6cffa14..474120b 100644 --- a/forgejo-openapi/src/models/dispatch_workflow_option.rs +++ b/forgejo-openapi/src/models/dispatch_workflow_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl DispatchWorkflowOption { } } } - diff --git a/forgejo-openapi/src/models/dispatch_workflow_run.rs b/forgejo-openapi/src/models/dispatch_workflow_run.rs index f22dc12..c591819 100644 --- a/forgejo-openapi/src/models/dispatch_workflow_run.rs +++ b/forgejo-openapi/src/models/dispatch_workflow_run.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl DispatchWorkflowRun { } } } - diff --git a/forgejo-openapi/src/models/edit_attachment_options.rs b/forgejo-openapi/src/models/edit_attachment_options.rs index 28c8da8..7d70787 100644 --- a/forgejo-openapi/src/models/edit_attachment_options.rs +++ b/forgejo-openapi/src/models/edit_attachment_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -15,7 +15,10 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EditAttachmentOptions { /// (Can only be set if existing attachment is of external type) - #[serde(rename = "browser_download_url", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "browser_download_url", + skip_serializing_if = "Option::is_none" + )] pub browser_download_url: Option, #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, @@ -30,4 +33,3 @@ impl EditAttachmentOptions { } } } - diff --git a/forgejo-openapi/src/models/edit_branch_protection_option.rs b/forgejo-openapi/src/models/edit_branch_protection_option.rs index 5fcdbce..46456cc 100644 --- a/forgejo-openapi/src/models/edit_branch_protection_option.rs +++ b/forgejo-openapi/src/models/edit_branch_protection_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -16,49 +16,109 @@ use serde::{Deserialize, Serialize}; pub struct EditBranchProtectionOption { #[serde(rename = "apply_to_admins", skip_serializing_if = "Option::is_none")] pub apply_to_admins: Option, - #[serde(rename = "approvals_whitelist_teams", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "approvals_whitelist_teams", + skip_serializing_if = "Option::is_none" + )] pub approvals_whitelist_teams: Option>, - #[serde(rename = "approvals_whitelist_username", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "approvals_whitelist_username", + skip_serializing_if = "Option::is_none" + )] pub approvals_whitelist_username: Option>, - #[serde(rename = "block_on_official_review_requests", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "block_on_official_review_requests", + skip_serializing_if = "Option::is_none" + )] pub block_on_official_review_requests: Option, - #[serde(rename = "block_on_outdated_branch", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "block_on_outdated_branch", + skip_serializing_if = "Option::is_none" + )] pub block_on_outdated_branch: Option, - #[serde(rename = "block_on_rejected_reviews", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "block_on_rejected_reviews", + skip_serializing_if = "Option::is_none" + )] pub block_on_rejected_reviews: Option, - #[serde(rename = "dismiss_stale_approvals", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "dismiss_stale_approvals", + skip_serializing_if = "Option::is_none" + )] pub dismiss_stale_approvals: Option, - #[serde(rename = "enable_approvals_whitelist", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_approvals_whitelist", + skip_serializing_if = "Option::is_none" + )] pub enable_approvals_whitelist: Option, - #[serde(rename = "enable_merge_whitelist", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_merge_whitelist", + skip_serializing_if = "Option::is_none" + )] pub enable_merge_whitelist: Option, #[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")] pub enable_push: Option, - #[serde(rename = "enable_push_whitelist", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_push_whitelist", + skip_serializing_if = "Option::is_none" + )] pub enable_push_whitelist: Option, - #[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_status_check", + skip_serializing_if = "Option::is_none" + )] pub enable_status_check: Option, - #[serde(rename = "ignore_stale_approvals", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "ignore_stale_approvals", + skip_serializing_if = "Option::is_none" + )] pub ignore_stale_approvals: Option, - #[serde(rename = "merge_whitelist_teams", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "merge_whitelist_teams", + skip_serializing_if = "Option::is_none" + )] pub merge_whitelist_teams: Option>, - #[serde(rename = "merge_whitelist_usernames", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "merge_whitelist_usernames", + skip_serializing_if = "Option::is_none" + )] pub merge_whitelist_usernames: Option>, - #[serde(rename = "protected_file_patterns", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "protected_file_patterns", + skip_serializing_if = "Option::is_none" + )] pub protected_file_patterns: Option, - #[serde(rename = "push_whitelist_deploy_keys", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "push_whitelist_deploy_keys", + skip_serializing_if = "Option::is_none" + )] pub push_whitelist_deploy_keys: Option, - #[serde(rename = "push_whitelist_teams", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "push_whitelist_teams", + skip_serializing_if = "Option::is_none" + )] pub push_whitelist_teams: Option>, - #[serde(rename = "push_whitelist_usernames", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "push_whitelist_usernames", + skip_serializing_if = "Option::is_none" + )] pub push_whitelist_usernames: Option>, - #[serde(rename = "require_signed_commits", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "require_signed_commits", + skip_serializing_if = "Option::is_none" + )] pub require_signed_commits: Option, #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] pub required_approvals: Option, - #[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "status_check_contexts", + skip_serializing_if = "Option::is_none" + )] pub status_check_contexts: Option>, - #[serde(rename = "unprotected_file_patterns", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "unprotected_file_patterns", + skip_serializing_if = "Option::is_none" + )] pub unprotected_file_patterns: Option, } @@ -92,4 +152,3 @@ impl EditBranchProtectionOption { } } } - diff --git a/forgejo-openapi/src/models/edit_deadline_option.rs b/forgejo-openapi/src/models/edit_deadline_option.rs index 456e8dc..c8792b5 100644 --- a/forgejo-openapi/src/models/edit_deadline_option.rs +++ b/forgejo-openapi/src/models/edit_deadline_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct EditDeadlineOption { impl EditDeadlineOption { /// EditDeadlineOption options for creating a deadline pub fn new(due_date: String) -> EditDeadlineOption { - EditDeadlineOption { - due_date, - } + EditDeadlineOption { due_date } } } - diff --git a/forgejo-openapi/src/models/edit_git_hook_option.rs b/forgejo-openapi/src/models/edit_git_hook_option.rs index efbe27e..1e414b6 100644 --- a/forgejo-openapi/src/models/edit_git_hook_option.rs +++ b/forgejo-openapi/src/models/edit_git_hook_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct EditGitHookOption { impl EditGitHookOption { /// EditGitHookOption options when modifying one Git hook pub fn new() -> EditGitHookOption { - EditGitHookOption { - content: None, - } + EditGitHookOption { content: None } } } - diff --git a/forgejo-openapi/src/models/edit_hook_option.rs b/forgejo-openapi/src/models/edit_hook_option.rs index 833bf4f..1f513d3 100644 --- a/forgejo-openapi/src/models/edit_hook_option.rs +++ b/forgejo-openapi/src/models/edit_hook_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -16,7 +16,10 @@ use serde::{Deserialize, Serialize}; pub struct EditHookOption { #[serde(rename = "active", skip_serializing_if = "Option::is_none")] pub active: Option, - #[serde(rename = "authorization_header", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "authorization_header", + skip_serializing_if = "Option::is_none" + )] pub authorization_header: Option, #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] pub branch_filter: Option, @@ -38,4 +41,3 @@ impl EditHookOption { } } } - diff --git a/forgejo-openapi/src/models/edit_issue_comment_option.rs b/forgejo-openapi/src/models/edit_issue_comment_option.rs index abf1758..2124e7f 100644 --- a/forgejo-openapi/src/models/edit_issue_comment_option.rs +++ b/forgejo-openapi/src/models/edit_issue_comment_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl EditIssueCommentOption { } } } - diff --git a/forgejo-openapi/src/models/edit_issue_option.rs b/forgejo-openapi/src/models/edit_issue_option.rs index 6413942..7f339cb 100644 --- a/forgejo-openapi/src/models/edit_issue_option.rs +++ b/forgejo-openapi/src/models/edit_issue_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -54,4 +54,3 @@ impl EditIssueOption { } } } - diff --git a/forgejo-openapi/src/models/edit_label_option.rs b/forgejo-openapi/src/models/edit_label_option.rs index 57a507c..6303749 100644 --- a/forgejo-openapi/src/models/edit_label_option.rs +++ b/forgejo-openapi/src/models/edit_label_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl EditLabelOption { } } } - diff --git a/forgejo-openapi/src/models/edit_milestone_option.rs b/forgejo-openapi/src/models/edit_milestone_option.rs index 0086424..be7c99f 100644 --- a/forgejo-openapi/src/models/edit_milestone_option.rs +++ b/forgejo-openapi/src/models/edit_milestone_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl EditMilestoneOption { } } } - diff --git a/forgejo-openapi/src/models/edit_org_option.rs b/forgejo-openapi/src/models/edit_org_option.rs index 0339cf0..d6cb082 100644 --- a/forgejo-openapi/src/models/edit_org_option.rs +++ b/forgejo-openapi/src/models/edit_org_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,7 +22,10 @@ pub struct EditOrgOption { pub full_name: Option, #[serde(rename = "location", skip_serializing_if = "Option::is_none")] pub location: Option, - #[serde(rename = "repo_admin_change_team_access", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "repo_admin_change_team_access", + skip_serializing_if = "Option::is_none" + )] pub repo_admin_change_team_access: Option, /// possible values are `public`, `limited` or `private` #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] @@ -61,4 +64,3 @@ impl Default for Visibility { Self::Public } } - diff --git a/forgejo-openapi/src/models/edit_pull_request_option.rs b/forgejo-openapi/src/models/edit_pull_request_option.rs index 97e794f..cc09f76 100644 --- a/forgejo-openapi/src/models/edit_pull_request_option.rs +++ b/forgejo-openapi/src/models/edit_pull_request_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,7 +14,10 @@ use serde::{Deserialize, Serialize}; /// EditPullRequestOption : EditPullRequestOption options when modify pull request #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EditPullRequestOption { - #[serde(rename = "allow_maintainer_edit", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_maintainer_edit", + skip_serializing_if = "Option::is_none" + )] pub allow_maintainer_edit: Option, #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] pub assignee: Option, @@ -56,4 +59,3 @@ impl EditPullRequestOption { } } } - diff --git a/forgejo-openapi/src/models/edit_quota_rule_options.rs b/forgejo-openapi/src/models/edit_quota_rule_options.rs index aa9138d..5821961 100644 --- a/forgejo-openapi/src/models/edit_quota_rule_options.rs +++ b/forgejo-openapi/src/models/edit_quota_rule_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -31,4 +31,3 @@ impl EditQuotaRuleOptions { } } } - diff --git a/forgejo-openapi/src/models/edit_reaction_option.rs b/forgejo-openapi/src/models/edit_reaction_option.rs index cf74424..95397a4 100644 --- a/forgejo-openapi/src/models/edit_reaction_option.rs +++ b/forgejo-openapi/src/models/edit_reaction_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct EditReactionOption { impl EditReactionOption { /// EditReactionOption contain the reaction type pub fn new() -> EditReactionOption { - EditReactionOption { - content: None, - } + EditReactionOption { content: None } } } - diff --git a/forgejo-openapi/src/models/edit_release_option.rs b/forgejo-openapi/src/models/edit_release_option.rs index 1667019..df0bdfc 100644 --- a/forgejo-openapi/src/models/edit_release_option.rs +++ b/forgejo-openapi/src/models/edit_release_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -44,4 +44,3 @@ impl EditReleaseOption { } } } - diff --git a/forgejo-openapi/src/models/edit_repo_option.rs b/forgejo-openapi/src/models/edit_repo_option.rs index 1f7726b..5e27c3e 100644 --- a/forgejo-openapi/src/models/edit_repo_option.rs +++ b/forgejo-openapi/src/models/edit_repo_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -15,22 +15,34 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EditRepoOption { /// either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging. - #[serde(rename = "allow_fast_forward_only_merge", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_fast_forward_only_merge", + skip_serializing_if = "Option::is_none" + )] pub allow_fast_forward_only_merge: Option, /// either `true` to allow mark pr as merged manually, or `false` to prevent it. #[serde(rename = "allow_manual_merge", skip_serializing_if = "Option::is_none")] pub allow_manual_merge: Option, /// either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. - #[serde(rename = "allow_merge_commits", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_merge_commits", + skip_serializing_if = "Option::is_none" + )] pub allow_merge_commits: Option, /// either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. #[serde(rename = "allow_rebase", skip_serializing_if = "Option::is_none")] pub allow_rebase: Option, /// either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. - #[serde(rename = "allow_rebase_explicit", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_rebase_explicit", + skip_serializing_if = "Option::is_none" + )] pub allow_rebase_explicit: Option, /// either `true` to allow updating pull request branch by rebase, or `false` to prevent it. - #[serde(rename = "allow_rebase_update", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_rebase_update", + skip_serializing_if = "Option::is_none" + )] pub allow_rebase_update: Option, /// either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. #[serde(rename = "allow_squash_merge", skip_serializing_if = "Option::is_none")] @@ -39,22 +51,37 @@ pub struct EditRepoOption { #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] pub archived: Option, /// either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. - #[serde(rename = "autodetect_manual_merge", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "autodetect_manual_merge", + skip_serializing_if = "Option::is_none" + )] pub autodetect_manual_merge: Option, /// set to `true` to allow edits from maintainers by default - #[serde(rename = "default_allow_maintainer_edit", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "default_allow_maintainer_edit", + skip_serializing_if = "Option::is_none" + )] pub default_allow_maintainer_edit: Option, /// sets the default branch for this repository. #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] pub default_branch: Option, /// set to `true` to delete pr branch after merge by default - #[serde(rename = "default_delete_branch_after_merge", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "default_delete_branch_after_merge", + skip_serializing_if = "Option::is_none" + )] pub default_delete_branch_after_merge: Option, /// set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", \"fast-forward-only\", \"manually-merged\", or \"rebase-update-only\". - #[serde(rename = "default_merge_style", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "default_merge_style", + skip_serializing_if = "Option::is_none" + )] pub default_merge_style: Option, /// set to a update style to be used by this repository: \"rebase\" or \"merge\" - #[serde(rename = "default_update_style", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "default_update_style", + skip_serializing_if = "Option::is_none" + )] pub default_update_style: Option, /// a short description of the repository. #[serde(rename = "description", skip_serializing_if = "Option::is_none")] @@ -67,7 +94,10 @@ pub struct EditRepoOption { #[serde(rename = "external_wiki", skip_serializing_if = "Option::is_none")] pub external_wiki: Option>, /// set the globally editable state of the wiki - #[serde(rename = "globally_editable_wiki", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "globally_editable_wiki", + skip_serializing_if = "Option::is_none" + )] pub globally_editable_wiki: Option, /// either `true` to enable actions unit, or `false` to disable them. #[serde(rename = "has_actions", skip_serializing_if = "Option::is_none")] @@ -91,7 +121,10 @@ pub struct EditRepoOption { #[serde(rename = "has_wiki", skip_serializing_if = "Option::is_none")] pub has_wiki: Option, /// either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. - #[serde(rename = "ignore_whitespace_conflicts", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "ignore_whitespace_conflicts", + skip_serializing_if = "Option::is_none" + )] pub ignore_whitespace_conflicts: Option, #[serde(rename = "internal_tracker", skip_serializing_if = "Option::is_none")] pub internal_tracker: Option>, @@ -156,4 +189,3 @@ impl EditRepoOption { } } } - diff --git a/forgejo-openapi/src/models/edit_tag_protection_option.rs b/forgejo-openapi/src/models/edit_tag_protection_option.rs index e67ab21..65d7514 100644 --- a/forgejo-openapi/src/models/edit_tag_protection_option.rs +++ b/forgejo-openapi/src/models/edit_tag_protection_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -18,7 +18,10 @@ pub struct EditTagProtectionOption { pub name_pattern: Option, #[serde(rename = "whitelist_teams", skip_serializing_if = "Option::is_none")] pub whitelist_teams: Option>, - #[serde(rename = "whitelist_usernames", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "whitelist_usernames", + skip_serializing_if = "Option::is_none" + )] pub whitelist_usernames: Option>, } @@ -32,4 +35,3 @@ impl EditTagProtectionOption { } } } - diff --git a/forgejo-openapi/src/models/edit_team_option.rs b/forgejo-openapi/src/models/edit_team_option.rs index c2c5bff..5837fd0 100644 --- a/forgejo-openapi/src/models/edit_team_option.rs +++ b/forgejo-openapi/src/models/edit_team_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,11 +14,17 @@ use serde::{Deserialize, Serialize}; /// EditTeamOption : EditTeamOption options for editing a team #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EditTeamOption { - #[serde(rename = "can_create_org_repo", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "can_create_org_repo", + skip_serializing_if = "Option::is_none" + )] pub can_create_org_repo: Option, #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, - #[serde(rename = "includes_all_repositories", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "includes_all_repositories", + skip_serializing_if = "Option::is_none" + )] pub includes_all_repositories: Option, #[serde(rename = "name")] pub name: String, @@ -44,7 +50,7 @@ impl EditTeamOption { } } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Permission { #[serde(rename = "read")] @@ -60,4 +66,3 @@ impl Default for Permission { Self::Read } } - diff --git a/forgejo-openapi/src/models/edit_user_option.rs b/forgejo-openapi/src/models/edit_user_option.rs index 5bb2e6b..ec188ec 100644 --- a/forgejo-openapi/src/models/edit_user_option.rs +++ b/forgejo-openapi/src/models/edit_user_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -18,7 +18,10 @@ pub struct EditUserOption { pub active: Option, #[serde(rename = "admin", skip_serializing_if = "Option::is_none")] pub admin: Option, - #[serde(rename = "allow_create_organization", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_create_organization", + skip_serializing_if = "Option::is_none" + )] pub allow_create_organization: Option, #[serde(rename = "allow_git_hook", skip_serializing_if = "Option::is_none")] pub allow_git_hook: Option, @@ -38,7 +41,10 @@ pub struct EditUserOption { pub login_name: Option, #[serde(rename = "max_repo_creation", skip_serializing_if = "Option::is_none")] pub max_repo_creation: Option, - #[serde(rename = "must_change_password", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "must_change_password", + skip_serializing_if = "Option::is_none" + )] pub must_change_password: Option, #[serde(rename = "password", skip_serializing_if = "Option::is_none")] pub password: Option, @@ -83,4 +89,3 @@ impl EditUserOption { } } } - diff --git a/forgejo-openapi/src/models/email.rs b/forgejo-openapi/src/models/email.rs index 400a38d..bd05e34 100644 --- a/forgejo-openapi/src/models/email.rs +++ b/forgejo-openapi/src/models/email.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl Email { } } } - diff --git a/forgejo-openapi/src/models/external_tracker.rs b/forgejo-openapi/src/models/external_tracker.rs index 4a2f949..54f1b3b 100644 --- a/forgejo-openapi/src/models/external_tracker.rs +++ b/forgejo-openapi/src/models/external_tracker.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -15,16 +15,28 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExternalTracker { /// External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. - #[serde(rename = "external_tracker_format", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "external_tracker_format", + skip_serializing_if = "Option::is_none" + )] pub external_tracker_format: Option, /// External Issue Tracker issue regular expression - #[serde(rename = "external_tracker_regexp_pattern", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "external_tracker_regexp_pattern", + skip_serializing_if = "Option::is_none" + )] pub external_tracker_regexp_pattern: Option, /// External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` - #[serde(rename = "external_tracker_style", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "external_tracker_style", + skip_serializing_if = "Option::is_none" + )] pub external_tracker_style: Option, /// URL of external issue tracker. - #[serde(rename = "external_tracker_url", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "external_tracker_url", + skip_serializing_if = "Option::is_none" + )] pub external_tracker_url: Option, } @@ -39,4 +51,3 @@ impl ExternalTracker { } } } - diff --git a/forgejo-openapi/src/models/external_wiki.rs b/forgejo-openapi/src/models/external_wiki.rs index 7459065..9787e33 100644 --- a/forgejo-openapi/src/models/external_wiki.rs +++ b/forgejo-openapi/src/models/external_wiki.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -27,4 +27,3 @@ impl ExternalWiki { } } } - diff --git a/forgejo-openapi/src/models/file_commit_response.rs b/forgejo-openapi/src/models/file_commit_response.rs index 57b0bc9..2260b02 100644 --- a/forgejo-openapi/src/models/file_commit_response.rs +++ b/forgejo-openapi/src/models/file_commit_response.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -48,4 +48,3 @@ impl FileCommitResponse { } } } - diff --git a/forgejo-openapi/src/models/file_delete_response.rs b/forgejo-openapi/src/models/file_delete_response.rs index d5d134c..40d093d 100644 --- a/forgejo-openapi/src/models/file_delete_response.rs +++ b/forgejo-openapi/src/models/file_delete_response.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl FileDeleteResponse { } } } - diff --git a/forgejo-openapi/src/models/file_links_response.rs b/forgejo-openapi/src/models/file_links_response.rs index e3f8b13..421d0c9 100644 --- a/forgejo-openapi/src/models/file_links_response.rs +++ b/forgejo-openapi/src/models/file_links_response.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl FileLinksResponse { } } } - diff --git a/forgejo-openapi/src/models/file_response.rs b/forgejo-openapi/src/models/file_response.rs index 78990d2..e883d28 100644 --- a/forgejo-openapi/src/models/file_response.rs +++ b/forgejo-openapi/src/models/file_response.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl FileResponse { } } } - diff --git a/forgejo-openapi/src/models/files_response.rs b/forgejo-openapi/src/models/files_response.rs index fc19d37..0d656c8 100644 --- a/forgejo-openapi/src/models/files_response.rs +++ b/forgejo-openapi/src/models/files_response.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl FilesResponse { } } } - diff --git a/forgejo-openapi/src/models/general_api_settings.rs b/forgejo-openapi/src/models/general_api_settings.rs index 7b5d6c8..b5853e2 100644 --- a/forgejo-openapi/src/models/general_api_settings.rs +++ b/forgejo-openapi/src/models/general_api_settings.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,9 +14,15 @@ use serde::{Deserialize, Serialize}; /// GeneralApiSettings : GeneralAPISettings contains global api settings exposed by it #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GeneralApiSettings { - #[serde(rename = "default_git_trees_per_page", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "default_git_trees_per_page", + skip_serializing_if = "Option::is_none" + )] pub default_git_trees_per_page: Option, - #[serde(rename = "default_max_blob_size", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "default_max_blob_size", + skip_serializing_if = "Option::is_none" + )] pub default_max_blob_size: Option, #[serde(rename = "default_paging_num", skip_serializing_if = "Option::is_none")] pub default_paging_num: Option, @@ -35,4 +41,3 @@ impl GeneralApiSettings { } } } - diff --git a/forgejo-openapi/src/models/general_attachment_settings.rs b/forgejo-openapi/src/models/general_attachment_settings.rs index de9793e..535a680 100644 --- a/forgejo-openapi/src/models/general_attachment_settings.rs +++ b/forgejo-openapi/src/models/general_attachment_settings.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl GeneralAttachmentSettings { } } } - diff --git a/forgejo-openapi/src/models/general_repo_settings.rs b/forgejo-openapi/src/models/general_repo_settings.rs index 8193fc5..ab5b6e9 100644 --- a/forgejo-openapi/src/models/general_repo_settings.rs +++ b/forgejo-openapi/src/models/general_repo_settings.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -20,13 +20,19 @@ pub struct GeneralRepoSettings { pub http_git_disabled: Option, #[serde(rename = "lfs_disabled", skip_serializing_if = "Option::is_none")] pub lfs_disabled: Option, - #[serde(rename = "migrations_disabled", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "migrations_disabled", + skip_serializing_if = "Option::is_none" + )] pub migrations_disabled: Option, #[serde(rename = "mirrors_disabled", skip_serializing_if = "Option::is_none")] pub mirrors_disabled: Option, #[serde(rename = "stars_disabled", skip_serializing_if = "Option::is_none")] pub stars_disabled: Option, - #[serde(rename = "time_tracking_disabled", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "time_tracking_disabled", + skip_serializing_if = "Option::is_none" + )] pub time_tracking_disabled: Option, } @@ -44,4 +50,3 @@ impl GeneralRepoSettings { } } } - diff --git a/forgejo-openapi/src/models/general_ui_settings.rs b/forgejo-openapi/src/models/general_ui_settings.rs index ef91672..e57a9af 100644 --- a/forgejo-openapi/src/models/general_ui_settings.rs +++ b/forgejo-openapi/src/models/general_ui_settings.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl GeneralUiSettings { } } } - diff --git a/forgejo-openapi/src/models/generate_repo_option.rs b/forgejo-openapi/src/models/generate_repo_option.rs index 7f64366..ffdbbe2 100644 --- a/forgejo-openapi/src/models/generate_repo_option.rs +++ b/forgejo-openapi/src/models/generate_repo_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -71,4 +71,3 @@ impl GenerateRepoOption { } } } - diff --git a/forgejo-openapi/src/models/git_blob.rs b/forgejo-openapi/src/models/git_blob.rs index 710c4bc..9191682 100644 --- a/forgejo-openapi/src/models/git_blob.rs +++ b/forgejo-openapi/src/models/git_blob.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl GitBlob { } } } - diff --git a/forgejo-openapi/src/models/git_entry.rs b/forgejo-openapi/src/models/git_entry.rs index 53808d8..fd2519e 100644 --- a/forgejo-openapi/src/models/git_entry.rs +++ b/forgejo-openapi/src/models/git_entry.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -41,4 +41,3 @@ impl GitEntry { } } } - diff --git a/forgejo-openapi/src/models/git_hook.rs b/forgejo-openapi/src/models/git_hook.rs index ed6bdc9..0b3d4dd 100644 --- a/forgejo-openapi/src/models/git_hook.rs +++ b/forgejo-openapi/src/models/git_hook.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl GitHook { } } } - diff --git a/forgejo-openapi/src/models/git_object.rs b/forgejo-openapi/src/models/git_object.rs index 43c13bb..35c01b5 100644 --- a/forgejo-openapi/src/models/git_object.rs +++ b/forgejo-openapi/src/models/git_object.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl GitObject { } } } - diff --git a/forgejo-openapi/src/models/git_tree_response.rs b/forgejo-openapi/src/models/git_tree_response.rs index 260a7d1..b36685e 100644 --- a/forgejo-openapi/src/models/git_tree_response.rs +++ b/forgejo-openapi/src/models/git_tree_response.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -41,4 +41,3 @@ impl GitTreeResponse { } } } - diff --git a/forgejo-openapi/src/models/gitignore_template_info.rs b/forgejo-openapi/src/models/gitignore_template_info.rs index dec3956..c823d45 100644 --- a/forgejo-openapi/src/models/gitignore_template_info.rs +++ b/forgejo-openapi/src/models/gitignore_template_info.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl GitignoreTemplateInfo { } } } - diff --git a/forgejo-openapi/src/models/gpg_key.rs b/forgejo-openapi/src/models/gpg_key.rs index 44d4968..9909b0b 100644 --- a/forgejo-openapi/src/models/gpg_key.rs +++ b/forgejo-openapi/src/models/gpg_key.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -18,7 +18,10 @@ pub struct GpgKey { pub can_certify: Option, #[serde(rename = "can_encrypt_comms", skip_serializing_if = "Option::is_none")] pub can_encrypt_comms: Option, - #[serde(rename = "can_encrypt_storage", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "can_encrypt_storage", + skip_serializing_if = "Option::is_none" + )] pub can_encrypt_storage: Option, #[serde(rename = "can_sign", skip_serializing_if = "Option::is_none")] pub can_sign: Option, @@ -62,4 +65,3 @@ impl GpgKey { } } } - diff --git a/forgejo-openapi/src/models/gpg_key_email.rs b/forgejo-openapi/src/models/gpg_key_email.rs index 19d4c08..4f1ddf1 100644 --- a/forgejo-openapi/src/models/gpg_key_email.rs +++ b/forgejo-openapi/src/models/gpg_key_email.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl GpgKeyEmail { } } } - diff --git a/forgejo-openapi/src/models/hook.rs b/forgejo-openapi/src/models/hook.rs index 8280438..0484cb4 100644 --- a/forgejo-openapi/src/models/hook.rs +++ b/forgejo-openapi/src/models/hook.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -16,7 +16,10 @@ use serde::{Deserialize, Serialize}; pub struct Hook { #[serde(rename = "active", skip_serializing_if = "Option::is_none")] pub active: Option, - #[serde(rename = "authorization_header", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "authorization_header", + skip_serializing_if = "Option::is_none" + )] pub authorization_header: Option, #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] pub branch_filter: Option, @@ -60,4 +63,3 @@ impl Hook { } } } - diff --git a/forgejo-openapi/src/models/identity.rs b/forgejo-openapi/src/models/identity.rs index 2c7b1ec..8566c72 100644 --- a/forgejo-openapi/src/models/identity.rs +++ b/forgejo-openapi/src/models/identity.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl Identity { } } } - diff --git a/forgejo-openapi/src/models/internal_tracker.rs b/forgejo-openapi/src/models/internal_tracker.rs index c05a04d..f17c315 100644 --- a/forgejo-openapi/src/models/internal_tracker.rs +++ b/forgejo-openapi/src/models/internal_tracker.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -15,13 +15,22 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct InternalTracker { /// Let only contributors track time (Built-in issue tracker) - #[serde(rename = "allow_only_contributors_to_track_time", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_only_contributors_to_track_time", + skip_serializing_if = "Option::is_none" + )] pub allow_only_contributors_to_track_time: Option, /// Enable dependencies for issues and pull requests (Built-in issue tracker) - #[serde(rename = "enable_issue_dependencies", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_issue_dependencies", + skip_serializing_if = "Option::is_none" + )] pub enable_issue_dependencies: Option, /// Enable time tracking (Built-in issue tracker) - #[serde(rename = "enable_time_tracker", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_time_tracker", + skip_serializing_if = "Option::is_none" + )] pub enable_time_tracker: Option, } @@ -35,4 +44,3 @@ impl InternalTracker { } } } - diff --git a/forgejo-openapi/src/models/issue.rs b/forgejo-openapi/src/models/issue.rs index 69389b4..0984ccc 100644 --- a/forgejo-openapi/src/models/issue.rs +++ b/forgejo-openapi/src/models/issue.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -99,4 +99,3 @@ impl Issue { } } } - diff --git a/forgejo-openapi/src/models/issue_config.rs b/forgejo-openapi/src/models/issue_config.rs index 5191eae..467cbdf 100644 --- a/forgejo-openapi/src/models/issue_config.rs +++ b/forgejo-openapi/src/models/issue_config.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,7 +13,10 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IssueConfig { - #[serde(rename = "blank_issues_enabled", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "blank_issues_enabled", + skip_serializing_if = "Option::is_none" + )] pub blank_issues_enabled: Option, #[serde(rename = "contact_links", skip_serializing_if = "Option::is_none")] pub contact_links: Option>, @@ -27,4 +30,3 @@ impl IssueConfig { } } } - diff --git a/forgejo-openapi/src/models/issue_config_contact_link.rs b/forgejo-openapi/src/models/issue_config_contact_link.rs index e74f7e7..f591d50 100644 --- a/forgejo-openapi/src/models/issue_config_contact_link.rs +++ b/forgejo-openapi/src/models/issue_config_contact_link.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl IssueConfigContactLink { } } } - diff --git a/forgejo-openapi/src/models/issue_config_validation.rs b/forgejo-openapi/src/models/issue_config_validation.rs index e8618bf..04cf3bc 100644 --- a/forgejo-openapi/src/models/issue_config_validation.rs +++ b/forgejo-openapi/src/models/issue_config_validation.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -27,4 +27,3 @@ impl IssueConfigValidation { } } } - diff --git a/forgejo-openapi/src/models/issue_deadline.rs b/forgejo-openapi/src/models/issue_deadline.rs index 46eee0a..83e48f3 100644 --- a/forgejo-openapi/src/models/issue_deadline.rs +++ b/forgejo-openapi/src/models/issue_deadline.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct IssueDeadline { impl IssueDeadline { /// IssueDeadline represents an issue deadline pub fn new() -> IssueDeadline { - IssueDeadline { - due_date: None, - } + IssueDeadline { due_date: None } } } - diff --git a/forgejo-openapi/src/models/issue_form_field.rs b/forgejo-openapi/src/models/issue_form_field.rs index 4cdb652..0d8689f 100644 --- a/forgejo-openapi/src/models/issue_form_field.rs +++ b/forgejo-openapi/src/models/issue_form_field.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl IssueFormField { } } } - diff --git a/forgejo-openapi/src/models/issue_labels_option.rs b/forgejo-openapi/src/models/issue_labels_option.rs index e8dec5f..d5d9258 100644 --- a/forgejo-openapi/src/models/issue_labels_option.rs +++ b/forgejo-openapi/src/models/issue_labels_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl IssueLabelsOption { } } } - diff --git a/forgejo-openapi/src/models/issue_meta.rs b/forgejo-openapi/src/models/issue_meta.rs index 8d64b52..f555cc0 100644 --- a/forgejo-openapi/src/models/issue_meta.rs +++ b/forgejo-openapi/src/models/issue_meta.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl IssueMeta { } } } - diff --git a/forgejo-openapi/src/models/issue_template.rs b/forgejo-openapi/src/models/issue_template.rs index 3d5c6d3..47b568d 100644 --- a/forgejo-openapi/src/models/issue_template.rs +++ b/forgejo-openapi/src/models/issue_template.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -47,4 +47,3 @@ impl IssueTemplate { } } } - diff --git a/forgejo-openapi/src/models/label.rs b/forgejo-openapi/src/models/label.rs index dbd29db..e79e850 100644 --- a/forgejo-openapi/src/models/label.rs +++ b/forgejo-openapi/src/models/label.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -44,4 +44,3 @@ impl Label { } } } - diff --git a/forgejo-openapi/src/models/label_template.rs b/forgejo-openapi/src/models/label_template.rs index acd2d8a..90d8b63 100644 --- a/forgejo-openapi/src/models/label_template.rs +++ b/forgejo-openapi/src/models/label_template.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl LabelTemplate { } } } - diff --git a/forgejo-openapi/src/models/license_template_info.rs b/forgejo-openapi/src/models/license_template_info.rs index a648e3a..c0286aa 100644 --- a/forgejo-openapi/src/models/license_template_info.rs +++ b/forgejo-openapi/src/models/license_template_info.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl LicenseTemplateInfo { } } } - diff --git a/forgejo-openapi/src/models/licenses_template_list_entry.rs b/forgejo-openapi/src/models/licenses_template_list_entry.rs index fc7b83f..f23100e 100644 --- a/forgejo-openapi/src/models/licenses_template_list_entry.rs +++ b/forgejo-openapi/src/models/licenses_template_list_entry.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl LicensesTemplateListEntry { } } } - diff --git a/forgejo-openapi/src/models/list_action_run_response.rs b/forgejo-openapi/src/models/list_action_run_response.rs index 2edc726..5e1303a 100644 --- a/forgejo-openapi/src/models/list_action_run_response.rs +++ b/forgejo-openapi/src/models/list_action_run_response.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl ListActionRunResponse { } } } - diff --git a/forgejo-openapi/src/models/markdown_option.rs b/forgejo-openapi/src/models/markdown_option.rs index a423e31..9528590 100644 --- a/forgejo-openapi/src/models/markdown_option.rs +++ b/forgejo-openapi/src/models/markdown_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -39,4 +39,3 @@ impl MarkdownOption { } } } - diff --git a/forgejo-openapi/src/models/markup_option.rs b/forgejo-openapi/src/models/markup_option.rs index 8e662b1..d8d0ee5 100644 --- a/forgejo-openapi/src/models/markup_option.rs +++ b/forgejo-openapi/src/models/markup_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -47,4 +47,3 @@ impl MarkupOption { } } } - diff --git a/forgejo-openapi/src/models/merge_pull_request_option.rs b/forgejo-openapi/src/models/merge_pull_request_option.rs index 4b5ff89..cd03ca2 100644 --- a/forgejo-openapi/src/models/merge_pull_request_option.rs +++ b/forgejo-openapi/src/models/merge_pull_request_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,13 +22,19 @@ pub struct MergePullRequestOption { pub merge_message_field: Option, #[serde(rename = "MergeTitleField", skip_serializing_if = "Option::is_none")] pub merge_title_field: Option, - #[serde(rename = "delete_branch_after_merge", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "delete_branch_after_merge", + skip_serializing_if = "Option::is_none" + )] pub delete_branch_after_merge: Option, #[serde(rename = "force_merge", skip_serializing_if = "Option::is_none")] pub force_merge: Option, #[serde(rename = "head_commit_id", skip_serializing_if = "Option::is_none")] pub head_commit_id: Option, - #[serde(rename = "merge_when_checks_succeed", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "merge_when_checks_succeed", + skip_serializing_if = "Option::is_none" + )] pub merge_when_checks_succeed: Option, } @@ -47,7 +53,7 @@ impl MergePullRequestOption { } } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Do { #[serde(rename = "merge")] @@ -69,4 +75,3 @@ impl Default for Do { Self::Merge } } - diff --git a/forgejo-openapi/src/models/migrate_repo_options.rs b/forgejo-openapi/src/models/migrate_repo_options.rs index 698575d..1e9c9d8 100644 --- a/forgejo-openapi/src/models/migrate_repo_options.rs +++ b/forgejo-openapi/src/models/migrate_repo_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -85,7 +85,7 @@ impl MigrateRepoOptions { } } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Service { #[serde(rename = "git")] @@ -111,4 +111,3 @@ impl Default for Service { Self::Git } } - diff --git a/forgejo-openapi/src/models/milestone.rs b/forgejo-openapi/src/models/milestone.rs index ac2e555..4c3a953 100644 --- a/forgejo-openapi/src/models/milestone.rs +++ b/forgejo-openapi/src/models/milestone.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -54,4 +54,3 @@ impl Milestone { } } } - diff --git a/forgejo-openapi/src/models/new_issue_pins_allowed.rs b/forgejo-openapi/src/models/new_issue_pins_allowed.rs index 21ff7c4..e78e1bf 100644 --- a/forgejo-openapi/src/models/new_issue_pins_allowed.rs +++ b/forgejo-openapi/src/models/new_issue_pins_allowed.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl NewIssuePinsAllowed { } } } - diff --git a/forgejo-openapi/src/models/node_info.rs b/forgejo-openapi/src/models/node_info.rs index 672d8a5..6e40ac3 100644 --- a/forgejo-openapi/src/models/node_info.rs +++ b/forgejo-openapi/src/models/node_info.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -44,4 +44,3 @@ impl NodeInfo { } } } - diff --git a/forgejo-openapi/src/models/node_info_services.rs b/forgejo-openapi/src/models/node_info_services.rs index f273516..f1e8011 100644 --- a/forgejo-openapi/src/models/node_info_services.rs +++ b/forgejo-openapi/src/models/node_info_services.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl NodeInfoServices { } } } - diff --git a/forgejo-openapi/src/models/node_info_software.rs b/forgejo-openapi/src/models/node_info_software.rs index c609313..782f4ee 100644 --- a/forgejo-openapi/src/models/node_info_software.rs +++ b/forgejo-openapi/src/models/node_info_software.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl NodeInfoSoftware { } } } - diff --git a/forgejo-openapi/src/models/node_info_usage.rs b/forgejo-openapi/src/models/node_info_usage.rs index 7aa0920..8d237bd 100644 --- a/forgejo-openapi/src/models/node_info_usage.rs +++ b/forgejo-openapi/src/models/node_info_usage.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl NodeInfoUsage { } } } - diff --git a/forgejo-openapi/src/models/node_info_usage_users.rs b/forgejo-openapi/src/models/node_info_usage_users.rs index 0938af9..c8d2c72 100644 --- a/forgejo-openapi/src/models/node_info_usage_users.rs +++ b/forgejo-openapi/src/models/node_info_usage_users.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl NodeInfoUsageUsers { } } } - diff --git a/forgejo-openapi/src/models/note.rs b/forgejo-openapi/src/models/note.rs index 846fee6..3fb9daf 100644 --- a/forgejo-openapi/src/models/note.rs +++ b/forgejo-openapi/src/models/note.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl Note { } } } - diff --git a/forgejo-openapi/src/models/note_options.rs b/forgejo-openapi/src/models/note_options.rs index 569cf65..25f5124 100644 --- a/forgejo-openapi/src/models/note_options.rs +++ b/forgejo-openapi/src/models/note_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -19,9 +19,6 @@ pub struct NoteOptions { impl NoteOptions { pub fn new() -> NoteOptions { - NoteOptions { - message: None, - } + NoteOptions { message: None } } } - diff --git a/forgejo-openapi/src/models/notification_count.rs b/forgejo-openapi/src/models/notification_count.rs index 7b819bd..58683c5 100644 --- a/forgejo-openapi/src/models/notification_count.rs +++ b/forgejo-openapi/src/models/notification_count.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct NotificationCount { impl NotificationCount { /// NotificationCount number of unread notifications pub fn new() -> NotificationCount { - NotificationCount { - new: None, - } + NotificationCount { new: None } } } - diff --git a/forgejo-openapi/src/models/notification_subject.rs b/forgejo-openapi/src/models/notification_subject.rs index 447b86e..25f70fd 100644 --- a/forgejo-openapi/src/models/notification_subject.rs +++ b/forgejo-openapi/src/models/notification_subject.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -16,7 +16,10 @@ use serde::{Deserialize, Serialize}; pub struct NotificationSubject { #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] pub html_url: Option, - #[serde(rename = "latest_comment_html_url", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "latest_comment_html_url", + skip_serializing_if = "Option::is_none" + )] pub latest_comment_html_url: Option, #[serde(rename = "latest_comment_url", skip_serializing_if = "Option::is_none")] pub latest_comment_url: Option, @@ -46,4 +49,3 @@ impl NotificationSubject { } } } - diff --git a/forgejo-openapi/src/models/notification_thread.rs b/forgejo-openapi/src/models/notification_thread.rs index ddf7ee1..044ef75 100644 --- a/forgejo-openapi/src/models/notification_thread.rs +++ b/forgejo-openapi/src/models/notification_thread.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -44,4 +44,3 @@ impl NotificationThread { } } } - diff --git a/forgejo-openapi/src/models/o_auth2_application.rs b/forgejo-openapi/src/models/o_auth2_application.rs index 62b086c..2393339 100644 --- a/forgejo-openapi/src/models/o_auth2_application.rs +++ b/forgejo-openapi/src/models/o_auth2_application.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -17,7 +17,10 @@ pub struct OAuth2Application { pub client_id: Option, #[serde(rename = "client_secret", skip_serializing_if = "Option::is_none")] pub client_secret: Option, - #[serde(rename = "confidential_client", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "confidential_client", + skip_serializing_if = "Option::is_none" + )] pub confidential_client: Option, #[serde(rename = "created", skip_serializing_if = "Option::is_none")] pub created: Option, @@ -42,4 +45,3 @@ impl OAuth2Application { } } } - diff --git a/forgejo-openapi/src/models/organization.rs b/forgejo-openapi/src/models/organization.rs index b218006..eb3ec9e 100644 --- a/forgejo-openapi/src/models/organization.rs +++ b/forgejo-openapi/src/models/organization.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -28,7 +28,10 @@ pub struct Organization { pub location: Option, #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, - #[serde(rename = "repo_admin_change_team_access", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "repo_admin_change_team_access", + skip_serializing_if = "Option::is_none" + )] pub repo_admin_change_team_access: Option, /// deprecated #[serde(rename = "username", skip_serializing_if = "Option::is_none")] @@ -57,4 +60,3 @@ impl Organization { } } } - diff --git a/forgejo-openapi/src/models/organization_permissions.rs b/forgejo-openapi/src/models/organization_permissions.rs index b12cc99..ca9b6d7 100644 --- a/forgejo-openapi/src/models/organization_permissions.rs +++ b/forgejo-openapi/src/models/organization_permissions.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,7 +14,10 @@ use serde::{Deserialize, Serialize}; /// OrganizationPermissions : OrganizationPermissions list different users permissions on an organization #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationPermissions { - #[serde(rename = "can_create_repository", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "can_create_repository", + skip_serializing_if = "Option::is_none" + )] pub can_create_repository: Option, #[serde(rename = "can_read", skip_serializing_if = "Option::is_none")] pub can_read: Option, @@ -38,4 +41,3 @@ impl OrganizationPermissions { } } } - diff --git a/forgejo-openapi/src/models/package.rs b/forgejo-openapi/src/models/package.rs index a0f2132..891e1cf 100644 --- a/forgejo-openapi/src/models/package.rs +++ b/forgejo-openapi/src/models/package.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -50,4 +50,3 @@ impl Package { } } } - diff --git a/forgejo-openapi/src/models/package_file.rs b/forgejo-openapi/src/models/package_file.rs index 37c5027..fabf5d0 100644 --- a/forgejo-openapi/src/models/package_file.rs +++ b/forgejo-openapi/src/models/package_file.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -44,4 +44,3 @@ impl PackageFile { } } } - diff --git a/forgejo-openapi/src/models/payload_commit.rs b/forgejo-openapi/src/models/payload_commit.rs index 23678cc..04eebf0 100644 --- a/forgejo-openapi/src/models/payload_commit.rs +++ b/forgejo-openapi/src/models/payload_commit.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -54,4 +54,3 @@ impl PayloadCommit { } } } - diff --git a/forgejo-openapi/src/models/payload_commit_verification.rs b/forgejo-openapi/src/models/payload_commit_verification.rs index 09c1eca..757167e 100644 --- a/forgejo-openapi/src/models/payload_commit_verification.rs +++ b/forgejo-openapi/src/models/payload_commit_verification.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl PayloadCommitVerification { } } } - diff --git a/forgejo-openapi/src/models/payload_user.rs b/forgejo-openapi/src/models/payload_user.rs index 832e4a1..d302e20 100644 --- a/forgejo-openapi/src/models/payload_user.rs +++ b/forgejo-openapi/src/models/payload_user.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -33,4 +33,3 @@ impl PayloadUser { } } } - diff --git a/forgejo-openapi/src/models/permission.rs b/forgejo-openapi/src/models/permission.rs index bc6b27d..28194e7 100644 --- a/forgejo-openapi/src/models/permission.rs +++ b/forgejo-openapi/src/models/permission.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl Permission { } } } - diff --git a/forgejo-openapi/src/models/pr_branch_info.rs b/forgejo-openapi/src/models/pr_branch_info.rs index 8596cd3..2fa2231 100644 --- a/forgejo-openapi/src/models/pr_branch_info.rs +++ b/forgejo-openapi/src/models/pr_branch_info.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl PrBranchInfo { } } } - diff --git a/forgejo-openapi/src/models/public_key.rs b/forgejo-openapi/src/models/public_key.rs index 86ff75a..5598ef4 100644 --- a/forgejo-openapi/src/models/public_key.rs +++ b/forgejo-openapi/src/models/public_key.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -50,4 +50,3 @@ impl PublicKey { } } } - diff --git a/forgejo-openapi/src/models/pull_request.rs b/forgejo-openapi/src/models/pull_request.rs index b10aa6a..d1afdf8 100644 --- a/forgejo-openapi/src/models/pull_request.rs +++ b/forgejo-openapi/src/models/pull_request.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -16,7 +16,10 @@ use serde::{Deserialize, Serialize}; pub struct PullRequest { #[serde(rename = "additions", skip_serializing_if = "Option::is_none")] pub additions: Option, - #[serde(rename = "allow_maintainer_edit", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_maintainer_edit", + skip_serializing_if = "Option::is_none" + )] pub allow_maintainer_edit: Option, #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] pub assignee: Option>, @@ -74,9 +77,15 @@ pub struct PullRequest { pub patch_url: Option, #[serde(rename = "pin_order", skip_serializing_if = "Option::is_none")] pub pin_order: Option, - #[serde(rename = "requested_reviewers", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "requested_reviewers", + skip_serializing_if = "Option::is_none" + )] pub requested_reviewers: Option>, - #[serde(rename = "requested_reviewers_teams", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "requested_reviewers_teams", + skip_serializing_if = "Option::is_none" + )] pub requested_reviewers_teams: Option>, /// number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) #[serde(rename = "review_comments", skip_serializing_if = "Option::is_none")] @@ -139,4 +148,3 @@ impl PullRequest { } } } - diff --git a/forgejo-openapi/src/models/pull_request_meta.rs b/forgejo-openapi/src/models/pull_request_meta.rs index c3200a4..8126be9 100644 --- a/forgejo-openapi/src/models/pull_request_meta.rs +++ b/forgejo-openapi/src/models/pull_request_meta.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl PullRequestMeta { } } } - diff --git a/forgejo-openapi/src/models/pull_review.rs b/forgejo-openapi/src/models/pull_review.rs index 8433b39..89083cf 100644 --- a/forgejo-openapi/src/models/pull_review.rs +++ b/forgejo-openapi/src/models/pull_review.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -66,4 +66,3 @@ impl PullReview { } } } - diff --git a/forgejo-openapi/src/models/pull_review_comment.rs b/forgejo-openapi/src/models/pull_review_comment.rs index 21570aa..8745d13 100644 --- a/forgejo-openapi/src/models/pull_review_comment.rs +++ b/forgejo-openapi/src/models/pull_review_comment.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -34,7 +34,10 @@ pub struct PullReviewComment { pub path: Option, #[serde(rename = "position", skip_serializing_if = "Option::is_none")] pub position: Option, - #[serde(rename = "pull_request_review_id", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "pull_request_review_id", + skip_serializing_if = "Option::is_none" + )] pub pull_request_review_id: Option, #[serde(rename = "pull_request_url", skip_serializing_if = "Option::is_none")] pub pull_request_url: Option, @@ -68,4 +71,3 @@ impl PullReviewComment { } } } - diff --git a/forgejo-openapi/src/models/pull_review_request_options.rs b/forgejo-openapi/src/models/pull_review_request_options.rs index 910b053..3101cd5 100644 --- a/forgejo-openapi/src/models/pull_review_request_options.rs +++ b/forgejo-openapi/src/models/pull_review_request_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl PullReviewRequestOptions { } } } - diff --git a/forgejo-openapi/src/models/push_mirror.rs b/forgejo-openapi/src/models/push_mirror.rs index bce4115..424af76 100644 --- a/forgejo-openapi/src/models/push_mirror.rs +++ b/forgejo-openapi/src/models/push_mirror.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -53,4 +53,3 @@ impl PushMirror { } } } - diff --git a/forgejo-openapi/src/models/quota_group.rs b/forgejo-openapi/src/models/quota_group.rs index d0f8fa9..435c3eb 100644 --- a/forgejo-openapi/src/models/quota_group.rs +++ b/forgejo-openapi/src/models/quota_group.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -31,4 +31,3 @@ impl QuotaGroup { } } } - diff --git a/forgejo-openapi/src/models/quota_info.rs b/forgejo-openapi/src/models/quota_info.rs index d684535..662d1e3 100644 --- a/forgejo-openapi/src/models/quota_info.rs +++ b/forgejo-openapi/src/models/quota_info.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl QuotaInfo { } } } - diff --git a/forgejo-openapi/src/models/quota_rule_info.rs b/forgejo-openapi/src/models/quota_rule_info.rs index c0fbd5e..e1820b9 100644 --- a/forgejo-openapi/src/models/quota_rule_info.rs +++ b/forgejo-openapi/src/models/quota_rule_info.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl QuotaRuleInfo { } } } - diff --git a/forgejo-openapi/src/models/quota_used.rs b/forgejo-openapi/src/models/quota_used.rs index 38c10bc..c114413 100644 --- a/forgejo-openapi/src/models/quota_used.rs +++ b/forgejo-openapi/src/models/quota_used.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct QuotaUsed { impl QuotaUsed { /// QuotaUsed represents the quota usage of a user pub fn new() -> QuotaUsed { - QuotaUsed { - size: None, - } + QuotaUsed { size: None } } } - diff --git a/forgejo-openapi/src/models/quota_used_artifact.rs b/forgejo-openapi/src/models/quota_used_artifact.rs index 70c983c..b985e26 100644 --- a/forgejo-openapi/src/models/quota_used_artifact.rs +++ b/forgejo-openapi/src/models/quota_used_artifact.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl QuotaUsedArtifact { } } } - diff --git a/forgejo-openapi/src/models/quota_used_attachment.rs b/forgejo-openapi/src/models/quota_used_attachment.rs index 2158ac4..4e5683c 100644 --- a/forgejo-openapi/src/models/quota_used_attachment.rs +++ b/forgejo-openapi/src/models/quota_used_attachment.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl QuotaUsedAttachment { } } } - diff --git a/forgejo-openapi/src/models/quota_used_attachment_contained_in.rs b/forgejo-openapi/src/models/quota_used_attachment_contained_in.rs index 1f2e683..acb96a9 100644 --- a/forgejo-openapi/src/models/quota_used_attachment_contained_in.rs +++ b/forgejo-openapi/src/models/quota_used_attachment_contained_in.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -31,4 +31,3 @@ impl QuotaUsedAttachmentContainedIn { } } } - diff --git a/forgejo-openapi/src/models/quota_used_package.rs b/forgejo-openapi/src/models/quota_used_package.rs index 5aff47b..0273827 100644 --- a/forgejo-openapi/src/models/quota_used_package.rs +++ b/forgejo-openapi/src/models/quota_used_package.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -43,4 +43,3 @@ impl QuotaUsedPackage { } } } - diff --git a/forgejo-openapi/src/models/quota_used_size.rs b/forgejo-openapi/src/models/quota_used_size.rs index fa00a8d..b11174c 100644 --- a/forgejo-openapi/src/models/quota_used_size.rs +++ b/forgejo-openapi/src/models/quota_used_size.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl QuotaUsedSize { } } } - diff --git a/forgejo-openapi/src/models/quota_used_size_assets.rs b/forgejo-openapi/src/models/quota_used_size_assets.rs index cecc5a4..29271cd 100644 --- a/forgejo-openapi/src/models/quota_used_size_assets.rs +++ b/forgejo-openapi/src/models/quota_used_size_assets.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -33,4 +33,3 @@ impl QuotaUsedSizeAssets { } } } - diff --git a/forgejo-openapi/src/models/quota_used_size_assets_attachments.rs b/forgejo-openapi/src/models/quota_used_size_assets_attachments.rs index b13c428..279d251 100644 --- a/forgejo-openapi/src/models/quota_used_size_assets_attachments.rs +++ b/forgejo-openapi/src/models/quota_used_size_assets_attachments.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -31,4 +31,3 @@ impl QuotaUsedSizeAssetsAttachments { } } } - diff --git a/forgejo-openapi/src/models/quota_used_size_assets_packages.rs b/forgejo-openapi/src/models/quota_used_size_assets_packages.rs index 0d62c25..ee0eefb 100644 --- a/forgejo-openapi/src/models/quota_used_size_assets_packages.rs +++ b/forgejo-openapi/src/models/quota_used_size_assets_packages.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct QuotaUsedSizeAssetsPackages { impl QuotaUsedSizeAssetsPackages { /// QuotaUsedSizeAssetsPackages represents the size-based package quota usage of a user pub fn new() -> QuotaUsedSizeAssetsPackages { - QuotaUsedSizeAssetsPackages { - all: None, - } + QuotaUsedSizeAssetsPackages { all: None } } } - diff --git a/forgejo-openapi/src/models/quota_used_size_git.rs b/forgejo-openapi/src/models/quota_used_size_git.rs index 0df2336..eb41a1b 100644 --- a/forgejo-openapi/src/models/quota_used_size_git.rs +++ b/forgejo-openapi/src/models/quota_used_size_git.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct QuotaUsedSizeGit { impl QuotaUsedSizeGit { /// QuotaUsedSizeGit represents the size-based git (lfs) quota usage of a user pub fn new() -> QuotaUsedSizeGit { - QuotaUsedSizeGit { - lfs: None, - } + QuotaUsedSizeGit { lfs: None } } } - diff --git a/forgejo-openapi/src/models/quota_used_size_repos.rs b/forgejo-openapi/src/models/quota_used_size_repos.rs index e1793f7..422f734 100644 --- a/forgejo-openapi/src/models/quota_used_size_repos.rs +++ b/forgejo-openapi/src/models/quota_used_size_repos.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -31,4 +31,3 @@ impl QuotaUsedSizeRepos { } } } - diff --git a/forgejo-openapi/src/models/reaction.rs b/forgejo-openapi/src/models/reaction.rs index 6e4ead5..1f0af87 100644 --- a/forgejo-openapi/src/models/reaction.rs +++ b/forgejo-openapi/src/models/reaction.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl Reaction { } } } - diff --git a/forgejo-openapi/src/models/reference.rs b/forgejo-openapi/src/models/reference.rs index e31fa4e..35582be 100644 --- a/forgejo-openapi/src/models/reference.rs +++ b/forgejo-openapi/src/models/reference.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl Reference { } } } - diff --git a/forgejo-openapi/src/models/registration_token.rs b/forgejo-openapi/src/models/registration_token.rs index 46d728d..ce21428 100644 --- a/forgejo-openapi/src/models/registration_token.rs +++ b/forgejo-openapi/src/models/registration_token.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct RegistrationToken { impl RegistrationToken { /// RegistrationToken is a string used to register a runner with a server pub fn new() -> RegistrationToken { - RegistrationToken { - token: None, - } + RegistrationToken { token: None } } } - diff --git a/forgejo-openapi/src/models/release.rs b/forgejo-openapi/src/models/release.rs index e4e7887..7e2e06e 100644 --- a/forgejo-openapi/src/models/release.rs +++ b/forgejo-openapi/src/models/release.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,7 +14,10 @@ use serde::{Deserialize, Serialize}; /// Release : Release represents a repository release #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Release { - #[serde(rename = "archive_download_count", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "archive_download_count", + skip_serializing_if = "Option::is_none" + )] pub archive_download_count: Option>, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, @@ -77,4 +80,3 @@ impl Release { } } } - diff --git a/forgejo-openapi/src/models/rename_org_option.rs b/forgejo-openapi/src/models/rename_org_option.rs index 59f0049..b86f223 100644 --- a/forgejo-openapi/src/models/rename_org_option.rs +++ b/forgejo-openapi/src/models/rename_org_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct RenameOrgOption { impl RenameOrgOption { /// RenameOrgOption options when renaming an organization pub fn new(new_name: String) -> RenameOrgOption { - RenameOrgOption { - new_name, - } + RenameOrgOption { new_name } } } - diff --git a/forgejo-openapi/src/models/rename_user_option.rs b/forgejo-openapi/src/models/rename_user_option.rs index d24d53c..7aa392f 100644 --- a/forgejo-openapi/src/models/rename_user_option.rs +++ b/forgejo-openapi/src/models/rename_user_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct RenameUserOption { impl RenameUserOption { /// RenameUserOption options when renaming a user pub fn new(new_username: String) -> RenameUserOption { - RenameUserOption { - new_username, - } + RenameUserOption { new_username } } } - diff --git a/forgejo-openapi/src/models/replace_flags_option.rs b/forgejo-openapi/src/models/replace_flags_option.rs index b530cd4..ba93e92 100644 --- a/forgejo-openapi/src/models/replace_flags_option.rs +++ b/forgejo-openapi/src/models/replace_flags_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct ReplaceFlagsOption { impl ReplaceFlagsOption { /// ReplaceFlagsOption options when replacing the flags of a repository pub fn new() -> ReplaceFlagsOption { - ReplaceFlagsOption { - flags: None, - } + ReplaceFlagsOption { flags: None } } } - diff --git a/forgejo-openapi/src/models/repo_collaborator_permission.rs b/forgejo-openapi/src/models/repo_collaborator_permission.rs index 6ef6aca..1bda2e1 100644 --- a/forgejo-openapi/src/models/repo_collaborator_permission.rs +++ b/forgejo-openapi/src/models/repo_collaborator_permission.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl RepoCollaboratorPermission { } } } - diff --git a/forgejo-openapi/src/models/repo_commit.rs b/forgejo-openapi/src/models/repo_commit.rs index 14b16c9..f59533e 100644 --- a/forgejo-openapi/src/models/repo_commit.rs +++ b/forgejo-openapi/src/models/repo_commit.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -39,4 +39,3 @@ impl RepoCommit { } } } - diff --git a/forgejo-openapi/src/models/repo_create_release_attachment_request.rs b/forgejo-openapi/src/models/repo_create_release_attachment_request.rs index 5cfc89f..ebeee2e 100644 --- a/forgejo-openapi/src/models/repo_create_release_attachment_request.rs +++ b/forgejo-openapi/src/models/repo_create_release_attachment_request.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl RepoCreateReleaseAttachmentRequest { } } } - diff --git a/forgejo-openapi/src/models/repo_topic_options.rs b/forgejo-openapi/src/models/repo_topic_options.rs index 1447f48..c3d3428 100644 --- a/forgejo-openapi/src/models/repo_topic_options.rs +++ b/forgejo-openapi/src/models/repo_topic_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct RepoTopicOptions { impl RepoTopicOptions { /// RepoTopicOptions a collection of repo topic names pub fn new() -> RepoTopicOptions { - RepoTopicOptions { - topics: None, - } + RepoTopicOptions { topics: None } } } - diff --git a/forgejo-openapi/src/models/repo_transfer.rs b/forgejo-openapi/src/models/repo_transfer.rs index e390147..808fb80 100644 --- a/forgejo-openapi/src/models/repo_transfer.rs +++ b/forgejo-openapi/src/models/repo_transfer.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -32,4 +32,3 @@ impl RepoTransfer { } } } - diff --git a/forgejo-openapi/src/models/repository.rs b/forgejo-openapi/src/models/repository.rs index 683100e..da06a59 100644 --- a/forgejo-openapi/src/models/repository.rs +++ b/forgejo-openapi/src/models/repository.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,15 +14,27 @@ use serde::{Deserialize, Serialize}; /// Repository : Repository represents a repository #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Repository { - #[serde(rename = "allow_fast_forward_only_merge", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_fast_forward_only_merge", + skip_serializing_if = "Option::is_none" + )] pub allow_fast_forward_only_merge: Option, - #[serde(rename = "allow_merge_commits", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_merge_commits", + skip_serializing_if = "Option::is_none" + )] pub allow_merge_commits: Option, #[serde(rename = "allow_rebase", skip_serializing_if = "Option::is_none")] pub allow_rebase: Option, - #[serde(rename = "allow_rebase_explicit", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_rebase_explicit", + skip_serializing_if = "Option::is_none" + )] pub allow_rebase_explicit: Option, - #[serde(rename = "allow_rebase_update", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "allow_rebase_update", + skip_serializing_if = "Option::is_none" + )] pub allow_rebase_update: Option, #[serde(rename = "allow_squash_merge", skip_serializing_if = "Option::is_none")] pub allow_squash_merge: Option, @@ -36,15 +48,27 @@ pub struct Repository { pub clone_url: Option, #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, - #[serde(rename = "default_allow_maintainer_edit", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "default_allow_maintainer_edit", + skip_serializing_if = "Option::is_none" + )] pub default_allow_maintainer_edit: Option, #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] pub default_branch: Option, - #[serde(rename = "default_delete_branch_after_merge", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "default_delete_branch_after_merge", + skip_serializing_if = "Option::is_none" + )] pub default_delete_branch_after_merge: Option, - #[serde(rename = "default_merge_style", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "default_merge_style", + skip_serializing_if = "Option::is_none" + )] pub default_merge_style: Option, - #[serde(rename = "default_update_style", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "default_update_style", + skip_serializing_if = "Option::is_none" + )] pub default_update_style: Option, #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, @@ -60,7 +84,10 @@ pub struct Repository { pub forks_count: Option, #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] pub full_name: Option, - #[serde(rename = "globally_editable_wiki", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "globally_editable_wiki", + skip_serializing_if = "Option::is_none" + )] pub globally_editable_wiki: Option, #[serde(rename = "has_actions", skip_serializing_if = "Option::is_none")] pub has_actions: Option, @@ -80,7 +107,10 @@ pub struct Repository { pub html_url: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "ignore_whitespace_conflicts", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "ignore_whitespace_conflicts", + skip_serializing_if = "Option::is_none" + )] pub ignore_whitespace_conflicts: Option, #[serde(rename = "internal", skip_serializing_if = "Option::is_none")] pub internal: Option, @@ -227,4 +257,3 @@ impl Default for ObjectFormatName { Self::Sha1 } } - diff --git a/forgejo-openapi/src/models/repository_meta.rs b/forgejo-openapi/src/models/repository_meta.rs index 6a10294..99bfeef 100644 --- a/forgejo-openapi/src/models/repository_meta.rs +++ b/forgejo-openapi/src/models/repository_meta.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl RepositoryMeta { } } } - diff --git a/forgejo-openapi/src/models/search_results.rs b/forgejo-openapi/src/models/search_results.rs index 6fd8a31..c9d7fa0 100644 --- a/forgejo-openapi/src/models/search_results.rs +++ b/forgejo-openapi/src/models/search_results.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl SearchResults { } } } - diff --git a/forgejo-openapi/src/models/secret.rs b/forgejo-openapi/src/models/secret.rs index 4665d8e..5f18c8e 100644 --- a/forgejo-openapi/src/models/secret.rs +++ b/forgejo-openapi/src/models/secret.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl Secret { } } } - diff --git a/forgejo-openapi/src/models/server_version.rs b/forgejo-openapi/src/models/server_version.rs index 6f51b29..08c6123 100644 --- a/forgejo-openapi/src/models/server_version.rs +++ b/forgejo-openapi/src/models/server_version.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct ServerVersion { impl ServerVersion { /// ServerVersion wraps the version of the server pub fn new() -> ServerVersion { - ServerVersion { - version: None, - } + ServerVersion { version: None } } } - diff --git a/forgejo-openapi/src/models/set_user_quota_groups_options.rs b/forgejo-openapi/src/models/set_user_quota_groups_options.rs index d2508e9..e6a4080 100644 --- a/forgejo-openapi/src/models/set_user_quota_groups_options.rs +++ b/forgejo-openapi/src/models/set_user_quota_groups_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct SetUserQuotaGroupsOptions { impl SetUserQuotaGroupsOptions { /// SetUserQuotaGroupsOptions represents the quota groups of a user pub fn new(groups: Vec) -> SetUserQuotaGroupsOptions { - SetUserQuotaGroupsOptions { - groups, - } + SetUserQuotaGroupsOptions { groups } } } - diff --git a/forgejo-openapi/src/models/stop_watch.rs b/forgejo-openapi/src/models/stop_watch.rs index c70f5b4..b581fe9 100644 --- a/forgejo-openapi/src/models/stop_watch.rs +++ b/forgejo-openapi/src/models/stop_watch.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -44,4 +44,3 @@ impl StopWatch { } } } - diff --git a/forgejo-openapi/src/models/submit_pull_review_options.rs b/forgejo-openapi/src/models/submit_pull_review_options.rs index 1b47894..85b7f1b 100644 --- a/forgejo-openapi/src/models/submit_pull_review_options.rs +++ b/forgejo-openapi/src/models/submit_pull_review_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl SubmitPullReviewOptions { } } } - diff --git a/forgejo-openapi/src/models/sync_fork_info.rs b/forgejo-openapi/src/models/sync_fork_info.rs index 8962bb9..c55d02f 100644 --- a/forgejo-openapi/src/models/sync_fork_info.rs +++ b/forgejo-openapi/src/models/sync_fork_info.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl SyncForkInfo { } } } - diff --git a/forgejo-openapi/src/models/tag.rs b/forgejo-openapi/src/models/tag.rs index c7f6391..9be8816 100644 --- a/forgejo-openapi/src/models/tag.rs +++ b/forgejo-openapi/src/models/tag.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,7 +14,10 @@ use serde::{Deserialize, Serialize}; /// Tag : Tag represents a repository tag #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Tag { - #[serde(rename = "archive_download_count", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "archive_download_count", + skip_serializing_if = "Option::is_none" + )] pub archive_download_count: Option>, #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] pub commit: Option>, @@ -44,4 +47,3 @@ impl Tag { } } } - diff --git a/forgejo-openapi/src/models/tag_archive_download_count.rs b/forgejo-openapi/src/models/tag_archive_download_count.rs index eb9e0eb..a8a0e11 100644 --- a/forgejo-openapi/src/models/tag_archive_download_count.rs +++ b/forgejo-openapi/src/models/tag_archive_download_count.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl TagArchiveDownloadCount { } } } - diff --git a/forgejo-openapi/src/models/tag_protection.rs b/forgejo-openapi/src/models/tag_protection.rs index de0bcb8..00dda1c 100644 --- a/forgejo-openapi/src/models/tag_protection.rs +++ b/forgejo-openapi/src/models/tag_protection.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -24,7 +24,10 @@ pub struct TagProtection { pub updated_at: Option, #[serde(rename = "whitelist_teams", skip_serializing_if = "Option::is_none")] pub whitelist_teams: Option>, - #[serde(rename = "whitelist_usernames", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "whitelist_usernames", + skip_serializing_if = "Option::is_none" + )] pub whitelist_usernames: Option>, } @@ -41,4 +44,3 @@ impl TagProtection { } } } - diff --git a/forgejo-openapi/src/models/team.rs b/forgejo-openapi/src/models/team.rs index 72da90e..f2ef1b5 100644 --- a/forgejo-openapi/src/models/team.rs +++ b/forgejo-openapi/src/models/team.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -14,13 +14,19 @@ use serde::{Deserialize, Serialize}; /// Team : Team represents a team in an organization #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Team { - #[serde(rename = "can_create_org_repo", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "can_create_org_repo", + skip_serializing_if = "Option::is_none" + )] pub can_create_org_repo: Option, #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - #[serde(rename = "includes_all_repositories", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "includes_all_repositories", + skip_serializing_if = "Option::is_none" + )] pub includes_all_repositories: Option, #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, @@ -50,7 +56,7 @@ impl Team { } } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Permission { #[serde(rename = "none")] @@ -70,4 +76,3 @@ impl Default for Permission { Self::None } } - diff --git a/forgejo-openapi/src/models/team_search_results.rs b/forgejo-openapi/src/models/team_search_results.rs index 66c9ee7..8961daf 100644 --- a/forgejo-openapi/src/models/team_search_results.rs +++ b/forgejo-openapi/src/models/team_search_results.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -27,4 +27,3 @@ impl TeamSearchResults { } } } - diff --git a/forgejo-openapi/src/models/timeline_comment.rs b/forgejo-openapi/src/models/timeline_comment.rs index 149f8ab..e4da161 100644 --- a/forgejo-openapi/src/models/timeline_comment.rs +++ b/forgejo-openapi/src/models/timeline_comment.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -112,4 +112,3 @@ impl TimelineComment { } } } - diff --git a/forgejo-openapi/src/models/topic_name.rs b/forgejo-openapi/src/models/topic_name.rs index 86d0afd..cfcbffa 100644 --- a/forgejo-openapi/src/models/topic_name.rs +++ b/forgejo-openapi/src/models/topic_name.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -21,9 +21,6 @@ pub struct TopicName { impl TopicName { /// TopicName a list of repo topic names pub fn new() -> TopicName { - TopicName { - topics: None, - } + TopicName { topics: None } } } - diff --git a/forgejo-openapi/src/models/topic_response.rs b/forgejo-openapi/src/models/topic_response.rs index fdee456..0a7fbe0 100644 --- a/forgejo-openapi/src/models/topic_response.rs +++ b/forgejo-openapi/src/models/topic_response.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -38,4 +38,3 @@ impl TopicResponse { } } } - diff --git a/forgejo-openapi/src/models/topic_search_results.rs b/forgejo-openapi/src/models/topic_search_results.rs index 03512f3..e74965f 100644 --- a/forgejo-openapi/src/models/topic_search_results.rs +++ b/forgejo-openapi/src/models/topic_search_results.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -19,9 +19,6 @@ pub struct TopicSearchResults { impl TopicSearchResults { pub fn new() -> TopicSearchResults { - TopicSearchResults { - topics: None, - } + TopicSearchResults { topics: None } } } - diff --git a/forgejo-openapi/src/models/tracked_time.rs b/forgejo-openapi/src/models/tracked_time.rs index 2801077..d38bd33 100644 --- a/forgejo-openapi/src/models/tracked_time.rs +++ b/forgejo-openapi/src/models/tracked_time.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -47,4 +47,3 @@ impl TrackedTime { } } } - diff --git a/forgejo-openapi/src/models/transfer_repo_option.rs b/forgejo-openapi/src/models/transfer_repo_option.rs index 5b776ee..42ae4e6 100644 --- a/forgejo-openapi/src/models/transfer_repo_option.rs +++ b/forgejo-openapi/src/models/transfer_repo_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl TransferRepoOption { } } } - diff --git a/forgejo-openapi/src/models/update_branch_repo_option.rs b/forgejo-openapi/src/models/update_branch_repo_option.rs index 28db67c..93a7f65 100644 --- a/forgejo-openapi/src/models/update_branch_repo_option.rs +++ b/forgejo-openapi/src/models/update_branch_repo_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct UpdateBranchRepoOption { impl UpdateBranchRepoOption { /// UpdateBranchRepoOption options when updating a branch in a repository pub fn new(name: String) -> UpdateBranchRepoOption { - UpdateBranchRepoOption { - name, - } + UpdateBranchRepoOption { name } } } - diff --git a/forgejo-openapi/src/models/update_file_options.rs b/forgejo-openapi/src/models/update_file_options.rs index 60de172..3631513 100644 --- a/forgejo-openapi/src/models/update_file_options.rs +++ b/forgejo-openapi/src/models/update_file_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -60,4 +60,3 @@ impl UpdateFileOptions { } } } - diff --git a/forgejo-openapi/src/models/update_repo_avatar_option.rs b/forgejo-openapi/src/models/update_repo_avatar_option.rs index a99bb73..9be9719 100644 --- a/forgejo-openapi/src/models/update_repo_avatar_option.rs +++ b/forgejo-openapi/src/models/update_repo_avatar_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct UpdateRepoAvatarOption { impl UpdateRepoAvatarOption { /// UpdateRepoAvatarUserOption options when updating the repo avatar pub fn new() -> UpdateRepoAvatarOption { - UpdateRepoAvatarOption { - image: None, - } + UpdateRepoAvatarOption { image: None } } } - diff --git a/forgejo-openapi/src/models/update_user_avatar_option.rs b/forgejo-openapi/src/models/update_user_avatar_option.rs index a34293b..1ccc362 100644 --- a/forgejo-openapi/src/models/update_user_avatar_option.rs +++ b/forgejo-openapi/src/models/update_user_avatar_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -22,9 +22,6 @@ pub struct UpdateUserAvatarOption { impl UpdateUserAvatarOption { /// UpdateUserAvatarUserOption options when updating the user avatar pub fn new() -> UpdateUserAvatarOption { - UpdateUserAvatarOption { - image: None, - } + UpdateUserAvatarOption { image: None } } } - diff --git a/forgejo-openapi/src/models/update_variable_option.rs b/forgejo-openapi/src/models/update_variable_option.rs index e74a5b0..3db366f 100644 --- a/forgejo-openapi/src/models/update_variable_option.rs +++ b/forgejo-openapi/src/models/update_variable_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -25,10 +25,6 @@ pub struct UpdateVariableOption { impl UpdateVariableOption { /// UpdateVariableOption the option when updating variable pub fn new(value: String) -> UpdateVariableOption { - UpdateVariableOption { - name: None, - value, - } + UpdateVariableOption { name: None, value } } } - diff --git a/forgejo-openapi/src/models/user.rs b/forgejo-openapi/src/models/user.rs index 811281f..1be8729 100644 --- a/forgejo-openapi/src/models/user.rs +++ b/forgejo-openapi/src/models/user.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -70,7 +70,10 @@ pub struct User { /// The ID of the user's Authentication Source #[serde(rename = "source_id", skip_serializing_if = "Option::is_none")] pub source_id: Option, - #[serde(rename = "starred_repos_count", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "starred_repos_count", + skip_serializing_if = "Option::is_none" + )] pub starred_repos_count: Option, /// User visibility level option: public, limited, private #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] @@ -110,4 +113,3 @@ impl User { } } } - diff --git a/forgejo-openapi/src/models/user_heatmap_data.rs b/forgejo-openapi/src/models/user_heatmap_data.rs index dc3e0d1..7dd2b85 100644 --- a/forgejo-openapi/src/models/user_heatmap_data.rs +++ b/forgejo-openapi/src/models/user_heatmap_data.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl UserHeatmapData { } } } - diff --git a/forgejo-openapi/src/models/user_search_results.rs b/forgejo-openapi/src/models/user_search_results.rs index 4549e0c..8730091 100644 --- a/forgejo-openapi/src/models/user_search_results.rs +++ b/forgejo-openapi/src/models/user_search_results.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -27,4 +27,3 @@ impl UserSearchResults { } } } - diff --git a/forgejo-openapi/src/models/user_settings.rs b/forgejo-openapi/src/models/user_settings.rs index fe6a707..22c0048 100644 --- a/forgejo-openapi/src/models/user_settings.rs +++ b/forgejo-openapi/src/models/user_settings.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -18,7 +18,10 @@ pub struct UserSettings { pub description: Option, #[serde(rename = "diff_view_style", skip_serializing_if = "Option::is_none")] pub diff_view_style: Option, - #[serde(rename = "enable_repo_unit_hints", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_repo_unit_hints", + skip_serializing_if = "Option::is_none" + )] pub enable_repo_unit_hints: Option, #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] pub full_name: Option, @@ -60,4 +63,3 @@ impl UserSettings { } } } - diff --git a/forgejo-openapi/src/models/user_settings_options.rs b/forgejo-openapi/src/models/user_settings_options.rs index 386fdb6..8f1f2d5 100644 --- a/forgejo-openapi/src/models/user_settings_options.rs +++ b/forgejo-openapi/src/models/user_settings_options.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -18,7 +18,10 @@ pub struct UserSettingsOptions { pub description: Option, #[serde(rename = "diff_view_style", skip_serializing_if = "Option::is_none")] pub diff_view_style: Option, - #[serde(rename = "enable_repo_unit_hints", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "enable_repo_unit_hints", + skip_serializing_if = "Option::is_none" + )] pub enable_repo_unit_hints: Option, #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] pub full_name: Option, @@ -60,4 +63,3 @@ impl UserSettingsOptions { } } } - diff --git a/forgejo-openapi/src/models/verify_gpg_key_option.rs b/forgejo-openapi/src/models/verify_gpg_key_option.rs index d7043f0..8fe5357 100644 --- a/forgejo-openapi/src/models/verify_gpg_key_option.rs +++ b/forgejo-openapi/src/models/verify_gpg_key_option.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -30,4 +30,3 @@ impl VerifyGpgKeyOption { } } } - diff --git a/forgejo-openapi/src/models/watch_info.rs b/forgejo-openapi/src/models/watch_info.rs index 3a94894..04d85d5 100644 --- a/forgejo-openapi/src/models/watch_info.rs +++ b/forgejo-openapi/src/models/watch_info.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -41,4 +41,3 @@ impl WatchInfo { } } } - diff --git a/forgejo-openapi/src/models/wiki_commit.rs b/forgejo-openapi/src/models/wiki_commit.rs index bc17326..0f45cc8 100644 --- a/forgejo-openapi/src/models/wiki_commit.rs +++ b/forgejo-openapi/src/models/wiki_commit.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl WikiCommit { } } } - diff --git a/forgejo-openapi/src/models/wiki_commit_list.rs b/forgejo-openapi/src/models/wiki_commit_list.rs index ad58d7d..8270c6e 100644 --- a/forgejo-openapi/src/models/wiki_commit_list.rs +++ b/forgejo-openapi/src/models/wiki_commit_list.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -29,4 +29,3 @@ impl WikiCommitList { } } } - diff --git a/forgejo-openapi/src/models/wiki_page.rs b/forgejo-openapi/src/models/wiki_page.rs index 1cfdcc1..5ade510 100644 --- a/forgejo-openapi/src/models/wiki_page.rs +++ b/forgejo-openapi/src/models/wiki_page.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -48,4 +48,3 @@ impl WikiPage { } } } - diff --git a/forgejo-openapi/src/models/wiki_page_meta_data.rs b/forgejo-openapi/src/models/wiki_page_meta_data.rs index 799e078..2c319a5 100644 --- a/forgejo-openapi/src/models/wiki_page_meta_data.rs +++ b/forgejo-openapi/src/models/wiki_page_meta_data.rs @@ -4,7 +4,7 @@ * This documentation describes the Forgejo API. * * The version of the OpenAPI document: 14.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,4 +35,3 @@ impl WikiPageMetaData { } } } - -- 2.54.0 From 0f301b15f5b9ce7fd1d575ebf4d68ca9b238bfc9 Mon Sep 17 00:00:00 2001 From: dzu Date: Sun, 8 Feb 2026 21:04:07 +0000 Subject: [PATCH 3/7] minimal forgejo openapi test also example setup to compile this thing --- Cargo.toml | 18 +++++++++++++++++- README.md | 16 ++++++++++++++++ forgejo-openapi-test/Cargo.toml | 10 ++++++++++ forgejo-openapi-test/src/main.rs | 20 ++++++++++++++++++++ forgejo-openapi/Cargo.toml | 4 ++-- 5 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 README.md create mode 100644 forgejo-openapi-test/Cargo.toml create mode 100644 forgejo-openapi-test/src/main.rs diff --git a/Cargo.toml b/Cargo.toml index 44c49c1..c5f2697 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,19 @@ [workspace] resolver = "3" -members = [ "forgejo-openapi" ] +members = [ + "forgejo-openapi", + "forgejo-openapi-test" +] + +[workspace.dependencies] +# workspace +forgejo-openapi = { path = "./forgejo-openapi", default-features = false } +# external +tokio = { version = "^1.46.0", default-features = false } +reqwest = { version = "^0.12", default-features = false } + +[profile.release] +opt-level = "z" +strip = true +lto = true +codegen-units = 1 diff --git a/README.md b/README.md new file mode 100644 index 0000000..aca7fba --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +Rust toolkit for CI actions + +anode -- action without node + +# Compile + +install +- libunwind-static +- xz-static + +get C runtime libraries from somewhere (I literally copied them from whatever `gcc` found them in on my system; I think that on actual alpine system they will be found with no problem) + +test is compiled with the following command: +```sh +RUSTFLAGS="-Lunwind -L/lib/musl/lib -Lcrt -Lxz -llzma" cargo +nightly b -Z build-std -p tests --release --target x86_64-unknown-linux-musl -v +``` diff --git a/forgejo-openapi-test/Cargo.toml b/forgejo-openapi-test/Cargo.toml new file mode 100644 index 0000000..75c76c1 --- /dev/null +++ b/forgejo-openapi-test/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "forgejo-openapi-test" +publish = false +version = "0.0.0" +edition = "2024" + +[dependencies] +forgejo-openapi = { workspace = true, features = ["rustls-tls"] } +reqwest = { workspace = true } +tokio = { workspace = true, features = ["macros"] } diff --git a/forgejo-openapi-test/src/main.rs b/forgejo-openapi-test/src/main.rs new file mode 100644 index 0000000..fa80587 --- /dev/null +++ b/forgejo-openapi-test/src/main.rs @@ -0,0 +1,20 @@ +#[tokio::main(flavor = "current_thread")] +async fn main() { + let client = reqwest::Client::new(); + let config = forgejo_openapi::apis::configuration::Configuration { + base_path: String::from("https://git.dzuchun.ing/api/v1"), + user_agent: None, + client, + basic_auth: None, + oauth_access_token: None, + bearer_access_token: None, + api_key: None, + }; + let results = forgejo_openapi::apis::repository_api::repo_search( + &config, None, None, None, None, None, None, None, None, None, None, None, None, None, + None, None, None, None, + ) + .await + .unwrap(); + println!("{results:#?}"); +} diff --git a/forgejo-openapi/Cargo.toml b/forgejo-openapi/Cargo.toml index 4ff08ab..435eb74 100644 --- a/forgejo-openapi/Cargo.toml +++ b/forgejo-openapi/Cargo.toml @@ -11,9 +11,9 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" -tokio = { version = "^1.46.0", features = ["fs"] } +tokio = { workspace = true, features = ["fs"] } tokio-util = { version = "^0.7", features = ["codec"] } -reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart", "stream"] } +reqwest = { workspace = true, features = ["json", "multipart", "stream"] } [features] default = ["native-tls"] -- 2.54.0 From 2729d91fa5c47880d3455628cdf561c1e348a8bf Mon Sep 17 00:00:00 2001 From: dzu Date: Wed, 11 Feb 2026 03:24:21 +0000 Subject: [PATCH 4/7] move out Forgejo OpenAPI definintion --- Cargo.toml | 7 +- forgejo-openapi/.gitignore | 3 - forgejo-openapi/.openapi-generator-ignore | 23 - forgejo-openapi/.openapi-generator/FILES | 486 - forgejo-openapi/.openapi-generator/VERSION | 1 - forgejo-openapi/.travis.yml | 1 - forgejo-openapi/Cargo.toml | 21 - forgejo-openapi/README.md | 746 - forgejo-openapi/docs/AccessToken.md | 15 - forgejo-openapi/docs/ActionRun.md | 33 - forgejo-openapi/docs/ActionRunJob.md | 18 - forgejo-openapi/docs/ActionTask.md | 23 - forgejo-openapi/docs/ActionTaskResponse.md | 12 - forgejo-openapi/docs/ActionVariable.md | 14 - forgejo-openapi/docs/Activity.md | 23 - forgejo-openapi/docs/ActivityPub.md | 11 - forgejo-openapi/docs/ActivitypubApi.md | 321 - forgejo-openapi/docs/AddCollaboratorOption.md | 11 - forgejo-openapi/docs/AddTimeOption.md | 13 - forgejo-openapi/docs/AdminApi.md | 1246 - forgejo-openapi/docs/AnnotatedTag.md | 18 - forgejo-openapi/docs/AnnotatedTagObject.md | 13 - forgejo-openapi/docs/ApiError.md | 12 - forgejo-openapi/docs/ApiForbiddenError.md | 12 - .../docs/ApiInternalServerError.md | 12 - forgejo-openapi/docs/ApiInvalidTopicsError.md | 12 - forgejo-openapi/docs/ApiNotFound.md | 13 - forgejo-openapi/docs/ApiRepoArchivedError.md | 12 - forgejo-openapi/docs/ApiUnauthorizedError.md | 12 - forgejo-openapi/docs/ApiValidationError.md | 12 - forgejo-openapi/docs/Attachment.md | 18 - forgejo-openapi/docs/BlockedUser.md | 12 - forgejo-openapi/docs/Branch.md | 19 - forgejo-openapi/docs/BranchProtection.md | 37 - forgejo-openapi/docs/ChangeFileOperation.md | 15 - forgejo-openapi/docs/ChangeFilesOptions.md | 18 - forgejo-openapi/docs/ChangedFile.md | 19 - forgejo-openapi/docs/CombinedStatus.md | 17 - forgejo-openapi/docs/Comment.md | 21 - forgejo-openapi/docs/Commit.md | 20 - forgejo-openapi/docs/CommitAffectedFiles.md | 12 - forgejo-openapi/docs/CommitDateOptions.md | 12 - forgejo-openapi/docs/CommitMeta.md | 13 - forgejo-openapi/docs/CommitStats.md | 13 - forgejo-openapi/docs/CommitStatus.md | 19 - forgejo-openapi/docs/CommitUser.md | 13 - forgejo-openapi/docs/Compare.md | 13 - forgejo-openapi/docs/ContentsResponse.md | 26 - .../docs/CreateAccessTokenOption.md | 12 - .../docs/CreateBranchProtectionOption.md | 35 - .../docs/CreateBranchRepoOption.md | 13 - forgejo-openapi/docs/CreateEmailOption.md | 11 - forgejo-openapi/docs/CreateFileOptions.md | 18 - forgejo-openapi/docs/CreateForkOption.md | 12 - forgejo-openapi/docs/CreateGpgKeyOption.md | 12 - forgejo-openapi/docs/CreateHookOption.md | 16 - .../docs/CreateIssueCommentOption.md | 12 - forgejo-openapi/docs/CreateIssueOption.md | 19 - forgejo-openapi/docs/CreateKeyOption.md | 13 - forgejo-openapi/docs/CreateLabelOption.md | 15 - forgejo-openapi/docs/CreateMilestoneOption.md | 14 - .../docs/CreateOAuth2ApplicationOptions.md | 13 - .../docs/CreateOrUpdateSecretOption.md | 11 - forgejo-openapi/docs/CreateOrgOption.md | 18 - .../docs/CreatePullRequestOption.md | 19 - .../docs/CreatePullReviewComment.md | 14 - .../docs/CreatePullReviewOptions.md | 14 - .../docs/CreatePushMirrorOption.md | 17 - .../docs/CreateQuotaGroupOptions.md | 12 - .../docs/CreateQuotaRuleOptions.md | 13 - forgejo-openapi/docs/CreateReleaseOption.md | 17 - forgejo-openapi/docs/CreateRepoOption.md | 22 - forgejo-openapi/docs/CreateStatusOption.md | 14 - forgejo-openapi/docs/CreateTagOption.md | 13 - .../docs/CreateTagProtectionOption.md | 13 - forgejo-openapi/docs/CreateTeamOption.md | 17 - forgejo-openapi/docs/CreateUserOption.md | 21 - forgejo-openapi/docs/CreateVariableOption.md | 11 - forgejo-openapi/docs/CreateWikiPageOptions.md | 13 - forgejo-openapi/docs/Cron.md | 15 - forgejo-openapi/docs/DeleteEmailOption.md | 11 - forgejo-openapi/docs/DeleteFileOptions.md | 18 - forgejo-openapi/docs/DeleteLabelsOption.md | 11 - forgejo-openapi/docs/DeployKey.md | 19 - .../docs/DismissPullReviewOptions.md | 12 - .../docs/DispatchWorkflowOption.md | 13 - forgejo-openapi/docs/DispatchWorkflowRun.md | 13 - forgejo-openapi/docs/EditAttachmentOptions.md | 12 - .../docs/EditBranchProtectionOption.md | 33 - forgejo-openapi/docs/EditDeadlineOption.md | 11 - forgejo-openapi/docs/EditGitHookOption.md | 11 - forgejo-openapi/docs/EditHookOption.md | 15 - .../docs/EditIssueCommentOption.md | 12 - forgejo-openapi/docs/EditIssueOption.md | 20 - forgejo-openapi/docs/EditLabelOption.md | 15 - forgejo-openapi/docs/EditMilestoneOption.md | 14 - forgejo-openapi/docs/EditOrgOption.md | 17 - forgejo-openapi/docs/EditPullRequestOption.md | 21 - forgejo-openapi/docs/EditQuotaRuleOptions.md | 12 - forgejo-openapi/docs/EditReactionOption.md | 11 - forgejo-openapi/docs/EditReleaseOption.md | 17 - forgejo-openapi/docs/EditRepoOption.md | 44 - .../docs/EditTagProtectionOption.md | 13 - forgejo-openapi/docs/EditTeamOption.md | 17 - forgejo-openapi/docs/EditUserOption.md | 30 - forgejo-openapi/docs/Email.md | 15 - forgejo-openapi/docs/ExternalTracker.md | 14 - forgejo-openapi/docs/ExternalWiki.md | 11 - forgejo-openapi/docs/FileCommitResponse.md | 19 - forgejo-openapi/docs/FileDeleteResponse.md | 13 - forgejo-openapi/docs/FileLinksResponse.md | 13 - forgejo-openapi/docs/FileResponse.md | 13 - forgejo-openapi/docs/FilesResponse.md | 13 - forgejo-openapi/docs/GeneralApiSettings.md | 14 - .../docs/GeneralAttachmentSettings.md | 14 - forgejo-openapi/docs/GeneralRepoSettings.md | 17 - forgejo-openapi/docs/GeneralUiSettings.md | 13 - forgejo-openapi/docs/GenerateRepoOption.md | 22 - forgejo-openapi/docs/GitBlob.md | 15 - forgejo-openapi/docs/GitEntry.md | 16 - forgejo-openapi/docs/GitHook.md | 13 - forgejo-openapi/docs/GitObject.md | 13 - forgejo-openapi/docs/GitTreeResponse.md | 16 - forgejo-openapi/docs/GitignoreTemplateInfo.md | 12 - forgejo-openapi/docs/GpgKey.md | 23 - forgejo-openapi/docs/GpgKeyEmail.md | 12 - forgejo-openapi/docs/Hook.md | 22 - forgejo-openapi/docs/Identity.md | 12 - forgejo-openapi/docs/InternalTracker.md | 13 - forgejo-openapi/docs/Issue.md | 35 - forgejo-openapi/docs/IssueApi.md | 2180 -- forgejo-openapi/docs/IssueConfig.md | 12 - .../docs/IssueConfigContactLink.md | 13 - forgejo-openapi/docs/IssueConfigValidation.md | 12 - forgejo-openapi/docs/IssueDeadline.md | 11 - forgejo-openapi/docs/IssueFormField.md | 15 - forgejo-openapi/docs/IssueLabelsOption.md | 12 - forgejo-openapi/docs/IssueMeta.md | 13 - forgejo-openapi/docs/IssueTemplate.md | 18 - forgejo-openapi/docs/Label.md | 17 - forgejo-openapi/docs/LabelTemplate.md | 14 - forgejo-openapi/docs/LicenseTemplateInfo.md | 15 - .../docs/LicensesTemplateListEntry.md | 13 - forgejo-openapi/docs/ListActionRunResponse.md | 12 - forgejo-openapi/docs/MarkdownOption.md | 14 - forgejo-openapi/docs/MarkupOption.md | 16 - .../docs/MergePullRequestOption.md | 18 - forgejo-openapi/docs/MigrateRepoOptions.md | 30 - forgejo-openapi/docs/Milestone.md | 20 - forgejo-openapi/docs/MiscellaneousApi.md | 364 - forgejo-openapi/docs/NewIssuePinsAllowed.md | 12 - forgejo-openapi/docs/NodeInfo.md | 17 - forgejo-openapi/docs/NodeInfoServices.md | 12 - forgejo-openapi/docs/NodeInfoSoftware.md | 14 - forgejo-openapi/docs/NodeInfoUsage.md | 13 - forgejo-openapi/docs/NodeInfoUsageUsers.md | 13 - forgejo-openapi/docs/Note.md | 12 - forgejo-openapi/docs/NoteOptions.md | 11 - forgejo-openapi/docs/NotificationApi.md | 231 - forgejo-openapi/docs/NotificationCount.md | 11 - forgejo-openapi/docs/NotificationSubject.md | 17 - forgejo-openapi/docs/NotificationThread.md | 17 - forgejo-openapi/docs/OAuth2Application.md | 17 - forgejo-openapi/docs/Organization.md | 21 - forgejo-openapi/docs/OrganizationApi.md | 1983 -- .../docs/OrganizationPermissions.md | 15 - forgejo-openapi/docs/Package.md | 19 - forgejo-openapi/docs/PackageApi.md | 200 - forgejo-openapi/docs/PackageFile.md | 17 - forgejo-openapi/docs/PayloadCommit.md | 20 - .../docs/PayloadCommitVerification.md | 15 - forgejo-openapi/docs/PayloadUser.md | 13 - forgejo-openapi/docs/Permission.md | 13 - forgejo-openapi/docs/PrBranchInfo.md | 15 - forgejo-openapi/docs/PublicKey.md | 19 - forgejo-openapi/docs/PullRequest.md | 48 - forgejo-openapi/docs/PullRequestMeta.md | 14 - forgejo-openapi/docs/PullReview.md | 24 - forgejo-openapi/docs/PullReviewComment.md | 25 - .../docs/PullReviewRequestOptions.md | 12 - forgejo-openapi/docs/PushMirror.md | 20 - forgejo-openapi/docs/QuotaGroup.md | 12 - forgejo-openapi/docs/QuotaInfo.md | 12 - forgejo-openapi/docs/QuotaRuleInfo.md | 13 - forgejo-openapi/docs/QuotaUsed.md | 11 - forgejo-openapi/docs/QuotaUsedArtifact.md | 13 - forgejo-openapi/docs/QuotaUsedAttachment.md | 14 - .../docs/QuotaUsedAttachmentContainedIn.md | 12 - forgejo-openapi/docs/QuotaUsedPackage.md | 15 - forgejo-openapi/docs/QuotaUsedSize.md | 13 - forgejo-openapi/docs/QuotaUsedSizeAssets.md | 13 - .../docs/QuotaUsedSizeAssetsAttachments.md | 12 - .../docs/QuotaUsedSizeAssetsPackages.md | 11 - forgejo-openapi/docs/QuotaUsedSizeGit.md | 11 - forgejo-openapi/docs/QuotaUsedSizeRepos.md | 12 - forgejo-openapi/docs/Reaction.md | 13 - forgejo-openapi/docs/Reference.md | 13 - forgejo-openapi/docs/RegistrationToken.md | 11 - forgejo-openapi/docs/Release.md | 28 - forgejo-openapi/docs/RenameOrgOption.md | 11 - forgejo-openapi/docs/RenameUserOption.md | 11 - forgejo-openapi/docs/ReplaceFlagsOption.md | 11 - .../docs/RepoCollaboratorPermission.md | 13 - forgejo-openapi/docs/RepoCommit.md | 16 - .../RepoCreateReleaseAttachmentRequest.md | 12 - forgejo-openapi/docs/RepoTopicOptions.md | 11 - forgejo-openapi/docs/RepoTransfer.md | 13 - forgejo-openapi/docs/Repository.md | 73 - forgejo-openapi/docs/RepositoryApi.md | 5816 ---- forgejo-openapi/docs/RepositoryMeta.md | 14 - forgejo-openapi/docs/SearchResults.md | 12 - forgejo-openapi/docs/Secret.md | 12 - forgejo-openapi/docs/ServerVersion.md | 11 - .../docs/SetUserQuotaGroupsOptions.md | 11 - forgejo-openapi/docs/SettingsApi.md | 112 - forgejo-openapi/docs/StopWatch.md | 17 - .../docs/SubmitPullReviewOptions.md | 12 - forgejo-openapi/docs/SyncForkInfo.md | 14 - forgejo-openapi/docs/Tag.md | 17 - .../docs/TagArchiveDownloadCount.md | 12 - forgejo-openapi/docs/TagProtection.md | 16 - forgejo-openapi/docs/Team.md | 19 - forgejo-openapi/docs/TeamSearchResults.md | 12 - forgejo-openapi/docs/TimelineComment.md | 39 - forgejo-openapi/docs/TopicName.md | 11 - forgejo-openapi/docs/TopicResponse.md | 15 - forgejo-openapi/docs/TopicSearchResults.md | 11 - forgejo-openapi/docs/TrackedTime.md | 17 - forgejo-openapi/docs/TransferRepoOption.md | 12 - .../docs/UpdateBranchRepoOption.md | 11 - forgejo-openapi/docs/UpdateFileOptions.md | 20 - .../docs/UpdateRepoAvatarOption.md | 11 - .../docs/UpdateUserAvatarOption.md | 11 - forgejo-openapi/docs/UpdateVariableOption.md | 12 - forgejo-openapi/docs/User.md | 33 - forgejo-openapi/docs/UserApi.md | 2219 -- forgejo-openapi/docs/UserHeatmapData.md | 12 - forgejo-openapi/docs/UserSearchResults.md | 12 - forgejo-openapi/docs/UserSettings.md | 22 - forgejo-openapi/docs/UserSettingsOptions.md | 22 - forgejo-openapi/docs/VerifyGpgKeyOption.md | 12 - forgejo-openapi/docs/WatchInfo.md | 16 - forgejo-openapi/docs/WikiCommit.md | 14 - forgejo-openapi/docs/WikiCommitList.md | 12 - forgejo-openapi/docs/WikiPage.md | 18 - forgejo-openapi/docs/WikiPageMetaData.md | 14 - forgejo-openapi/git_push.sh | 57 - forgejo-openapi/src/apis/activitypub_api.rs | 1135 - forgejo-openapi/src/apis/admin_api.rs | 4471 --- forgejo-openapi/src/apis/configuration.rs | 48 - forgejo-openapi/src/apis/issue_api.rs | 7883 ----- forgejo-openapi/src/apis/miscellaneous_api.rs | 1327 - forgejo-openapi/src/apis/mod.rs | 127 - forgejo-openapi/src/apis/notification_api.rs | 952 - forgejo-openapi/src/apis/organization_api.rs | 7066 ---- forgejo-openapi/src/apis/package_api.rs | 651 - forgejo-openapi/src/apis/repository_api.rs | 20995 ------------ forgejo-openapi/src/apis/settings_api.rs | 402 - forgejo-openapi/src/apis/user_api.rs | 8031 ----- forgejo-openapi/src/lib.rs | 11 - forgejo-openapi/src/models/access_token.rs | 38 - forgejo-openapi/src/models/action_run.rs | 118 - forgejo-openapi/src/models/action_run_job.rs | 57 - forgejo-openapi/src/models/action_task.rs | 64 - .../src/models/action_task_response.rs | 31 - forgejo-openapi/src/models/action_variable.rs | 41 - forgejo-openapi/src/models/activity.rs | 127 - forgejo-openapi/src/models/activity_pub.rs | 26 - .../src/models/add_collaborator_option.rs | 42 - forgejo-openapi/src/models/add_time_option.rs | 36 - forgejo-openapi/src/models/annotated_tag.rs | 52 - .../src/models/annotated_tag_object.rs | 34 - forgejo-openapi/src/models/api_error.rs | 31 - .../src/models/api_forbidden_error.rs | 29 - .../src/models/api_internal_server_error.rs | 29 - .../src/models/api_invalid_topics_error.rs | 29 - forgejo-openapi/src/models/api_not_found.rs | 32 - .../src/models/api_repo_archived_error.rs | 29 - .../src/models/api_unauthorized_error.rs | 29 - .../src/models/api_validation_error.rs | 29 - forgejo-openapi/src/models/attachment.rs | 66 - forgejo-openapi/src/models/blocked_user.rs | 29 - forgejo-openapi/src/models/branch.rs | 61 - .../src/models/branch_protection.rs | 167 - .../src/models/change_file_operation.rs | 61 - .../src/models/change_files_options.rs | 54 - forgejo-openapi/src/models/changed_file.rs | 52 - forgejo-openapi/src/models/combined_status.rs | 47 - forgejo-openapi/src/models/comment.rs | 58 - forgejo-openapi/src/models/commit.rs | 53 - .../src/models/commit_affected_files.rs | 31 - .../src/models/commit_date_options.rs | 31 - forgejo-openapi/src/models/commit_meta.rs | 32 - forgejo-openapi/src/models/commit_stats.rs | 34 - forgejo-openapi/src/models/commit_status.rs | 53 - forgejo-openapi/src/models/commit_user.rs | 32 - forgejo-openapi/src/models/compare.rs | 32 - .../src/models/contents_response.rs | 78 - .../src/models/create_access_token_option.rs | 28 - .../models/create_branch_protection_option.rs | 161 - .../src/models/create_branch_repo_option.rs | 37 - .../src/models/create_email_option.rs | 27 - .../src/models/create_file_options.rs | 54 - .../src/models/create_fork_option.rs | 33 - .../src/models/create_gpg_key_option.rs | 32 - .../src/models/create_hook_option.rs | 82 - .../src/models/create_issue_comment_option.rs | 31 - .../src/models/create_issue_option.rs | 55 - .../src/models/create_key_option.rs | 37 - .../src/models/create_label_option.rs | 40 - .../src/models/create_milestone_option.rs | 51 - .../create_o_auth2_application_options.rs | 37 - .../models/create_or_update_secret_option.rs | 27 - .../src/models/create_org_option.rs | 69 - .../src/models/create_pull_request_option.rs | 52 - .../src/models/create_pull_review_comment.rs | 40 - .../src/models/create_pull_review_options.rs | 38 - .../src/models/create_push_mirror_option.rs | 44 - .../src/models/create_quota_group_options.rs | 33 - .../src/models/create_quota_rule_options.rs | 37 - .../src/models/create_release_option.rs | 46 - .../src/models/create_repo_option.rs | 105 - .../src/models/create_status_option.rs | 38 - .../src/models/create_tag_option.rs | 34 - .../models/create_tag_protection_option.rs | 37 - .../src/models/create_team_option.rs | 68 - .../src/models/create_user_option.rs | 62 - .../src/models/create_variable_option.rs | 27 - .../src/models/create_wiki_page_options.rs | 37 - forgejo-openapi/src/models/cron.rs | 40 - .../src/models/delete_email_option.rs | 27 - .../src/models/delete_file_options.rs | 54 - .../src/models/delete_labels_option.rs | 26 - forgejo-openapi/src/models/deploy_key.rs | 52 - .../src/models/dismiss_pull_review_options.rs | 31 - .../src/models/dispatch_workflow_option.rs | 37 - .../src/models/dispatch_workflow_run.rs | 37 - .../src/models/edit_attachment_options.rs | 35 - .../models/edit_branch_protection_option.rs | 154 - .../src/models/edit_deadline_option.rs | 26 - .../src/models/edit_git_hook_option.rs | 26 - .../src/models/edit_hook_option.rs | 43 - .../src/models/edit_issue_comment_option.rs | 31 - .../src/models/edit_issue_option.rs | 56 - .../src/models/edit_label_option.rs | 40 - .../src/models/edit_milestone_option.rs | 37 - forgejo-openapi/src/models/edit_org_option.rs | 66 - .../src/models/edit_pull_request_option.rs | 61 - .../src/models/edit_quota_rule_options.rs | 33 - .../src/models/edit_reaction_option.rs | 26 - .../src/models/edit_release_option.rs | 46 - .../src/models/edit_repo_option.rs | 191 - .../src/models/edit_tag_protection_option.rs | 37 - .../src/models/edit_team_option.rs | 68 - .../src/models/edit_user_option.rs | 91 - forgejo-openapi/src/models/email.rs | 40 - .../src/models/external_tracker.rs | 53 - forgejo-openapi/src/models/external_wiki.rs | 29 - .../src/models/file_commit_response.rs | 50 - .../src/models/file_delete_response.rs | 34 - .../src/models/file_links_response.rs | 34 - forgejo-openapi/src/models/file_response.rs | 34 - forgejo-openapi/src/models/files_response.rs | 34 - .../src/models/general_api_settings.rs | 43 - .../src/models/general_attachment_settings.rs | 37 - .../src/models/general_repo_settings.rs | 52 - .../src/models/general_ui_settings.rs | 34 - .../src/models/generate_repo_option.rs | 73 - forgejo-openapi/src/models/git_blob.rs | 40 - forgejo-openapi/src/models/git_entry.rs | 43 - forgejo-openapi/src/models/git_hook.rs | 34 - forgejo-openapi/src/models/git_object.rs | 32 - .../src/models/git_tree_response.rs | 43 - .../src/models/gitignore_template_info.rs | 31 - forgejo-openapi/src/models/gpg_key.rs | 67 - forgejo-openapi/src/models/gpg_key_email.rs | 31 - forgejo-openapi/src/models/hook.rs | 65 - forgejo-openapi/src/models/identity.rs | 31 - .../src/models/internal_tracker.rs | 46 - forgejo-openapi/src/models/issue.rs | 101 - forgejo-openapi/src/models/issue_config.rs | 32 - .../src/models/issue_config_contact_link.rs | 32 - .../src/models/issue_config_validation.rs | 29 - forgejo-openapi/src/models/issue_deadline.rs | 26 - .../src/models/issue_form_field.rs | 40 - .../src/models/issue_labels_option.rs | 32 - forgejo-openapi/src/models/issue_meta.rs | 34 - forgejo-openapi/src/models/issue_template.rs | 49 - forgejo-openapi/src/models/label.rs | 46 - forgejo-openapi/src/models/label_template.rs | 37 - .../src/models/license_template_info.rs | 40 - .../models/licenses_template_list_entry.rs | 34 - .../src/models/list_action_run_response.rs | 31 - forgejo-openapi/src/models/markdown_option.rs | 41 - forgejo-openapi/src/models/markup_option.rs | 49 - .../src/models/merge_pull_request_option.rs | 77 - .../src/models/migrate_repo_options.rs | 113 - forgejo-openapi/src/models/milestone.rs | 56 - forgejo-openapi/src/models/mod.rs | 456 - .../src/models/new_issue_pins_allowed.rs | 31 - forgejo-openapi/src/models/node_info.rs | 46 - .../src/models/node_info_services.rs | 31 - .../src/models/node_info_software.rs | 37 - forgejo-openapi/src/models/node_info_usage.rs | 34 - .../src/models/node_info_usage_users.rs | 34 - forgejo-openapi/src/models/note.rs | 31 - forgejo-openapi/src/models/note_options.rs | 24 - .../src/models/notification_count.rs | 26 - .../src/models/notification_subject.rs | 51 - .../src/models/notification_thread.rs | 46 - .../src/models/o_auth2_application.rs | 47 - forgejo-openapi/src/models/organization.rs | 62 - .../src/models/organization_permissions.rs | 43 - forgejo-openapi/src/models/package.rs | 52 - forgejo-openapi/src/models/package_file.rs | 46 - forgejo-openapi/src/models/payload_commit.rs | 56 - .../src/models/payload_commit_verification.rs | 40 - forgejo-openapi/src/models/payload_user.rs | 35 - forgejo-openapi/src/models/permission.rs | 34 - forgejo-openapi/src/models/pr_branch_info.rs | 40 - forgejo-openapi/src/models/public_key.rs | 52 - forgejo-openapi/src/models/pull_request.rs | 150 - .../src/models/pull_request_meta.rs | 37 - forgejo-openapi/src/models/pull_review.rs | 68 - .../src/models/pull_review_comment.rs | 73 - .../src/models/pull_review_request_options.rs | 31 - forgejo-openapi/src/models/push_mirror.rs | 55 - forgejo-openapi/src/models/quota_group.rs | 33 - forgejo-openapi/src/models/quota_info.rs | 32 - forgejo-openapi/src/models/quota_rule_info.rs | 37 - forgejo-openapi/src/models/quota_used.rs | 26 - .../src/models/quota_used_artifact.rs | 37 - .../src/models/quota_used_attachment.rs | 40 - .../quota_used_attachment_contained_in.rs | 33 - .../src/models/quota_used_package.rs | 45 - forgejo-openapi/src/models/quota_used_size.rs | 34 - .../src/models/quota_used_size_assets.rs | 35 - .../quota_used_size_assets_attachments.rs | 33 - .../models/quota_used_size_assets_packages.rs | 27 - .../src/models/quota_used_size_git.rs | 27 - .../src/models/quota_used_size_repos.rs | 33 - forgejo-openapi/src/models/reaction.rs | 34 - forgejo-openapi/src/models/reference.rs | 32 - .../src/models/registration_token.rs | 26 - forgejo-openapi/src/models/release.rs | 82 - .../src/models/rename_org_option.rs | 27 - .../src/models/rename_user_option.rs | 27 - .../src/models/replace_flags_option.rs | 26 - .../models/repo_collaborator_permission.rs | 34 - forgejo-openapi/src/models/repo_commit.rs | 41 - .../repo_create_release_attachment_request.rs | 31 - .../src/models/repo_topic_options.rs | 27 - forgejo-openapi/src/models/repo_transfer.rs | 34 - forgejo-openapi/src/models/repository.rs | 259 - forgejo-openapi/src/models/repository_meta.rs | 37 - forgejo-openapi/src/models/search_results.rs | 31 - forgejo-openapi/src/models/secret.rs | 32 - forgejo-openapi/src/models/server_version.rs | 26 - .../models/set_user_quota_groups_options.rs | 27 - forgejo-openapi/src/models/stop_watch.rs | 46 - .../src/models/submit_pull_review_options.rs | 32 - forgejo-openapi/src/models/sync_fork_info.rs | 37 - forgejo-openapi/src/models/tag.rs | 49 - .../src/models/tag_archive_download_count.rs | 31 - forgejo-openapi/src/models/tag_protection.rs | 46 - forgejo-openapi/src/models/team.rs | 78 - .../src/models/team_search_results.rs | 29 - .../src/models/timeline_comment.rs | 114 - forgejo-openapi/src/models/topic_name.rs | 26 - forgejo-openapi/src/models/topic_response.rs | 40 - .../src/models/topic_search_results.rs | 24 - forgejo-openapi/src/models/tracked_time.rs | 49 - .../src/models/transfer_repo_option.rs | 32 - .../src/models/update_branch_repo_option.rs | 27 - .../src/models/update_file_options.rs | 62 - .../src/models/update_repo_avatar_option.rs | 27 - .../src/models/update_user_avatar_option.rs | 27 - .../src/models/update_variable_option.rs | 30 - forgejo-openapi/src/models/user.rs | 115 - .../src/models/user_heatmap_data.rs | 32 - .../src/models/user_search_results.rs | 29 - forgejo-openapi/src/models/user_settings.rs | 65 - .../src/models/user_settings_options.rs | 65 - .../src/models/verify_gpg_key_option.rs | 32 - forgejo-openapi/src/models/watch_info.rs | 43 - forgejo-openapi/src/models/wiki_commit.rs | 37 - .../src/models/wiki_commit_list.rs | 31 - forgejo-openapi/src/models/wiki_page.rs | 50 - .../src/models/wiki_page_meta_data.rs | 37 - forgejo-openapi/swagger.v1.json | 28347 ---------------- 490 files changed, 3 insertions(+), 112147 deletions(-) delete mode 100644 forgejo-openapi/.gitignore delete mode 100644 forgejo-openapi/.openapi-generator-ignore delete mode 100644 forgejo-openapi/.openapi-generator/FILES delete mode 100644 forgejo-openapi/.openapi-generator/VERSION delete mode 100644 forgejo-openapi/.travis.yml delete mode 100644 forgejo-openapi/Cargo.toml delete mode 100644 forgejo-openapi/README.md delete mode 100644 forgejo-openapi/docs/AccessToken.md delete mode 100644 forgejo-openapi/docs/ActionRun.md delete mode 100644 forgejo-openapi/docs/ActionRunJob.md delete mode 100644 forgejo-openapi/docs/ActionTask.md delete mode 100644 forgejo-openapi/docs/ActionTaskResponse.md delete mode 100644 forgejo-openapi/docs/ActionVariable.md delete mode 100644 forgejo-openapi/docs/Activity.md delete mode 100644 forgejo-openapi/docs/ActivityPub.md delete mode 100644 forgejo-openapi/docs/ActivitypubApi.md delete mode 100644 forgejo-openapi/docs/AddCollaboratorOption.md delete mode 100644 forgejo-openapi/docs/AddTimeOption.md delete mode 100644 forgejo-openapi/docs/AdminApi.md delete mode 100644 forgejo-openapi/docs/AnnotatedTag.md delete mode 100644 forgejo-openapi/docs/AnnotatedTagObject.md delete mode 100644 forgejo-openapi/docs/ApiError.md delete mode 100644 forgejo-openapi/docs/ApiForbiddenError.md delete mode 100644 forgejo-openapi/docs/ApiInternalServerError.md delete mode 100644 forgejo-openapi/docs/ApiInvalidTopicsError.md delete mode 100644 forgejo-openapi/docs/ApiNotFound.md delete mode 100644 forgejo-openapi/docs/ApiRepoArchivedError.md delete mode 100644 forgejo-openapi/docs/ApiUnauthorizedError.md delete mode 100644 forgejo-openapi/docs/ApiValidationError.md delete mode 100644 forgejo-openapi/docs/Attachment.md delete mode 100644 forgejo-openapi/docs/BlockedUser.md delete mode 100644 forgejo-openapi/docs/Branch.md delete mode 100644 forgejo-openapi/docs/BranchProtection.md delete mode 100644 forgejo-openapi/docs/ChangeFileOperation.md delete mode 100644 forgejo-openapi/docs/ChangeFilesOptions.md delete mode 100644 forgejo-openapi/docs/ChangedFile.md delete mode 100644 forgejo-openapi/docs/CombinedStatus.md delete mode 100644 forgejo-openapi/docs/Comment.md delete mode 100644 forgejo-openapi/docs/Commit.md delete mode 100644 forgejo-openapi/docs/CommitAffectedFiles.md delete mode 100644 forgejo-openapi/docs/CommitDateOptions.md delete mode 100644 forgejo-openapi/docs/CommitMeta.md delete mode 100644 forgejo-openapi/docs/CommitStats.md delete mode 100644 forgejo-openapi/docs/CommitStatus.md delete mode 100644 forgejo-openapi/docs/CommitUser.md delete mode 100644 forgejo-openapi/docs/Compare.md delete mode 100644 forgejo-openapi/docs/ContentsResponse.md delete mode 100644 forgejo-openapi/docs/CreateAccessTokenOption.md delete mode 100644 forgejo-openapi/docs/CreateBranchProtectionOption.md delete mode 100644 forgejo-openapi/docs/CreateBranchRepoOption.md delete mode 100644 forgejo-openapi/docs/CreateEmailOption.md delete mode 100644 forgejo-openapi/docs/CreateFileOptions.md delete mode 100644 forgejo-openapi/docs/CreateForkOption.md delete mode 100644 forgejo-openapi/docs/CreateGpgKeyOption.md delete mode 100644 forgejo-openapi/docs/CreateHookOption.md delete mode 100644 forgejo-openapi/docs/CreateIssueCommentOption.md delete mode 100644 forgejo-openapi/docs/CreateIssueOption.md delete mode 100644 forgejo-openapi/docs/CreateKeyOption.md delete mode 100644 forgejo-openapi/docs/CreateLabelOption.md delete mode 100644 forgejo-openapi/docs/CreateMilestoneOption.md delete mode 100644 forgejo-openapi/docs/CreateOAuth2ApplicationOptions.md delete mode 100644 forgejo-openapi/docs/CreateOrUpdateSecretOption.md delete mode 100644 forgejo-openapi/docs/CreateOrgOption.md delete mode 100644 forgejo-openapi/docs/CreatePullRequestOption.md delete mode 100644 forgejo-openapi/docs/CreatePullReviewComment.md delete mode 100644 forgejo-openapi/docs/CreatePullReviewOptions.md delete mode 100644 forgejo-openapi/docs/CreatePushMirrorOption.md delete mode 100644 forgejo-openapi/docs/CreateQuotaGroupOptions.md delete mode 100644 forgejo-openapi/docs/CreateQuotaRuleOptions.md delete mode 100644 forgejo-openapi/docs/CreateReleaseOption.md delete mode 100644 forgejo-openapi/docs/CreateRepoOption.md delete mode 100644 forgejo-openapi/docs/CreateStatusOption.md delete mode 100644 forgejo-openapi/docs/CreateTagOption.md delete mode 100644 forgejo-openapi/docs/CreateTagProtectionOption.md delete mode 100644 forgejo-openapi/docs/CreateTeamOption.md delete mode 100644 forgejo-openapi/docs/CreateUserOption.md delete mode 100644 forgejo-openapi/docs/CreateVariableOption.md delete mode 100644 forgejo-openapi/docs/CreateWikiPageOptions.md delete mode 100644 forgejo-openapi/docs/Cron.md delete mode 100644 forgejo-openapi/docs/DeleteEmailOption.md delete mode 100644 forgejo-openapi/docs/DeleteFileOptions.md delete mode 100644 forgejo-openapi/docs/DeleteLabelsOption.md delete mode 100644 forgejo-openapi/docs/DeployKey.md delete mode 100644 forgejo-openapi/docs/DismissPullReviewOptions.md delete mode 100644 forgejo-openapi/docs/DispatchWorkflowOption.md delete mode 100644 forgejo-openapi/docs/DispatchWorkflowRun.md delete mode 100644 forgejo-openapi/docs/EditAttachmentOptions.md delete mode 100644 forgejo-openapi/docs/EditBranchProtectionOption.md delete mode 100644 forgejo-openapi/docs/EditDeadlineOption.md delete mode 100644 forgejo-openapi/docs/EditGitHookOption.md delete mode 100644 forgejo-openapi/docs/EditHookOption.md delete mode 100644 forgejo-openapi/docs/EditIssueCommentOption.md delete mode 100644 forgejo-openapi/docs/EditIssueOption.md delete mode 100644 forgejo-openapi/docs/EditLabelOption.md delete mode 100644 forgejo-openapi/docs/EditMilestoneOption.md delete mode 100644 forgejo-openapi/docs/EditOrgOption.md delete mode 100644 forgejo-openapi/docs/EditPullRequestOption.md delete mode 100644 forgejo-openapi/docs/EditQuotaRuleOptions.md delete mode 100644 forgejo-openapi/docs/EditReactionOption.md delete mode 100644 forgejo-openapi/docs/EditReleaseOption.md delete mode 100644 forgejo-openapi/docs/EditRepoOption.md delete mode 100644 forgejo-openapi/docs/EditTagProtectionOption.md delete mode 100644 forgejo-openapi/docs/EditTeamOption.md delete mode 100644 forgejo-openapi/docs/EditUserOption.md delete mode 100644 forgejo-openapi/docs/Email.md delete mode 100644 forgejo-openapi/docs/ExternalTracker.md delete mode 100644 forgejo-openapi/docs/ExternalWiki.md delete mode 100644 forgejo-openapi/docs/FileCommitResponse.md delete mode 100644 forgejo-openapi/docs/FileDeleteResponse.md delete mode 100644 forgejo-openapi/docs/FileLinksResponse.md delete mode 100644 forgejo-openapi/docs/FileResponse.md delete mode 100644 forgejo-openapi/docs/FilesResponse.md delete mode 100644 forgejo-openapi/docs/GeneralApiSettings.md delete mode 100644 forgejo-openapi/docs/GeneralAttachmentSettings.md delete mode 100644 forgejo-openapi/docs/GeneralRepoSettings.md delete mode 100644 forgejo-openapi/docs/GeneralUiSettings.md delete mode 100644 forgejo-openapi/docs/GenerateRepoOption.md delete mode 100644 forgejo-openapi/docs/GitBlob.md delete mode 100644 forgejo-openapi/docs/GitEntry.md delete mode 100644 forgejo-openapi/docs/GitHook.md delete mode 100644 forgejo-openapi/docs/GitObject.md delete mode 100644 forgejo-openapi/docs/GitTreeResponse.md delete mode 100644 forgejo-openapi/docs/GitignoreTemplateInfo.md delete mode 100644 forgejo-openapi/docs/GpgKey.md delete mode 100644 forgejo-openapi/docs/GpgKeyEmail.md delete mode 100644 forgejo-openapi/docs/Hook.md delete mode 100644 forgejo-openapi/docs/Identity.md delete mode 100644 forgejo-openapi/docs/InternalTracker.md delete mode 100644 forgejo-openapi/docs/Issue.md delete mode 100644 forgejo-openapi/docs/IssueApi.md delete mode 100644 forgejo-openapi/docs/IssueConfig.md delete mode 100644 forgejo-openapi/docs/IssueConfigContactLink.md delete mode 100644 forgejo-openapi/docs/IssueConfigValidation.md delete mode 100644 forgejo-openapi/docs/IssueDeadline.md delete mode 100644 forgejo-openapi/docs/IssueFormField.md delete mode 100644 forgejo-openapi/docs/IssueLabelsOption.md delete mode 100644 forgejo-openapi/docs/IssueMeta.md delete mode 100644 forgejo-openapi/docs/IssueTemplate.md delete mode 100644 forgejo-openapi/docs/Label.md delete mode 100644 forgejo-openapi/docs/LabelTemplate.md delete mode 100644 forgejo-openapi/docs/LicenseTemplateInfo.md delete mode 100644 forgejo-openapi/docs/LicensesTemplateListEntry.md delete mode 100644 forgejo-openapi/docs/ListActionRunResponse.md delete mode 100644 forgejo-openapi/docs/MarkdownOption.md delete mode 100644 forgejo-openapi/docs/MarkupOption.md delete mode 100644 forgejo-openapi/docs/MergePullRequestOption.md delete mode 100644 forgejo-openapi/docs/MigrateRepoOptions.md delete mode 100644 forgejo-openapi/docs/Milestone.md delete mode 100644 forgejo-openapi/docs/MiscellaneousApi.md delete mode 100644 forgejo-openapi/docs/NewIssuePinsAllowed.md delete mode 100644 forgejo-openapi/docs/NodeInfo.md delete mode 100644 forgejo-openapi/docs/NodeInfoServices.md delete mode 100644 forgejo-openapi/docs/NodeInfoSoftware.md delete mode 100644 forgejo-openapi/docs/NodeInfoUsage.md delete mode 100644 forgejo-openapi/docs/NodeInfoUsageUsers.md delete mode 100644 forgejo-openapi/docs/Note.md delete mode 100644 forgejo-openapi/docs/NoteOptions.md delete mode 100644 forgejo-openapi/docs/NotificationApi.md delete mode 100644 forgejo-openapi/docs/NotificationCount.md delete mode 100644 forgejo-openapi/docs/NotificationSubject.md delete mode 100644 forgejo-openapi/docs/NotificationThread.md delete mode 100644 forgejo-openapi/docs/OAuth2Application.md delete mode 100644 forgejo-openapi/docs/Organization.md delete mode 100644 forgejo-openapi/docs/OrganizationApi.md delete mode 100644 forgejo-openapi/docs/OrganizationPermissions.md delete mode 100644 forgejo-openapi/docs/Package.md delete mode 100644 forgejo-openapi/docs/PackageApi.md delete mode 100644 forgejo-openapi/docs/PackageFile.md delete mode 100644 forgejo-openapi/docs/PayloadCommit.md delete mode 100644 forgejo-openapi/docs/PayloadCommitVerification.md delete mode 100644 forgejo-openapi/docs/PayloadUser.md delete mode 100644 forgejo-openapi/docs/Permission.md delete mode 100644 forgejo-openapi/docs/PrBranchInfo.md delete mode 100644 forgejo-openapi/docs/PublicKey.md delete mode 100644 forgejo-openapi/docs/PullRequest.md delete mode 100644 forgejo-openapi/docs/PullRequestMeta.md delete mode 100644 forgejo-openapi/docs/PullReview.md delete mode 100644 forgejo-openapi/docs/PullReviewComment.md delete mode 100644 forgejo-openapi/docs/PullReviewRequestOptions.md delete mode 100644 forgejo-openapi/docs/PushMirror.md delete mode 100644 forgejo-openapi/docs/QuotaGroup.md delete mode 100644 forgejo-openapi/docs/QuotaInfo.md delete mode 100644 forgejo-openapi/docs/QuotaRuleInfo.md delete mode 100644 forgejo-openapi/docs/QuotaUsed.md delete mode 100644 forgejo-openapi/docs/QuotaUsedArtifact.md delete mode 100644 forgejo-openapi/docs/QuotaUsedAttachment.md delete mode 100644 forgejo-openapi/docs/QuotaUsedAttachmentContainedIn.md delete mode 100644 forgejo-openapi/docs/QuotaUsedPackage.md delete mode 100644 forgejo-openapi/docs/QuotaUsedSize.md delete mode 100644 forgejo-openapi/docs/QuotaUsedSizeAssets.md delete mode 100644 forgejo-openapi/docs/QuotaUsedSizeAssetsAttachments.md delete mode 100644 forgejo-openapi/docs/QuotaUsedSizeAssetsPackages.md delete mode 100644 forgejo-openapi/docs/QuotaUsedSizeGit.md delete mode 100644 forgejo-openapi/docs/QuotaUsedSizeRepos.md delete mode 100644 forgejo-openapi/docs/Reaction.md delete mode 100644 forgejo-openapi/docs/Reference.md delete mode 100644 forgejo-openapi/docs/RegistrationToken.md delete mode 100644 forgejo-openapi/docs/Release.md delete mode 100644 forgejo-openapi/docs/RenameOrgOption.md delete mode 100644 forgejo-openapi/docs/RenameUserOption.md delete mode 100644 forgejo-openapi/docs/ReplaceFlagsOption.md delete mode 100644 forgejo-openapi/docs/RepoCollaboratorPermission.md delete mode 100644 forgejo-openapi/docs/RepoCommit.md delete mode 100644 forgejo-openapi/docs/RepoCreateReleaseAttachmentRequest.md delete mode 100644 forgejo-openapi/docs/RepoTopicOptions.md delete mode 100644 forgejo-openapi/docs/RepoTransfer.md delete mode 100644 forgejo-openapi/docs/Repository.md delete mode 100644 forgejo-openapi/docs/RepositoryApi.md delete mode 100644 forgejo-openapi/docs/RepositoryMeta.md delete mode 100644 forgejo-openapi/docs/SearchResults.md delete mode 100644 forgejo-openapi/docs/Secret.md delete mode 100644 forgejo-openapi/docs/ServerVersion.md delete mode 100644 forgejo-openapi/docs/SetUserQuotaGroupsOptions.md delete mode 100644 forgejo-openapi/docs/SettingsApi.md delete mode 100644 forgejo-openapi/docs/StopWatch.md delete mode 100644 forgejo-openapi/docs/SubmitPullReviewOptions.md delete mode 100644 forgejo-openapi/docs/SyncForkInfo.md delete mode 100644 forgejo-openapi/docs/Tag.md delete mode 100644 forgejo-openapi/docs/TagArchiveDownloadCount.md delete mode 100644 forgejo-openapi/docs/TagProtection.md delete mode 100644 forgejo-openapi/docs/Team.md delete mode 100644 forgejo-openapi/docs/TeamSearchResults.md delete mode 100644 forgejo-openapi/docs/TimelineComment.md delete mode 100644 forgejo-openapi/docs/TopicName.md delete mode 100644 forgejo-openapi/docs/TopicResponse.md delete mode 100644 forgejo-openapi/docs/TopicSearchResults.md delete mode 100644 forgejo-openapi/docs/TrackedTime.md delete mode 100644 forgejo-openapi/docs/TransferRepoOption.md delete mode 100644 forgejo-openapi/docs/UpdateBranchRepoOption.md delete mode 100644 forgejo-openapi/docs/UpdateFileOptions.md delete mode 100644 forgejo-openapi/docs/UpdateRepoAvatarOption.md delete mode 100644 forgejo-openapi/docs/UpdateUserAvatarOption.md delete mode 100644 forgejo-openapi/docs/UpdateVariableOption.md delete mode 100644 forgejo-openapi/docs/User.md delete mode 100644 forgejo-openapi/docs/UserApi.md delete mode 100644 forgejo-openapi/docs/UserHeatmapData.md delete mode 100644 forgejo-openapi/docs/UserSearchResults.md delete mode 100644 forgejo-openapi/docs/UserSettings.md delete mode 100644 forgejo-openapi/docs/UserSettingsOptions.md delete mode 100644 forgejo-openapi/docs/VerifyGpgKeyOption.md delete mode 100644 forgejo-openapi/docs/WatchInfo.md delete mode 100644 forgejo-openapi/docs/WikiCommit.md delete mode 100644 forgejo-openapi/docs/WikiCommitList.md delete mode 100644 forgejo-openapi/docs/WikiPage.md delete mode 100644 forgejo-openapi/docs/WikiPageMetaData.md delete mode 100644 forgejo-openapi/git_push.sh delete mode 100644 forgejo-openapi/src/apis/activitypub_api.rs delete mode 100644 forgejo-openapi/src/apis/admin_api.rs delete mode 100644 forgejo-openapi/src/apis/configuration.rs delete mode 100644 forgejo-openapi/src/apis/issue_api.rs delete mode 100644 forgejo-openapi/src/apis/miscellaneous_api.rs delete mode 100644 forgejo-openapi/src/apis/mod.rs delete mode 100644 forgejo-openapi/src/apis/notification_api.rs delete mode 100644 forgejo-openapi/src/apis/organization_api.rs delete mode 100644 forgejo-openapi/src/apis/package_api.rs delete mode 100644 forgejo-openapi/src/apis/repository_api.rs delete mode 100644 forgejo-openapi/src/apis/settings_api.rs delete mode 100644 forgejo-openapi/src/apis/user_api.rs delete mode 100644 forgejo-openapi/src/lib.rs delete mode 100644 forgejo-openapi/src/models/access_token.rs delete mode 100644 forgejo-openapi/src/models/action_run.rs delete mode 100644 forgejo-openapi/src/models/action_run_job.rs delete mode 100644 forgejo-openapi/src/models/action_task.rs delete mode 100644 forgejo-openapi/src/models/action_task_response.rs delete mode 100644 forgejo-openapi/src/models/action_variable.rs delete mode 100644 forgejo-openapi/src/models/activity.rs delete mode 100644 forgejo-openapi/src/models/activity_pub.rs delete mode 100644 forgejo-openapi/src/models/add_collaborator_option.rs delete mode 100644 forgejo-openapi/src/models/add_time_option.rs delete mode 100644 forgejo-openapi/src/models/annotated_tag.rs delete mode 100644 forgejo-openapi/src/models/annotated_tag_object.rs delete mode 100644 forgejo-openapi/src/models/api_error.rs delete mode 100644 forgejo-openapi/src/models/api_forbidden_error.rs delete mode 100644 forgejo-openapi/src/models/api_internal_server_error.rs delete mode 100644 forgejo-openapi/src/models/api_invalid_topics_error.rs delete mode 100644 forgejo-openapi/src/models/api_not_found.rs delete mode 100644 forgejo-openapi/src/models/api_repo_archived_error.rs delete mode 100644 forgejo-openapi/src/models/api_unauthorized_error.rs delete mode 100644 forgejo-openapi/src/models/api_validation_error.rs delete mode 100644 forgejo-openapi/src/models/attachment.rs delete mode 100644 forgejo-openapi/src/models/blocked_user.rs delete mode 100644 forgejo-openapi/src/models/branch.rs delete mode 100644 forgejo-openapi/src/models/branch_protection.rs delete mode 100644 forgejo-openapi/src/models/change_file_operation.rs delete mode 100644 forgejo-openapi/src/models/change_files_options.rs delete mode 100644 forgejo-openapi/src/models/changed_file.rs delete mode 100644 forgejo-openapi/src/models/combined_status.rs delete mode 100644 forgejo-openapi/src/models/comment.rs delete mode 100644 forgejo-openapi/src/models/commit.rs delete mode 100644 forgejo-openapi/src/models/commit_affected_files.rs delete mode 100644 forgejo-openapi/src/models/commit_date_options.rs delete mode 100644 forgejo-openapi/src/models/commit_meta.rs delete mode 100644 forgejo-openapi/src/models/commit_stats.rs delete mode 100644 forgejo-openapi/src/models/commit_status.rs delete mode 100644 forgejo-openapi/src/models/commit_user.rs delete mode 100644 forgejo-openapi/src/models/compare.rs delete mode 100644 forgejo-openapi/src/models/contents_response.rs delete mode 100644 forgejo-openapi/src/models/create_access_token_option.rs delete mode 100644 forgejo-openapi/src/models/create_branch_protection_option.rs delete mode 100644 forgejo-openapi/src/models/create_branch_repo_option.rs delete mode 100644 forgejo-openapi/src/models/create_email_option.rs delete mode 100644 forgejo-openapi/src/models/create_file_options.rs delete mode 100644 forgejo-openapi/src/models/create_fork_option.rs delete mode 100644 forgejo-openapi/src/models/create_gpg_key_option.rs delete mode 100644 forgejo-openapi/src/models/create_hook_option.rs delete mode 100644 forgejo-openapi/src/models/create_issue_comment_option.rs delete mode 100644 forgejo-openapi/src/models/create_issue_option.rs delete mode 100644 forgejo-openapi/src/models/create_key_option.rs delete mode 100644 forgejo-openapi/src/models/create_label_option.rs delete mode 100644 forgejo-openapi/src/models/create_milestone_option.rs delete mode 100644 forgejo-openapi/src/models/create_o_auth2_application_options.rs delete mode 100644 forgejo-openapi/src/models/create_or_update_secret_option.rs delete mode 100644 forgejo-openapi/src/models/create_org_option.rs delete mode 100644 forgejo-openapi/src/models/create_pull_request_option.rs delete mode 100644 forgejo-openapi/src/models/create_pull_review_comment.rs delete mode 100644 forgejo-openapi/src/models/create_pull_review_options.rs delete mode 100644 forgejo-openapi/src/models/create_push_mirror_option.rs delete mode 100644 forgejo-openapi/src/models/create_quota_group_options.rs delete mode 100644 forgejo-openapi/src/models/create_quota_rule_options.rs delete mode 100644 forgejo-openapi/src/models/create_release_option.rs delete mode 100644 forgejo-openapi/src/models/create_repo_option.rs delete mode 100644 forgejo-openapi/src/models/create_status_option.rs delete mode 100644 forgejo-openapi/src/models/create_tag_option.rs delete mode 100644 forgejo-openapi/src/models/create_tag_protection_option.rs delete mode 100644 forgejo-openapi/src/models/create_team_option.rs delete mode 100644 forgejo-openapi/src/models/create_user_option.rs delete mode 100644 forgejo-openapi/src/models/create_variable_option.rs delete mode 100644 forgejo-openapi/src/models/create_wiki_page_options.rs delete mode 100644 forgejo-openapi/src/models/cron.rs delete mode 100644 forgejo-openapi/src/models/delete_email_option.rs delete mode 100644 forgejo-openapi/src/models/delete_file_options.rs delete mode 100644 forgejo-openapi/src/models/delete_labels_option.rs delete mode 100644 forgejo-openapi/src/models/deploy_key.rs delete mode 100644 forgejo-openapi/src/models/dismiss_pull_review_options.rs delete mode 100644 forgejo-openapi/src/models/dispatch_workflow_option.rs delete mode 100644 forgejo-openapi/src/models/dispatch_workflow_run.rs delete mode 100644 forgejo-openapi/src/models/edit_attachment_options.rs delete mode 100644 forgejo-openapi/src/models/edit_branch_protection_option.rs delete mode 100644 forgejo-openapi/src/models/edit_deadline_option.rs delete mode 100644 forgejo-openapi/src/models/edit_git_hook_option.rs delete mode 100644 forgejo-openapi/src/models/edit_hook_option.rs delete mode 100644 forgejo-openapi/src/models/edit_issue_comment_option.rs delete mode 100644 forgejo-openapi/src/models/edit_issue_option.rs delete mode 100644 forgejo-openapi/src/models/edit_label_option.rs delete mode 100644 forgejo-openapi/src/models/edit_milestone_option.rs delete mode 100644 forgejo-openapi/src/models/edit_org_option.rs delete mode 100644 forgejo-openapi/src/models/edit_pull_request_option.rs delete mode 100644 forgejo-openapi/src/models/edit_quota_rule_options.rs delete mode 100644 forgejo-openapi/src/models/edit_reaction_option.rs delete mode 100644 forgejo-openapi/src/models/edit_release_option.rs delete mode 100644 forgejo-openapi/src/models/edit_repo_option.rs delete mode 100644 forgejo-openapi/src/models/edit_tag_protection_option.rs delete mode 100644 forgejo-openapi/src/models/edit_team_option.rs delete mode 100644 forgejo-openapi/src/models/edit_user_option.rs delete mode 100644 forgejo-openapi/src/models/email.rs delete mode 100644 forgejo-openapi/src/models/external_tracker.rs delete mode 100644 forgejo-openapi/src/models/external_wiki.rs delete mode 100644 forgejo-openapi/src/models/file_commit_response.rs delete mode 100644 forgejo-openapi/src/models/file_delete_response.rs delete mode 100644 forgejo-openapi/src/models/file_links_response.rs delete mode 100644 forgejo-openapi/src/models/file_response.rs delete mode 100644 forgejo-openapi/src/models/files_response.rs delete mode 100644 forgejo-openapi/src/models/general_api_settings.rs delete mode 100644 forgejo-openapi/src/models/general_attachment_settings.rs delete mode 100644 forgejo-openapi/src/models/general_repo_settings.rs delete mode 100644 forgejo-openapi/src/models/general_ui_settings.rs delete mode 100644 forgejo-openapi/src/models/generate_repo_option.rs delete mode 100644 forgejo-openapi/src/models/git_blob.rs delete mode 100644 forgejo-openapi/src/models/git_entry.rs delete mode 100644 forgejo-openapi/src/models/git_hook.rs delete mode 100644 forgejo-openapi/src/models/git_object.rs delete mode 100644 forgejo-openapi/src/models/git_tree_response.rs delete mode 100644 forgejo-openapi/src/models/gitignore_template_info.rs delete mode 100644 forgejo-openapi/src/models/gpg_key.rs delete mode 100644 forgejo-openapi/src/models/gpg_key_email.rs delete mode 100644 forgejo-openapi/src/models/hook.rs delete mode 100644 forgejo-openapi/src/models/identity.rs delete mode 100644 forgejo-openapi/src/models/internal_tracker.rs delete mode 100644 forgejo-openapi/src/models/issue.rs delete mode 100644 forgejo-openapi/src/models/issue_config.rs delete mode 100644 forgejo-openapi/src/models/issue_config_contact_link.rs delete mode 100644 forgejo-openapi/src/models/issue_config_validation.rs delete mode 100644 forgejo-openapi/src/models/issue_deadline.rs delete mode 100644 forgejo-openapi/src/models/issue_form_field.rs delete mode 100644 forgejo-openapi/src/models/issue_labels_option.rs delete mode 100644 forgejo-openapi/src/models/issue_meta.rs delete mode 100644 forgejo-openapi/src/models/issue_template.rs delete mode 100644 forgejo-openapi/src/models/label.rs delete mode 100644 forgejo-openapi/src/models/label_template.rs delete mode 100644 forgejo-openapi/src/models/license_template_info.rs delete mode 100644 forgejo-openapi/src/models/licenses_template_list_entry.rs delete mode 100644 forgejo-openapi/src/models/list_action_run_response.rs delete mode 100644 forgejo-openapi/src/models/markdown_option.rs delete mode 100644 forgejo-openapi/src/models/markup_option.rs delete mode 100644 forgejo-openapi/src/models/merge_pull_request_option.rs delete mode 100644 forgejo-openapi/src/models/migrate_repo_options.rs delete mode 100644 forgejo-openapi/src/models/milestone.rs delete mode 100644 forgejo-openapi/src/models/mod.rs delete mode 100644 forgejo-openapi/src/models/new_issue_pins_allowed.rs delete mode 100644 forgejo-openapi/src/models/node_info.rs delete mode 100644 forgejo-openapi/src/models/node_info_services.rs delete mode 100644 forgejo-openapi/src/models/node_info_software.rs delete mode 100644 forgejo-openapi/src/models/node_info_usage.rs delete mode 100644 forgejo-openapi/src/models/node_info_usage_users.rs delete mode 100644 forgejo-openapi/src/models/note.rs delete mode 100644 forgejo-openapi/src/models/note_options.rs delete mode 100644 forgejo-openapi/src/models/notification_count.rs delete mode 100644 forgejo-openapi/src/models/notification_subject.rs delete mode 100644 forgejo-openapi/src/models/notification_thread.rs delete mode 100644 forgejo-openapi/src/models/o_auth2_application.rs delete mode 100644 forgejo-openapi/src/models/organization.rs delete mode 100644 forgejo-openapi/src/models/organization_permissions.rs delete mode 100644 forgejo-openapi/src/models/package.rs delete mode 100644 forgejo-openapi/src/models/package_file.rs delete mode 100644 forgejo-openapi/src/models/payload_commit.rs delete mode 100644 forgejo-openapi/src/models/payload_commit_verification.rs delete mode 100644 forgejo-openapi/src/models/payload_user.rs delete mode 100644 forgejo-openapi/src/models/permission.rs delete mode 100644 forgejo-openapi/src/models/pr_branch_info.rs delete mode 100644 forgejo-openapi/src/models/public_key.rs delete mode 100644 forgejo-openapi/src/models/pull_request.rs delete mode 100644 forgejo-openapi/src/models/pull_request_meta.rs delete mode 100644 forgejo-openapi/src/models/pull_review.rs delete mode 100644 forgejo-openapi/src/models/pull_review_comment.rs delete mode 100644 forgejo-openapi/src/models/pull_review_request_options.rs delete mode 100644 forgejo-openapi/src/models/push_mirror.rs delete mode 100644 forgejo-openapi/src/models/quota_group.rs delete mode 100644 forgejo-openapi/src/models/quota_info.rs delete mode 100644 forgejo-openapi/src/models/quota_rule_info.rs delete mode 100644 forgejo-openapi/src/models/quota_used.rs delete mode 100644 forgejo-openapi/src/models/quota_used_artifact.rs delete mode 100644 forgejo-openapi/src/models/quota_used_attachment.rs delete mode 100644 forgejo-openapi/src/models/quota_used_attachment_contained_in.rs delete mode 100644 forgejo-openapi/src/models/quota_used_package.rs delete mode 100644 forgejo-openapi/src/models/quota_used_size.rs delete mode 100644 forgejo-openapi/src/models/quota_used_size_assets.rs delete mode 100644 forgejo-openapi/src/models/quota_used_size_assets_attachments.rs delete mode 100644 forgejo-openapi/src/models/quota_used_size_assets_packages.rs delete mode 100644 forgejo-openapi/src/models/quota_used_size_git.rs delete mode 100644 forgejo-openapi/src/models/quota_used_size_repos.rs delete mode 100644 forgejo-openapi/src/models/reaction.rs delete mode 100644 forgejo-openapi/src/models/reference.rs delete mode 100644 forgejo-openapi/src/models/registration_token.rs delete mode 100644 forgejo-openapi/src/models/release.rs delete mode 100644 forgejo-openapi/src/models/rename_org_option.rs delete mode 100644 forgejo-openapi/src/models/rename_user_option.rs delete mode 100644 forgejo-openapi/src/models/replace_flags_option.rs delete mode 100644 forgejo-openapi/src/models/repo_collaborator_permission.rs delete mode 100644 forgejo-openapi/src/models/repo_commit.rs delete mode 100644 forgejo-openapi/src/models/repo_create_release_attachment_request.rs delete mode 100644 forgejo-openapi/src/models/repo_topic_options.rs delete mode 100644 forgejo-openapi/src/models/repo_transfer.rs delete mode 100644 forgejo-openapi/src/models/repository.rs delete mode 100644 forgejo-openapi/src/models/repository_meta.rs delete mode 100644 forgejo-openapi/src/models/search_results.rs delete mode 100644 forgejo-openapi/src/models/secret.rs delete mode 100644 forgejo-openapi/src/models/server_version.rs delete mode 100644 forgejo-openapi/src/models/set_user_quota_groups_options.rs delete mode 100644 forgejo-openapi/src/models/stop_watch.rs delete mode 100644 forgejo-openapi/src/models/submit_pull_review_options.rs delete mode 100644 forgejo-openapi/src/models/sync_fork_info.rs delete mode 100644 forgejo-openapi/src/models/tag.rs delete mode 100644 forgejo-openapi/src/models/tag_archive_download_count.rs delete mode 100644 forgejo-openapi/src/models/tag_protection.rs delete mode 100644 forgejo-openapi/src/models/team.rs delete mode 100644 forgejo-openapi/src/models/team_search_results.rs delete mode 100644 forgejo-openapi/src/models/timeline_comment.rs delete mode 100644 forgejo-openapi/src/models/topic_name.rs delete mode 100644 forgejo-openapi/src/models/topic_response.rs delete mode 100644 forgejo-openapi/src/models/topic_search_results.rs delete mode 100644 forgejo-openapi/src/models/tracked_time.rs delete mode 100644 forgejo-openapi/src/models/transfer_repo_option.rs delete mode 100644 forgejo-openapi/src/models/update_branch_repo_option.rs delete mode 100644 forgejo-openapi/src/models/update_file_options.rs delete mode 100644 forgejo-openapi/src/models/update_repo_avatar_option.rs delete mode 100644 forgejo-openapi/src/models/update_user_avatar_option.rs delete mode 100644 forgejo-openapi/src/models/update_variable_option.rs delete mode 100644 forgejo-openapi/src/models/user.rs delete mode 100644 forgejo-openapi/src/models/user_heatmap_data.rs delete mode 100644 forgejo-openapi/src/models/user_search_results.rs delete mode 100644 forgejo-openapi/src/models/user_settings.rs delete mode 100644 forgejo-openapi/src/models/user_settings_options.rs delete mode 100644 forgejo-openapi/src/models/verify_gpg_key_option.rs delete mode 100644 forgejo-openapi/src/models/watch_info.rs delete mode 100644 forgejo-openapi/src/models/wiki_commit.rs delete mode 100644 forgejo-openapi/src/models/wiki_commit_list.rs delete mode 100644 forgejo-openapi/src/models/wiki_page.rs delete mode 100644 forgejo-openapi/src/models/wiki_page_meta_data.rs delete mode 100644 forgejo-openapi/swagger.v1.json diff --git a/Cargo.toml b/Cargo.toml index c5f2697..086924c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,13 @@ [workspace] resolver = "3" members = [ - "forgejo-openapi", "forgejo-openapi-test" ] [workspace.dependencies] -# workspace -forgejo-openapi = { path = "./forgejo-openapi", default-features = false } -# external +# git +forgejo-openapi = { git = "https://git.dzuchun.ing/dzu/forgejo-openapi.git", default-features = false } +# crates.io tokio = { version = "^1.46.0", default-features = false } reqwest = { version = "^0.12", default-features = false } diff --git a/forgejo-openapi/.gitignore b/forgejo-openapi/.gitignore deleted file mode 100644 index 6aa1064..0000000 --- a/forgejo-openapi/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target/ -**/*.rs.bk -Cargo.lock diff --git a/forgejo-openapi/.openapi-generator-ignore b/forgejo-openapi/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/forgejo-openapi/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/forgejo-openapi/.openapi-generator/FILES b/forgejo-openapi/.openapi-generator/FILES deleted file mode 100644 index fc63240..0000000 --- a/forgejo-openapi/.openapi-generator/FILES +++ /dev/null @@ -1,486 +0,0 @@ -.gitignore -.openapi-generator-ignore -.travis.yml -Cargo.toml -README.md -docs/AccessToken.md -docs/ActionRun.md -docs/ActionRunJob.md -docs/ActionTask.md -docs/ActionTaskResponse.md -docs/ActionVariable.md -docs/Activity.md -docs/ActivityPub.md -docs/ActivitypubApi.md -docs/AddCollaboratorOption.md -docs/AddTimeOption.md -docs/AdminApi.md -docs/AnnotatedTag.md -docs/AnnotatedTagObject.md -docs/ApiError.md -docs/ApiForbiddenError.md -docs/ApiInternalServerError.md -docs/ApiInvalidTopicsError.md -docs/ApiNotFound.md -docs/ApiRepoArchivedError.md -docs/ApiUnauthorizedError.md -docs/ApiValidationError.md -docs/Attachment.md -docs/BlockedUser.md -docs/Branch.md -docs/BranchProtection.md -docs/ChangeFileOperation.md -docs/ChangeFilesOptions.md -docs/ChangedFile.md -docs/CombinedStatus.md -docs/Comment.md -docs/Commit.md -docs/CommitAffectedFiles.md -docs/CommitDateOptions.md -docs/CommitMeta.md -docs/CommitStats.md -docs/CommitStatus.md -docs/CommitUser.md -docs/Compare.md -docs/ContentsResponse.md -docs/CreateAccessTokenOption.md -docs/CreateBranchProtectionOption.md -docs/CreateBranchRepoOption.md -docs/CreateEmailOption.md -docs/CreateFileOptions.md -docs/CreateForkOption.md -docs/CreateGpgKeyOption.md -docs/CreateHookOption.md -docs/CreateIssueCommentOption.md -docs/CreateIssueOption.md -docs/CreateKeyOption.md -docs/CreateLabelOption.md -docs/CreateMilestoneOption.md -docs/CreateOAuth2ApplicationOptions.md -docs/CreateOrUpdateSecretOption.md -docs/CreateOrgOption.md -docs/CreatePullRequestOption.md -docs/CreatePullReviewComment.md -docs/CreatePullReviewOptions.md -docs/CreatePushMirrorOption.md -docs/CreateQuotaGroupOptions.md -docs/CreateQuotaRuleOptions.md -docs/CreateReleaseOption.md -docs/CreateRepoOption.md -docs/CreateStatusOption.md -docs/CreateTagOption.md -docs/CreateTagProtectionOption.md -docs/CreateTeamOption.md -docs/CreateUserOption.md -docs/CreateVariableOption.md -docs/CreateWikiPageOptions.md -docs/Cron.md -docs/DeleteEmailOption.md -docs/DeleteFileOptions.md -docs/DeleteLabelsOption.md -docs/DeployKey.md -docs/DismissPullReviewOptions.md -docs/DispatchWorkflowOption.md -docs/DispatchWorkflowRun.md -docs/EditAttachmentOptions.md -docs/EditBranchProtectionOption.md -docs/EditDeadlineOption.md -docs/EditGitHookOption.md -docs/EditHookOption.md -docs/EditIssueCommentOption.md -docs/EditIssueOption.md -docs/EditLabelOption.md -docs/EditMilestoneOption.md -docs/EditOrgOption.md -docs/EditPullRequestOption.md -docs/EditQuotaRuleOptions.md -docs/EditReactionOption.md -docs/EditReleaseOption.md -docs/EditRepoOption.md -docs/EditTagProtectionOption.md -docs/EditTeamOption.md -docs/EditUserOption.md -docs/Email.md -docs/ExternalTracker.md -docs/ExternalWiki.md -docs/FileCommitResponse.md -docs/FileDeleteResponse.md -docs/FileLinksResponse.md -docs/FileResponse.md -docs/FilesResponse.md -docs/GeneralApiSettings.md -docs/GeneralAttachmentSettings.md -docs/GeneralRepoSettings.md -docs/GeneralUiSettings.md -docs/GenerateRepoOption.md -docs/GitBlob.md -docs/GitEntry.md -docs/GitHook.md -docs/GitObject.md -docs/GitTreeResponse.md -docs/GitignoreTemplateInfo.md -docs/GpgKey.md -docs/GpgKeyEmail.md -docs/Hook.md -docs/Identity.md -docs/InternalTracker.md -docs/Issue.md -docs/IssueApi.md -docs/IssueConfig.md -docs/IssueConfigContactLink.md -docs/IssueConfigValidation.md -docs/IssueDeadline.md -docs/IssueFormField.md -docs/IssueLabelsOption.md -docs/IssueMeta.md -docs/IssueTemplate.md -docs/Label.md -docs/LabelTemplate.md -docs/LicenseTemplateInfo.md -docs/LicensesTemplateListEntry.md -docs/ListActionRunResponse.md -docs/MarkdownOption.md -docs/MarkupOption.md -docs/MergePullRequestOption.md -docs/MigrateRepoOptions.md -docs/Milestone.md -docs/MiscellaneousApi.md -docs/NewIssuePinsAllowed.md -docs/NodeInfo.md -docs/NodeInfoServices.md -docs/NodeInfoSoftware.md -docs/NodeInfoUsage.md -docs/NodeInfoUsageUsers.md -docs/Note.md -docs/NoteOptions.md -docs/NotificationApi.md -docs/NotificationCount.md -docs/NotificationSubject.md -docs/NotificationThread.md -docs/OAuth2Application.md -docs/Organization.md -docs/OrganizationApi.md -docs/OrganizationPermissions.md -docs/Package.md -docs/PackageApi.md -docs/PackageFile.md -docs/PayloadCommit.md -docs/PayloadCommitVerification.md -docs/PayloadUser.md -docs/Permission.md -docs/PrBranchInfo.md -docs/PublicKey.md -docs/PullRequest.md -docs/PullRequestMeta.md -docs/PullReview.md -docs/PullReviewComment.md -docs/PullReviewRequestOptions.md -docs/PushMirror.md -docs/QuotaGroup.md -docs/QuotaInfo.md -docs/QuotaRuleInfo.md -docs/QuotaUsed.md -docs/QuotaUsedArtifact.md -docs/QuotaUsedAttachment.md -docs/QuotaUsedAttachmentContainedIn.md -docs/QuotaUsedPackage.md -docs/QuotaUsedSize.md -docs/QuotaUsedSizeAssets.md -docs/QuotaUsedSizeAssetsAttachments.md -docs/QuotaUsedSizeAssetsPackages.md -docs/QuotaUsedSizeGit.md -docs/QuotaUsedSizeRepos.md -docs/Reaction.md -docs/Reference.md -docs/RegistrationToken.md -docs/Release.md -docs/RenameOrgOption.md -docs/RenameUserOption.md -docs/ReplaceFlagsOption.md -docs/RepoCollaboratorPermission.md -docs/RepoCommit.md -docs/RepoCreateReleaseAttachmentRequest.md -docs/RepoTopicOptions.md -docs/RepoTransfer.md -docs/Repository.md -docs/RepositoryApi.md -docs/RepositoryMeta.md -docs/SearchResults.md -docs/Secret.md -docs/ServerVersion.md -docs/SetUserQuotaGroupsOptions.md -docs/SettingsApi.md -docs/StopWatch.md -docs/SubmitPullReviewOptions.md -docs/SyncForkInfo.md -docs/Tag.md -docs/TagArchiveDownloadCount.md -docs/TagProtection.md -docs/Team.md -docs/TeamSearchResults.md -docs/TimelineComment.md -docs/TopicName.md -docs/TopicResponse.md -docs/TopicSearchResults.md -docs/TrackedTime.md -docs/TransferRepoOption.md -docs/UpdateBranchRepoOption.md -docs/UpdateFileOptions.md -docs/UpdateRepoAvatarOption.md -docs/UpdateUserAvatarOption.md -docs/UpdateVariableOption.md -docs/User.md -docs/UserApi.md -docs/UserHeatmapData.md -docs/UserSearchResults.md -docs/UserSettings.md -docs/UserSettingsOptions.md -docs/VerifyGpgKeyOption.md -docs/WatchInfo.md -docs/WikiCommit.md -docs/WikiCommitList.md -docs/WikiPage.md -docs/WikiPageMetaData.md -git_push.sh -src/apis/activitypub_api.rs -src/apis/admin_api.rs -src/apis/configuration.rs -src/apis/issue_api.rs -src/apis/miscellaneous_api.rs -src/apis/mod.rs -src/apis/notification_api.rs -src/apis/organization_api.rs -src/apis/package_api.rs -src/apis/repository_api.rs -src/apis/settings_api.rs -src/apis/user_api.rs -src/lib.rs -src/models/access_token.rs -src/models/action_run.rs -src/models/action_run_job.rs -src/models/action_task.rs -src/models/action_task_response.rs -src/models/action_variable.rs -src/models/activity.rs -src/models/activity_pub.rs -src/models/add_collaborator_option.rs -src/models/add_time_option.rs -src/models/annotated_tag.rs -src/models/annotated_tag_object.rs -src/models/api_error.rs -src/models/api_forbidden_error.rs -src/models/api_internal_server_error.rs -src/models/api_invalid_topics_error.rs -src/models/api_not_found.rs -src/models/api_repo_archived_error.rs -src/models/api_unauthorized_error.rs -src/models/api_validation_error.rs -src/models/attachment.rs -src/models/blocked_user.rs -src/models/branch.rs -src/models/branch_protection.rs -src/models/change_file_operation.rs -src/models/change_files_options.rs -src/models/changed_file.rs -src/models/combined_status.rs -src/models/comment.rs -src/models/commit.rs -src/models/commit_affected_files.rs -src/models/commit_date_options.rs -src/models/commit_meta.rs -src/models/commit_stats.rs -src/models/commit_status.rs -src/models/commit_user.rs -src/models/compare.rs -src/models/contents_response.rs -src/models/create_access_token_option.rs -src/models/create_branch_protection_option.rs -src/models/create_branch_repo_option.rs -src/models/create_email_option.rs -src/models/create_file_options.rs -src/models/create_fork_option.rs -src/models/create_gpg_key_option.rs -src/models/create_hook_option.rs -src/models/create_issue_comment_option.rs -src/models/create_issue_option.rs -src/models/create_key_option.rs -src/models/create_label_option.rs -src/models/create_milestone_option.rs -src/models/create_o_auth2_application_options.rs -src/models/create_or_update_secret_option.rs -src/models/create_org_option.rs -src/models/create_pull_request_option.rs -src/models/create_pull_review_comment.rs -src/models/create_pull_review_options.rs -src/models/create_push_mirror_option.rs -src/models/create_quota_group_options.rs -src/models/create_quota_rule_options.rs -src/models/create_release_option.rs -src/models/create_repo_option.rs -src/models/create_status_option.rs -src/models/create_tag_option.rs -src/models/create_tag_protection_option.rs -src/models/create_team_option.rs -src/models/create_user_option.rs -src/models/create_variable_option.rs -src/models/create_wiki_page_options.rs -src/models/cron.rs -src/models/delete_email_option.rs -src/models/delete_file_options.rs -src/models/delete_labels_option.rs -src/models/deploy_key.rs -src/models/dismiss_pull_review_options.rs -src/models/dispatch_workflow_option.rs -src/models/dispatch_workflow_run.rs -src/models/edit_attachment_options.rs -src/models/edit_branch_protection_option.rs -src/models/edit_deadline_option.rs -src/models/edit_git_hook_option.rs -src/models/edit_hook_option.rs -src/models/edit_issue_comment_option.rs -src/models/edit_issue_option.rs -src/models/edit_label_option.rs -src/models/edit_milestone_option.rs -src/models/edit_org_option.rs -src/models/edit_pull_request_option.rs -src/models/edit_quota_rule_options.rs -src/models/edit_reaction_option.rs -src/models/edit_release_option.rs -src/models/edit_repo_option.rs -src/models/edit_tag_protection_option.rs -src/models/edit_team_option.rs -src/models/edit_user_option.rs -src/models/email.rs -src/models/external_tracker.rs -src/models/external_wiki.rs -src/models/file_commit_response.rs -src/models/file_delete_response.rs -src/models/file_links_response.rs -src/models/file_response.rs -src/models/files_response.rs -src/models/general_api_settings.rs -src/models/general_attachment_settings.rs -src/models/general_repo_settings.rs -src/models/general_ui_settings.rs -src/models/generate_repo_option.rs -src/models/git_blob.rs -src/models/git_entry.rs -src/models/git_hook.rs -src/models/git_object.rs -src/models/git_tree_response.rs -src/models/gitignore_template_info.rs -src/models/gpg_key.rs -src/models/gpg_key_email.rs -src/models/hook.rs -src/models/identity.rs -src/models/internal_tracker.rs -src/models/issue.rs -src/models/issue_config.rs -src/models/issue_config_contact_link.rs -src/models/issue_config_validation.rs -src/models/issue_deadline.rs -src/models/issue_form_field.rs -src/models/issue_labels_option.rs -src/models/issue_meta.rs -src/models/issue_template.rs -src/models/label.rs -src/models/label_template.rs -src/models/license_template_info.rs -src/models/licenses_template_list_entry.rs -src/models/list_action_run_response.rs -src/models/markdown_option.rs -src/models/markup_option.rs -src/models/merge_pull_request_option.rs -src/models/migrate_repo_options.rs -src/models/milestone.rs -src/models/mod.rs -src/models/new_issue_pins_allowed.rs -src/models/node_info.rs -src/models/node_info_services.rs -src/models/node_info_software.rs -src/models/node_info_usage.rs -src/models/node_info_usage_users.rs -src/models/note.rs -src/models/note_options.rs -src/models/notification_count.rs -src/models/notification_subject.rs -src/models/notification_thread.rs -src/models/o_auth2_application.rs -src/models/organization.rs -src/models/organization_permissions.rs -src/models/package.rs -src/models/package_file.rs -src/models/payload_commit.rs -src/models/payload_commit_verification.rs -src/models/payload_user.rs -src/models/permission.rs -src/models/pr_branch_info.rs -src/models/public_key.rs -src/models/pull_request.rs -src/models/pull_request_meta.rs -src/models/pull_review.rs -src/models/pull_review_comment.rs -src/models/pull_review_request_options.rs -src/models/push_mirror.rs -src/models/quota_group.rs -src/models/quota_info.rs -src/models/quota_rule_info.rs -src/models/quota_used.rs -src/models/quota_used_artifact.rs -src/models/quota_used_attachment.rs -src/models/quota_used_attachment_contained_in.rs -src/models/quota_used_package.rs -src/models/quota_used_size.rs -src/models/quota_used_size_assets.rs -src/models/quota_used_size_assets_attachments.rs -src/models/quota_used_size_assets_packages.rs -src/models/quota_used_size_git.rs -src/models/quota_used_size_repos.rs -src/models/reaction.rs -src/models/reference.rs -src/models/registration_token.rs -src/models/release.rs -src/models/rename_org_option.rs -src/models/rename_user_option.rs -src/models/replace_flags_option.rs -src/models/repo_collaborator_permission.rs -src/models/repo_commit.rs -src/models/repo_create_release_attachment_request.rs -src/models/repo_topic_options.rs -src/models/repo_transfer.rs -src/models/repository.rs -src/models/repository_meta.rs -src/models/search_results.rs -src/models/secret.rs -src/models/server_version.rs -src/models/set_user_quota_groups_options.rs -src/models/stop_watch.rs -src/models/submit_pull_review_options.rs -src/models/sync_fork_info.rs -src/models/tag.rs -src/models/tag_archive_download_count.rs -src/models/tag_protection.rs -src/models/team.rs -src/models/team_search_results.rs -src/models/timeline_comment.rs -src/models/topic_name.rs -src/models/topic_response.rs -src/models/topic_search_results.rs -src/models/tracked_time.rs -src/models/transfer_repo_option.rs -src/models/update_branch_repo_option.rs -src/models/update_file_options.rs -src/models/update_repo_avatar_option.rs -src/models/update_user_avatar_option.rs -src/models/update_variable_option.rs -src/models/user.rs -src/models/user_heatmap_data.rs -src/models/user_search_results.rs -src/models/user_settings.rs -src/models/user_settings_options.rs -src/models/verify_gpg_key_option.rs -src/models/watch_info.rs -src/models/wiki_commit.rs -src/models/wiki_commit_list.rs -src/models/wiki_page.rs -src/models/wiki_page_meta_data.rs diff --git a/forgejo-openapi/.openapi-generator/VERSION b/forgejo-openapi/.openapi-generator/VERSION deleted file mode 100644 index 3821090..0000000 --- a/forgejo-openapi/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.19.0 diff --git a/forgejo-openapi/.travis.yml b/forgejo-openapi/.travis.yml deleted file mode 100644 index 22761ba..0000000 --- a/forgejo-openapi/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: rust diff --git a/forgejo-openapi/Cargo.toml b/forgejo-openapi/Cargo.toml deleted file mode 100644 index 435eb74..0000000 --- a/forgejo-openapi/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "forgejo-openapi" -version = "14.0.0" -authors = ["OpenAPI Generator team and contributors"] -description = "This documentation describes the Forgejo API." -license = "This file is distributed under the MIT license for the purpose of interoperability" -edition = "2021" - -[dependencies] -serde = { version = "^1.0", features = ["derive"] } -serde_json = "^1.0" -serde_repr = "^0.1" -url = "^2.5" -tokio = { workspace = true, features = ["fs"] } -tokio-util = { version = "^0.7", features = ["codec"] } -reqwest = { workspace = true, features = ["json", "multipart", "stream"] } - -[features] -default = ["native-tls"] -native-tls = ["reqwest/native-tls"] -rustls-tls = ["reqwest/rustls-tls"] diff --git a/forgejo-openapi/README.md b/forgejo-openapi/README.md deleted file mode 100644 index bdc8c4b..0000000 --- a/forgejo-openapi/README.md +++ /dev/null @@ -1,746 +0,0 @@ -# Rust API client for openapi - -This documentation describes the Forgejo API. - - -## Overview - -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - -- API version: 14.0.0 -- Package version: 14.0.0 -- Generator version: 7.19.0 -- Build package: `org.openapitools.codegen.languages.RustClientCodegen` - -## Installation - -Put the package under your project folder in a directory named `openapi` and add the following to `Cargo.toml` under `[dependencies]`: - -``` -openapi = { path = "./openapi" } -``` - -## Documentation for API Endpoints - -All URIs are relative to */api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ActivitypubApi* | [**activitypub_instance_actor**](docs/ActivitypubApi.md#activitypub_instance_actor) | **GET** /activitypub/actor | Returns the instance's Actor -*ActivitypubApi* | [**activitypub_instance_actor_inbox**](docs/ActivitypubApi.md#activitypub_instance_actor_inbox) | **POST** /activitypub/actor/inbox | Send to the inbox -*ActivitypubApi* | [**activitypub_instance_actor_outbox**](docs/ActivitypubApi.md#activitypub_instance_actor_outbox) | **POST** /activitypub/actor/outbox | Display the outbox (always empty) -*ActivitypubApi* | [**activitypub_person**](docs/ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user_id} | Returns the Person actor for a user -*ActivitypubApi* | [**activitypub_person_activity**](docs/ActivitypubApi.md#activitypub_person_activity) | **GET** /activitypub/user-id/{user_id}/activities/{activity_id}/activity | Get a specific activity of the user -*ActivitypubApi* | [**activitypub_person_activity_note**](docs/ActivitypubApi.md#activitypub_person_activity_note) | **GET** /activitypub/user-id/{user_id}/activities/{activity_id} | Get a specific activity object of the user -*ActivitypubApi* | [**activitypub_person_feed**](docs/ActivitypubApi.md#activitypub_person_feed) | **GET** /activitypub/user-id/{user_id}/outbox | List the user's recorded activity -*ActivitypubApi* | [**activitypub_person_inbox**](docs/ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user_id}/inbox | Send to the inbox -*ActivitypubApi* | [**activitypub_repository**](docs/ActivitypubApi.md#activitypub_repository) | **GET** /activitypub/repository-id/{repository_id} | Returns the Repository actor for a repo -*ActivitypubApi* | [**activitypub_repository_inbox**](docs/ActivitypubApi.md#activitypub_repository_inbox) | **POST** /activitypub/repository-id/{repository_id}/inbox | Send to the inbox -*ActivitypubApi* | [**activitypub_repository_outbox**](docs/ActivitypubApi.md#activitypub_repository_outbox) | **POST** /activitypub/repository-id/{repository_id}/outbox | Display the outbox -*AdminApi* | [**admin_add_rule_to_quota_group**](docs/AdminApi.md#admin_add_rule_to_quota_group) | **PUT** /admin/quota/groups/{quotagroup}/rules/{quotarule} | Adds a rule to a quota group -*AdminApi* | [**admin_add_user_to_quota_group**](docs/AdminApi.md#admin_add_user_to_quota_group) | **PUT** /admin/quota/groups/{quotagroup}/users/{username} | Add a user to a quota group -*AdminApi* | [**admin_adopt_repository**](docs/AdminApi.md#admin_adopt_repository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository -*AdminApi* | [**admin_create_hook**](docs/AdminApi.md#admin_create_hook) | **POST** /admin/hooks | Create a hook -*AdminApi* | [**admin_create_org**](docs/AdminApi.md#admin_create_org) | **POST** /admin/users/{username}/orgs | Create an organization -*AdminApi* | [**admin_create_public_key**](docs/AdminApi.md#admin_create_public_key) | **POST** /admin/users/{username}/keys | Add an SSH public key to user's account -*AdminApi* | [**admin_create_quota_group**](docs/AdminApi.md#admin_create_quota_group) | **POST** /admin/quota/groups | Create a new quota group -*AdminApi* | [**admin_create_quota_rule**](docs/AdminApi.md#admin_create_quota_rule) | **POST** /admin/quota/rules | Create a new quota rule -*AdminApi* | [**admin_create_repo**](docs/AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf of a user -*AdminApi* | [**admin_create_user**](docs/AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user account -*AdminApi* | [**admin_cron_list**](docs/AdminApi.md#admin_cron_list) | **GET** /admin/cron | List cron tasks -*AdminApi* | [**admin_cron_run**](docs/AdminApi.md#admin_cron_run) | **POST** /admin/cron/{task} | Run cron task -*AdminApi* | [**admin_delete_hook**](docs/AdminApi.md#admin_delete_hook) | **DELETE** /admin/hooks/{id} | Delete a hook -*AdminApi* | [**admin_delete_quota_group**](docs/AdminApi.md#admin_delete_quota_group) | **DELETE** /admin/quota/groups/{quotagroup} | Delete a quota group -*AdminApi* | [**admin_delete_quota_rule**](docs/AdminApi.md#admin_delete_quota_rule) | **DELETE** /admin/quota/rules/{quotarule} | Deletes a quota rule -*AdminApi* | [**admin_delete_unadopted_repository**](docs/AdminApi.md#admin_delete_unadopted_repository) | **DELETE** /admin/unadopted/{owner}/{repo} | Delete unadopted files -*AdminApi* | [**admin_delete_user**](docs/AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete user account -*AdminApi* | [**admin_delete_user_emails**](docs/AdminApi.md#admin_delete_user_emails) | **DELETE** /admin/users/{username}/emails | Delete email addresses from a user's account -*AdminApi* | [**admin_delete_user_public_key**](docs/AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Remove a public key from user's account -*AdminApi* | [**admin_edit_hook**](docs/AdminApi.md#admin_edit_hook) | **PATCH** /admin/hooks/{id} | Update a hook -*AdminApi* | [**admin_edit_quota_rule**](docs/AdminApi.md#admin_edit_quota_rule) | **PATCH** /admin/quota/rules/{quotarule} | Change an existing quota rule -*AdminApi* | [**admin_edit_user**](docs/AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user -*AdminApi* | [**admin_get_all_emails**](docs/AdminApi.md#admin_get_all_emails) | **GET** /admin/emails | List all users' email addresses -*AdminApi* | [**admin_get_all_orgs**](docs/AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations -*AdminApi* | [**admin_get_hook**](docs/AdminApi.md#admin_get_hook) | **GET** /admin/hooks/{id} | Get a hook -*AdminApi* | [**admin_get_quota_group**](docs/AdminApi.md#admin_get_quota_group) | **GET** /admin/quota/groups/{quotagroup} | Get information about the quota group -*AdminApi* | [**admin_get_quota_rule**](docs/AdminApi.md#admin_get_quota_rule) | **GET** /admin/quota/rules/{quotarule} | Get information about a quota rule -*AdminApi* | [**admin_get_runner_registration_token**](docs/AdminApi.md#admin_get_runner_registration_token) | **GET** /admin/runners/registration-token | Get an global actions runner registration token -*AdminApi* | [**admin_get_user_quota**](docs/AdminApi.md#admin_get_user_quota) | **GET** /admin/users/{username}/quota | Get the user's quota info -*AdminApi* | [**admin_list_hooks**](docs/AdminApi.md#admin_list_hooks) | **GET** /admin/hooks | List global (system) webhooks -*AdminApi* | [**admin_list_quota_groups**](docs/AdminApi.md#admin_list_quota_groups) | **GET** /admin/quota/groups | List the available quota groups -*AdminApi* | [**admin_list_quota_rules**](docs/AdminApi.md#admin_list_quota_rules) | **GET** /admin/quota/rules | List the available quota rules -*AdminApi* | [**admin_list_user_emails**](docs/AdminApi.md#admin_list_user_emails) | **GET** /admin/users/{username}/emails | List all email addresses for a user -*AdminApi* | [**admin_list_users_in_quota_group**](docs/AdminApi.md#admin_list_users_in_quota_group) | **GET** /admin/quota/groups/{quotagroup}/users | List users in a quota group -*AdminApi* | [**admin_remove_rule_from_quota_group**](docs/AdminApi.md#admin_remove_rule_from_quota_group) | **DELETE** /admin/quota/groups/{quotagroup}/rules/{quotarule} | Removes a rule from a quota group -*AdminApi* | [**admin_remove_user_from_quota_group**](docs/AdminApi.md#admin_remove_user_from_quota_group) | **DELETE** /admin/quota/groups/{quotagroup}/users/{username} | Remove a user from a quota group -*AdminApi* | [**admin_rename_user**](docs/AdminApi.md#admin_rename_user) | **POST** /admin/users/{username}/rename | Rename a user -*AdminApi* | [**admin_search_emails**](docs/AdminApi.md#admin_search_emails) | **GET** /admin/emails/search | Search users' email addresses -*AdminApi* | [**admin_search_run_jobs**](docs/AdminApi.md#admin_search_run_jobs) | **GET** /admin/runners/jobs | Search action jobs according filter conditions -*AdminApi* | [**admin_search_users**](docs/AdminApi.md#admin_search_users) | **GET** /admin/users | Search users according filter conditions -*AdminApi* | [**admin_set_user_quota_groups**](docs/AdminApi.md#admin_set_user_quota_groups) | **POST** /admin/users/{username}/quota/groups | Set the user's quota groups to a given list. -*AdminApi* | [**admin_unadopted_list**](docs/AdminApi.md#admin_unadopted_list) | **GET** /admin/unadopted | List unadopted repositories -*IssueApi* | [**issue_add_label**](docs/IssueApi.md#issue_add_label) | **POST** /repos/{owner}/{repo}/issues/{index}/labels | Add a label to an issue -*IssueApi* | [**issue_add_subscription**](docs/IssueApi.md#issue_add_subscription) | **PUT** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Subscribe user to issue -*IssueApi* | [**issue_add_time**](docs/IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{index}/times | Add tracked time to a issue -*IssueApi* | [**issue_check_subscription**](docs/IssueApi.md#issue_check_subscription) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions/check | Check if user is subscribed to an issue -*IssueApi* | [**issue_clear_labels**](docs/IssueApi.md#issue_clear_labels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue -*IssueApi* | [**issue_create_comment**](docs/IssueApi.md#issue_create_comment) | **POST** /repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue -*IssueApi* | [**issue_create_issue**](docs/IssueApi.md#issue_create_issue) | **POST** /repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored. -*IssueApi* | [**issue_create_issue_attachment**](docs/IssueApi.md#issue_create_issue_attachment) | **POST** /repos/{owner}/{repo}/issues/{index}/assets | Create an issue attachment -*IssueApi* | [**issue_create_issue_blocking**](docs/IssueApi.md#issue_create_issue_blocking) | **POST** /repos/{owner}/{repo}/issues/{index}/blocks | Block the issue given in the body by the issue in path -*IssueApi* | [**issue_create_issue_comment_attachment**](docs/IssueApi.md#issue_create_issue_comment_attachment) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/assets | Create a comment attachment -*IssueApi* | [**issue_create_issue_dependencies**](docs/IssueApi.md#issue_create_issue_dependencies) | **POST** /repos/{owner}/{repo}/issues/{index}/dependencies | Make the issue in the url depend on the issue in the form. -*IssueApi* | [**issue_create_label**](docs/IssueApi.md#issue_create_label) | **POST** /repos/{owner}/{repo}/labels | Create a label -*IssueApi* | [**issue_create_milestone**](docs/IssueApi.md#issue_create_milestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone -*IssueApi* | [**issue_delete**](docs/IssueApi.md#issue_delete) | **DELETE** /repos/{owner}/{repo}/issues/{index} | Delete an issue -*IssueApi* | [**issue_delete_comment**](docs/IssueApi.md#issue_delete_comment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment -*IssueApi* | [**issue_delete_comment_deprecated**](docs/IssueApi.md#issue_delete_comment_deprecated) | **DELETE** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Delete a comment -*IssueApi* | [**issue_delete_comment_reaction**](docs/IssueApi.md#issue_delete_comment_reaction) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Remove a reaction from a comment of an issue -*IssueApi* | [**issue_delete_issue_attachment**](docs/IssueApi.md#issue_delete_issue_attachment) | **DELETE** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Delete an issue attachment -*IssueApi* | [**issue_delete_issue_comment_attachment**](docs/IssueApi.md#issue_delete_issue_comment_attachment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Delete a comment attachment -*IssueApi* | [**issue_delete_issue_reaction**](docs/IssueApi.md#issue_delete_issue_reaction) | **DELETE** /repos/{owner}/{repo}/issues/{index}/reactions | Remove a reaction from an issue -*IssueApi* | [**issue_delete_label**](docs/IssueApi.md#issue_delete_label) | **DELETE** /repos/{owner}/{repo}/labels/{id} | Delete a label -*IssueApi* | [**issue_delete_milestone**](docs/IssueApi.md#issue_delete_milestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone -*IssueApi* | [**issue_delete_stop_watch**](docs/IssueApi.md#issue_delete_stop_watch) | **DELETE** /repos/{owner}/{repo}/issues/{index}/stopwatch/delete | Delete an issue's existing stopwatch. -*IssueApi* | [**issue_delete_subscription**](docs/IssueApi.md#issue_delete_subscription) | **DELETE** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Unsubscribe user from issue -*IssueApi* | [**issue_delete_time**](docs/IssueApi.md#issue_delete_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times/{id} | Delete specific tracked time -*IssueApi* | [**issue_edit_comment**](docs/IssueApi.md#issue_edit_comment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id} | Edit a comment -*IssueApi* | [**issue_edit_comment_deprecated**](docs/IssueApi.md#issue_edit_comment_deprecated) | **PATCH** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment -*IssueApi* | [**issue_edit_issue**](docs/IssueApi.md#issue_edit_issue) | **PATCH** /repos/{owner}/{repo}/issues/{index} | Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. -*IssueApi* | [**issue_edit_issue_attachment**](docs/IssueApi.md#issue_edit_issue_attachment) | **PATCH** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Edit an issue attachment -*IssueApi* | [**issue_edit_issue_comment_attachment**](docs/IssueApi.md#issue_edit_issue_comment_attachment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Edit a comment attachment -*IssueApi* | [**issue_edit_issue_deadline**](docs/IssueApi.md#issue_edit_issue_deadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. -*IssueApi* | [**issue_edit_label**](docs/IssueApi.md#issue_edit_label) | **PATCH** /repos/{owner}/{repo}/labels/{id} | Update a label -*IssueApi* | [**issue_edit_milestone**](docs/IssueApi.md#issue_edit_milestone) | **PATCH** /repos/{owner}/{repo}/milestones/{id} | Update a milestone -*IssueApi* | [**issue_get_comment**](docs/IssueApi.md#issue_get_comment) | **GET** /repos/{owner}/{repo}/issues/comments/{id} | Get a comment -*IssueApi* | [**issue_get_comment_reactions**](docs/IssueApi.md#issue_get_comment_reactions) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Get a list of reactions from a comment of an issue -*IssueApi* | [**issue_get_comments**](docs/IssueApi.md#issue_get_comments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue -*IssueApi* | [**issue_get_comments_and_timeline**](docs/IssueApi.md#issue_get_comments_and_timeline) | **GET** /repos/{owner}/{repo}/issues/{index}/timeline | List all comments and events on an issue -*IssueApi* | [**issue_get_issue**](docs/IssueApi.md#issue_get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get an issue -*IssueApi* | [**issue_get_issue_attachment**](docs/IssueApi.md#issue_get_issue_attachment) | **GET** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Get an issue attachment -*IssueApi* | [**issue_get_issue_comment_attachment**](docs/IssueApi.md#issue_get_issue_comment_attachment) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Get a comment attachment -*IssueApi* | [**issue_get_issue_reactions**](docs/IssueApi.md#issue_get_issue_reactions) | **GET** /repos/{owner}/{repo}/issues/{index}/reactions | Get a list reactions of an issue -*IssueApi* | [**issue_get_label**](docs/IssueApi.md#issue_get_label) | **GET** /repos/{owner}/{repo}/labels/{id} | Get a single label -*IssueApi* | [**issue_get_labels**](docs/IssueApi.md#issue_get_labels) | **GET** /repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels -*IssueApi* | [**issue_get_milestone**](docs/IssueApi.md#issue_get_milestone) | **GET** /repos/{owner}/{repo}/milestones/{id} | Get a milestone -*IssueApi* | [**issue_get_milestones_list**](docs/IssueApi.md#issue_get_milestones_list) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones -*IssueApi* | [**issue_get_repo_comments**](docs/IssueApi.md#issue_get_repo_comments) | **GET** /repos/{owner}/{repo}/issues/comments | List all comments in a repository -*IssueApi* | [**issue_list_blocks**](docs/IssueApi.md#issue_list_blocks) | **GET** /repos/{owner}/{repo}/issues/{index}/blocks | List issues that are blocked by this issue -*IssueApi* | [**issue_list_issue_attachments**](docs/IssueApi.md#issue_list_issue_attachments) | **GET** /repos/{owner}/{repo}/issues/{index}/assets | List issue's attachments -*IssueApi* | [**issue_list_issue_comment_attachments**](docs/IssueApi.md#issue_list_issue_comment_attachments) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets | List comment's attachments -*IssueApi* | [**issue_list_issue_dependencies**](docs/IssueApi.md#issue_list_issue_dependencies) | **GET** /repos/{owner}/{repo}/issues/{index}/dependencies | List an issue's dependencies, i.e all issues that block this issue. -*IssueApi* | [**issue_list_issues**](docs/IssueApi.md#issue_list_issues) | **GET** /repos/{owner}/{repo}/issues | List a repository's issues -*IssueApi* | [**issue_list_labels**](docs/IssueApi.md#issue_list_labels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels -*IssueApi* | [**issue_post_comment_reaction**](docs/IssueApi.md#issue_post_comment_reaction) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Add a reaction to a comment of an issue -*IssueApi* | [**issue_post_issue_reaction**](docs/IssueApi.md#issue_post_issue_reaction) | **POST** /repos/{owner}/{repo}/issues/{index}/reactions | Add a reaction to an issue -*IssueApi* | [**issue_remove_issue_blocking**](docs/IssueApi.md#issue_remove_issue_blocking) | **DELETE** /repos/{owner}/{repo}/issues/{index}/blocks | Unblock the issue given in the body by the issue in path -*IssueApi* | [**issue_remove_issue_dependencies**](docs/IssueApi.md#issue_remove_issue_dependencies) | **DELETE** /repos/{owner}/{repo}/issues/{index}/dependencies | Remove an issue dependency -*IssueApi* | [**issue_remove_label**](docs/IssueApi.md#issue_remove_label) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{identifier} | Remove a label from an issue -*IssueApi* | [**issue_replace_labels**](docs/IssueApi.md#issue_replace_labels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels -*IssueApi* | [**issue_reset_time**](docs/IssueApi.md#issue_reset_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times | Reset a tracked time of an issue -*IssueApi* | [**issue_search_issues**](docs/IssueApi.md#issue_search_issues) | **GET** /repos/issues/search | Search for issues across the repositories that the user has access to -*IssueApi* | [**issue_start_stop_watch**](docs/IssueApi.md#issue_start_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue. -*IssueApi* | [**issue_stop_stop_watch**](docs/IssueApi.md#issue_stop_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. -*IssueApi* | [**issue_subscriptions**](docs/IssueApi.md#issue_subscriptions) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions | Get users who subscribed on an issue. -*IssueApi* | [**issue_tracked_times**](docs/IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{index}/times | List an issue's tracked times -*IssueApi* | [**move_issue_pin**](docs/IssueApi.md#move_issue_pin) | **PATCH** /repos/{owner}/{repo}/issues/{index}/pin/{position} | Moves the Pin to the given Position -*IssueApi* | [**pin_issue**](docs/IssueApi.md#pin_issue) | **POST** /repos/{owner}/{repo}/issues/{index}/pin | Pin an Issue -*IssueApi* | [**unpin_issue**](docs/IssueApi.md#unpin_issue) | **DELETE** /repos/{owner}/{repo}/issues/{index}/pin | Unpin an Issue -*MiscellaneousApi* | [**get_gitignore_template_info**](docs/MiscellaneousApi.md#get_gitignore_template_info) | **GET** /gitignore/templates/{name} | Returns information about a gitignore template -*MiscellaneousApi* | [**get_label_template_info**](docs/MiscellaneousApi.md#get_label_template_info) | **GET** /label/templates/{name} | Returns all labels in a template -*MiscellaneousApi* | [**get_license_template_info**](docs/MiscellaneousApi.md#get_license_template_info) | **GET** /licenses/{name} | Returns information about a license template -*MiscellaneousApi* | [**get_node_info**](docs/MiscellaneousApi.md#get_node_info) | **GET** /nodeinfo | Returns the nodeinfo of the Forgejo application -*MiscellaneousApi* | [**get_signing_key**](docs/MiscellaneousApi.md#get_signing_key) | **GET** /signing-key.gpg | Get default signing-key.gpg -*MiscellaneousApi* | [**get_ssh_signing_key**](docs/MiscellaneousApi.md#get_ssh_signing_key) | **GET** /signing-key.ssh | Get default signing-key.ssh -*MiscellaneousApi* | [**get_version**](docs/MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the running application -*MiscellaneousApi* | [**list_gitignores_templates**](docs/MiscellaneousApi.md#list_gitignores_templates) | **GET** /gitignore/templates | Returns a list of all gitignore templates -*MiscellaneousApi* | [**list_label_templates**](docs/MiscellaneousApi.md#list_label_templates) | **GET** /label/templates | Returns a list of all label templates -*MiscellaneousApi* | [**list_license_templates**](docs/MiscellaneousApi.md#list_license_templates) | **GET** /licenses | Returns a list of all license templates -*MiscellaneousApi* | [**render_markdown**](docs/MiscellaneousApi.md#render_markdown) | **POST** /markdown | Render a markdown document as HTML -*MiscellaneousApi* | [**render_markdown_raw**](docs/MiscellaneousApi.md#render_markdown_raw) | **POST** /markdown/raw | Render raw markdown as HTML -*MiscellaneousApi* | [**render_markup**](docs/MiscellaneousApi.md#render_markup) | **POST** /markup | Render a markup document as HTML -*NotificationApi* | [**notify_get_list**](docs/NotificationApi.md#notify_get_list) | **GET** /notifications | List users's notification threads -*NotificationApi* | [**notify_get_repo_list**](docs/NotificationApi.md#notify_get_repo_list) | **GET** /repos/{owner}/{repo}/notifications | List users's notification threads on a specific repo -*NotificationApi* | [**notify_get_thread**](docs/NotificationApi.md#notify_get_thread) | **GET** /notifications/threads/{id} | Get notification thread by ID -*NotificationApi* | [**notify_new_available**](docs/NotificationApi.md#notify_new_available) | **GET** /notifications/new | Check if unread notifications exist -*NotificationApi* | [**notify_read_list**](docs/NotificationApi.md#notify_read_list) | **PUT** /notifications | Mark notification threads as read, pinned or unread -*NotificationApi* | [**notify_read_repo_list**](docs/NotificationApi.md#notify_read_repo_list) | **PUT** /repos/{owner}/{repo}/notifications | Mark notification threads as read, pinned or unread on a specific repo -*NotificationApi* | [**notify_read_thread**](docs/NotificationApi.md#notify_read_thread) | **PATCH** /notifications/threads/{id} | Mark notification thread as read by ID -*OrganizationApi* | [**create_org_repo**](docs/OrganizationApi.md#create_org_repo) | **POST** /orgs/{org}/repos | Create a repository in an organization -*OrganizationApi* | [**create_org_repo_deprecated**](docs/OrganizationApi.md#create_org_repo_deprecated) | **POST** /org/{org}/repos | Create a repository in an organization -*OrganizationApi* | [**create_org_variable**](docs/OrganizationApi.md#create_org_variable) | **POST** /orgs/{org}/actions/variables/{variablename} | Create a new variable in organization -*OrganizationApi* | [**delete_org_secret**](docs/OrganizationApi.md#delete_org_secret) | **DELETE** /orgs/{org}/actions/secrets/{secretname} | Delete a secret in an organization -*OrganizationApi* | [**delete_org_variable**](docs/OrganizationApi.md#delete_org_variable) | **DELETE** /orgs/{org}/actions/variables/{variablename} | Delete organization's variable by name -*OrganizationApi* | [**get_org_variable**](docs/OrganizationApi.md#get_org_variable) | **GET** /orgs/{org}/actions/variables/{variablename} | Get organization's variable by name -*OrganizationApi* | [**get_org_variables_list**](docs/OrganizationApi.md#get_org_variables_list) | **GET** /orgs/{org}/actions/variables | List variables of an organization -*OrganizationApi* | [**org_add_team_member**](docs/OrganizationApi.md#org_add_team_member) | **PUT** /teams/{id}/members/{username} | Add a team member -*OrganizationApi* | [**org_add_team_repository**](docs/OrganizationApi.md#org_add_team_repository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team -*OrganizationApi* | [**org_block_user**](docs/OrganizationApi.md#org_block_user) | **PUT** /orgs/{org}/block/{username} | Blocks a user from the organization -*OrganizationApi* | [**org_check_quota**](docs/OrganizationApi.md#org_check_quota) | **GET** /orgs/{org}/quota/check | Check if the organization is over quota for a given subject -*OrganizationApi* | [**org_conceal_member**](docs/OrganizationApi.md#org_conceal_member) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership -*OrganizationApi* | [**org_create**](docs/OrganizationApi.md#org_create) | **POST** /orgs | Create an organization -*OrganizationApi* | [**org_create_hook**](docs/OrganizationApi.md#org_create_hook) | **POST** /orgs/{org}/hooks | Create a hook -*OrganizationApi* | [**org_create_label**](docs/OrganizationApi.md#org_create_label) | **POST** /orgs/{org}/labels | Create a label for an organization -*OrganizationApi* | [**org_create_team**](docs/OrganizationApi.md#org_create_team) | **POST** /orgs/{org}/teams | Create a team -*OrganizationApi* | [**org_delete**](docs/OrganizationApi.md#org_delete) | **DELETE** /orgs/{org} | Delete an organization -*OrganizationApi* | [**org_delete_avatar**](docs/OrganizationApi.md#org_delete_avatar) | **DELETE** /orgs/{org}/avatar | Delete an organization's avatar. It will be replaced by a default one -*OrganizationApi* | [**org_delete_hook**](docs/OrganizationApi.md#org_delete_hook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook -*OrganizationApi* | [**org_delete_label**](docs/OrganizationApi.md#org_delete_label) | **DELETE** /orgs/{org}/labels/{id} | Delete a label -*OrganizationApi* | [**org_delete_member**](docs/OrganizationApi.md#org_delete_member) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization -*OrganizationApi* | [**org_delete_team**](docs/OrganizationApi.md#org_delete_team) | **DELETE** /teams/{id} | Delete a team -*OrganizationApi* | [**org_edit**](docs/OrganizationApi.md#org_edit) | **PATCH** /orgs/{org} | Edit an organization -*OrganizationApi* | [**org_edit_hook**](docs/OrganizationApi.md#org_edit_hook) | **PATCH** /orgs/{org}/hooks/{id} | Update a hook -*OrganizationApi* | [**org_edit_label**](docs/OrganizationApi.md#org_edit_label) | **PATCH** /orgs/{org}/labels/{id} | Update a label -*OrganizationApi* | [**org_edit_team**](docs/OrganizationApi.md#org_edit_team) | **PATCH** /teams/{id} | Edit a team -*OrganizationApi* | [**org_get**](docs/OrganizationApi.md#org_get) | **GET** /orgs/{org} | Get an organization -*OrganizationApi* | [**org_get_all**](docs/OrganizationApi.md#org_get_all) | **GET** /orgs | List all organizations -*OrganizationApi* | [**org_get_hook**](docs/OrganizationApi.md#org_get_hook) | **GET** /orgs/{org}/hooks/{id} | Get a hook -*OrganizationApi* | [**org_get_label**](docs/OrganizationApi.md#org_get_label) | **GET** /orgs/{org}/labels/{id} | Get a single label -*OrganizationApi* | [**org_get_quota**](docs/OrganizationApi.md#org_get_quota) | **GET** /orgs/{org}/quota | Get quota information for an organization -*OrganizationApi* | [**org_get_runner_registration_token**](docs/OrganizationApi.md#org_get_runner_registration_token) | **GET** /orgs/{org}/actions/runners/registration-token | Get an organization's actions runner registration token -*OrganizationApi* | [**org_get_team**](docs/OrganizationApi.md#org_get_team) | **GET** /teams/{id} | Get a team -*OrganizationApi* | [**org_get_user_permissions**](docs/OrganizationApi.md#org_get_user_permissions) | **GET** /users/{username}/orgs/{org}/permissions | Get user permissions in organization -*OrganizationApi* | [**org_is_member**](docs/OrganizationApi.md#org_is_member) | **GET** /orgs/{org}/members/{username} | Check if a user is a member of an organization -*OrganizationApi* | [**org_is_public_member**](docs/OrganizationApi.md#org_is_public_member) | **GET** /orgs/{org}/public_members/{username} | Check if a user is a public member of an organization -*OrganizationApi* | [**org_list_actions_secrets**](docs/OrganizationApi.md#org_list_actions_secrets) | **GET** /orgs/{org}/actions/secrets | List actions secrets of an organization -*OrganizationApi* | [**org_list_activity_feeds**](docs/OrganizationApi.md#org_list_activity_feeds) | **GET** /orgs/{org}/activities/feeds | List an organization's activity feeds -*OrganizationApi* | [**org_list_blocked_users**](docs/OrganizationApi.md#org_list_blocked_users) | **GET** /orgs/{org}/list_blocked | List the organization's blocked users -*OrganizationApi* | [**org_list_current_user_orgs**](docs/OrganizationApi.md#org_list_current_user_orgs) | **GET** /user/orgs | List the current user's organizations -*OrganizationApi* | [**org_list_hooks**](docs/OrganizationApi.md#org_list_hooks) | **GET** /orgs/{org}/hooks | List an organization's webhooks -*OrganizationApi* | [**org_list_labels**](docs/OrganizationApi.md#org_list_labels) | **GET** /orgs/{org}/labels | List an organization's labels -*OrganizationApi* | [**org_list_members**](docs/OrganizationApi.md#org_list_members) | **GET** /orgs/{org}/members | List an organization's members -*OrganizationApi* | [**org_list_public_members**](docs/OrganizationApi.md#org_list_public_members) | **GET** /orgs/{org}/public_members | List an organization's public members -*OrganizationApi* | [**org_list_quota_artifacts**](docs/OrganizationApi.md#org_list_quota_artifacts) | **GET** /orgs/{org}/quota/artifacts | List the artifacts affecting the organization's quota -*OrganizationApi* | [**org_list_quota_attachments**](docs/OrganizationApi.md#org_list_quota_attachments) | **GET** /orgs/{org}/quota/attachments | List the attachments affecting the organization's quota -*OrganizationApi* | [**org_list_quota_packages**](docs/OrganizationApi.md#org_list_quota_packages) | **GET** /orgs/{org}/quota/packages | List the packages affecting the organization's quota -*OrganizationApi* | [**org_list_repos**](docs/OrganizationApi.md#org_list_repos) | **GET** /orgs/{org}/repos | List an organization's repos -*OrganizationApi* | [**org_list_team_activity_feeds**](docs/OrganizationApi.md#org_list_team_activity_feeds) | **GET** /teams/{id}/activities/feeds | List a team's activity feeds -*OrganizationApi* | [**org_list_team_member**](docs/OrganizationApi.md#org_list_team_member) | **GET** /teams/{id}/members/{username} | List a particular member of team -*OrganizationApi* | [**org_list_team_members**](docs/OrganizationApi.md#org_list_team_members) | **GET** /teams/{id}/members | List a team's members -*OrganizationApi* | [**org_list_team_repo**](docs/OrganizationApi.md#org_list_team_repo) | **GET** /teams/{id}/repos/{org}/{repo} | List a particular repo of team -*OrganizationApi* | [**org_list_team_repos**](docs/OrganizationApi.md#org_list_team_repos) | **GET** /teams/{id}/repos | List a team's repos -*OrganizationApi* | [**org_list_teams**](docs/OrganizationApi.md#org_list_teams) | **GET** /orgs/{org}/teams | List an organization's teams -*OrganizationApi* | [**org_list_user_orgs**](docs/OrganizationApi.md#org_list_user_orgs) | **GET** /users/{username}/orgs | List a user's organizations -*OrganizationApi* | [**org_publicize_member**](docs/OrganizationApi.md#org_publicize_member) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership -*OrganizationApi* | [**org_remove_team_member**](docs/OrganizationApi.md#org_remove_team_member) | **DELETE** /teams/{id}/members/{username} | Remove a team member -*OrganizationApi* | [**org_remove_team_repository**](docs/OrganizationApi.md#org_remove_team_repository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team -*OrganizationApi* | [**org_search_run_jobs**](docs/OrganizationApi.md#org_search_run_jobs) | **GET** /orgs/{org}/actions/runners/jobs | Search for organization's action jobs according filter conditions -*OrganizationApi* | [**org_unblock_user**](docs/OrganizationApi.md#org_unblock_user) | **PUT** /orgs/{org}/unblock/{username} | Unblock a user from the organization -*OrganizationApi* | [**org_update_avatar**](docs/OrganizationApi.md#org_update_avatar) | **POST** /orgs/{org}/avatar | Update an organization's avatar -*OrganizationApi* | [**rename_org**](docs/OrganizationApi.md#rename_org) | **POST** /orgs/{org}/rename | Rename an organization -*OrganizationApi* | [**team_search**](docs/OrganizationApi.md#team_search) | **GET** /orgs/{org}/teams/search | Search for teams within an organization -*OrganizationApi* | [**update_org_secret**](docs/OrganizationApi.md#update_org_secret) | **PUT** /orgs/{org}/actions/secrets/{secretname} | Create or Update a secret value in an organization -*OrganizationApi* | [**update_org_variable**](docs/OrganizationApi.md#update_org_variable) | **PUT** /orgs/{org}/actions/variables/{variablename} | Update variable in organization -*PackageApi* | [**delete_package**](docs/PackageApi.md#delete_package) | **DELETE** /packages/{owner}/{type}/{name}/{version} | Delete a package -*PackageApi* | [**get_package**](docs/PackageApi.md#get_package) | **GET** /packages/{owner}/{type}/{name}/{version} | Gets a package -*PackageApi* | [**link_package**](docs/PackageApi.md#link_package) | **POST** /packages/{owner}/{type}/{name}/-/link/{repo_name} | Link a package to a repository -*PackageApi* | [**list_package_files**](docs/PackageApi.md#list_package_files) | **GET** /packages/{owner}/{type}/{name}/{version}/files | Gets all files of a package -*PackageApi* | [**list_packages**](docs/PackageApi.md#list_packages) | **GET** /packages/{owner} | Gets all packages of an owner -*PackageApi* | [**unlink_package**](docs/PackageApi.md#unlink_package) | **POST** /packages/{owner}/{type}/{name}/-/unlink | Unlink a package from a repository -*RepositoryApi* | [**accept_repo_transfer**](docs/RepositoryApi.md#accept_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/accept | Accept a repo transfer -*RepositoryApi* | [**action_run**](docs/RepositoryApi.md#action_run) | **GET** /repos/{owner}/{repo}/actions/runs/{run_id} | Get an action run -*RepositoryApi* | [**create_current_user_repo**](docs/RepositoryApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository -*RepositoryApi* | [**create_fork**](docs/RepositoryApi.md#create_fork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository -*RepositoryApi* | [**create_repo_variable**](docs/RepositoryApi.md#create_repo_variable) | **POST** /repos/{owner}/{repo}/actions/variables/{variablename} | Create a repo-level variable -*RepositoryApi* | [**delete_repo_secret**](docs/RepositoryApi.md#delete_repo_secret) | **DELETE** /repos/{owner}/{repo}/actions/secrets/{secretname} | Delete a secret in a repository -*RepositoryApi* | [**delete_repo_variable**](docs/RepositoryApi.md#delete_repo_variable) | **DELETE** /repos/{owner}/{repo}/actions/variables/{variablename} | Delete a repo-level variable -*RepositoryApi* | [**dispatch_workflow**](docs/RepositoryApi.md#dispatch_workflow) | **POST** /repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches | Dispatches a workflow -*RepositoryApi* | [**generate_repo**](docs/RepositoryApi.md#generate_repo) | **POST** /repos/{template_owner}/{template_repo}/generate | Create a repository using a template -*RepositoryApi* | [**get_annotated_tag**](docs/RepositoryApi.md#get_annotated_tag) | **GET** /repos/{owner}/{repo}/git/tags/{sha} | Gets the tag object of an annotated tag (not lightweight tags) -*RepositoryApi* | [**get_blob**](docs/RepositoryApi.md#get_blob) | **GET** /repos/{owner}/{repo}/git/blobs/{sha} | Gets the blob of a repository. -*RepositoryApi* | [**get_blobs**](docs/RepositoryApi.md#get_blobs) | **GET** /repos/{owner}/{repo}/git/blobs | Gets multiple blobs of a repository. -*RepositoryApi* | [**get_repo_variable**](docs/RepositoryApi.md#get_repo_variable) | **GET** /repos/{owner}/{repo}/actions/variables/{variablename} | Get a repo-level variable -*RepositoryApi* | [**get_repo_variables_list**](docs/RepositoryApi.md#get_repo_variables_list) | **GET** /repos/{owner}/{repo}/actions/variables | Get repo-level variables list -*RepositoryApi* | [**get_tree**](docs/RepositoryApi.md#get_tree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. -*RepositoryApi* | [**list_action_runs**](docs/RepositoryApi.md#list_action_runs) | **GET** /repos/{owner}/{repo}/actions/runs | List a repository's action runs -*RepositoryApi* | [**list_action_tasks**](docs/RepositoryApi.md#list_action_tasks) | **GET** /repos/{owner}/{repo}/actions/tasks | List a repository's action tasks -*RepositoryApi* | [**list_forks**](docs/RepositoryApi.md#list_forks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks -*RepositoryApi* | [**reject_repo_transfer**](docs/RepositoryApi.md#reject_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/reject | Reject a repo transfer -*RepositoryApi* | [**repo_add_collaborator**](docs/RepositoryApi.md#repo_add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add a collaborator to a repository -*RepositoryApi* | [**repo_add_flag**](docs/RepositoryApi.md#repo_add_flag) | **PUT** /repos/{owner}/{repo}/flags/{flag} | Add a flag to a repository -*RepositoryApi* | [**repo_add_push_mirror**](docs/RepositoryApi.md#repo_add_push_mirror) | **POST** /repos/{owner}/{repo}/push_mirrors | Set up a new push mirror in a repository -*RepositoryApi* | [**repo_add_team**](docs/RepositoryApi.md#repo_add_team) | **PUT** /repos/{owner}/{repo}/teams/{team} | Add a team to a repository -*RepositoryApi* | [**repo_add_topic**](docs/RepositoryApi.md#repo_add_topic) | **PUT** /repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository -*RepositoryApi* | [**repo_apply_diff_patch**](docs/RepositoryApi.md#repo_apply_diff_patch) | **POST** /repos/{owner}/{repo}/diffpatch | Apply diff patch to repository -*RepositoryApi* | [**repo_cancel_scheduled_auto_merge**](docs/RepositoryApi.md#repo_cancel_scheduled_auto_merge) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/merge | Cancel the scheduled auto merge for the given pull request -*RepositoryApi* | [**repo_change_files**](docs/RepositoryApi.md#repo_change_files) | **POST** /repos/{owner}/{repo}/contents | Modify multiple files in a repository -*RepositoryApi* | [**repo_check_collaborator**](docs/RepositoryApi.md#repo_check_collaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository -*RepositoryApi* | [**repo_check_flag**](docs/RepositoryApi.md#repo_check_flag) | **GET** /repos/{owner}/{repo}/flags/{flag} | Check if a repository has a given flag -*RepositoryApi* | [**repo_check_team**](docs/RepositoryApi.md#repo_check_team) | **GET** /repos/{owner}/{repo}/teams/{team} | Check if a team is assigned to a repository -*RepositoryApi* | [**repo_compare_diff**](docs/RepositoryApi.md#repo_compare_diff) | **GET** /repos/{owner}/{repo}/compare/{basehead} | Get commit comparison information -*RepositoryApi* | [**repo_convert**](docs/RepositoryApi.md#repo_convert) | **POST** /repos/{owner}/{repo}/convert | Convert a mirror repo to a normal repo. -*RepositoryApi* | [**repo_create_branch**](docs/RepositoryApi.md#repo_create_branch) | **POST** /repos/{owner}/{repo}/branches | Create a branch -*RepositoryApi* | [**repo_create_branch_protection**](docs/RepositoryApi.md#repo_create_branch_protection) | **POST** /repos/{owner}/{repo}/branch_protections | Create a branch protections for a repository -*RepositoryApi* | [**repo_create_file**](docs/RepositoryApi.md#repo_create_file) | **POST** /repos/{owner}/{repo}/contents/{filepath} | Create a file in a repository -*RepositoryApi* | [**repo_create_hook**](docs/RepositoryApi.md#repo_create_hook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -*RepositoryApi* | [**repo_create_key**](docs/RepositoryApi.md#repo_create_key) | **POST** /repos/{owner}/{repo}/keys | Add a key to a repository -*RepositoryApi* | [**repo_create_pull_request**](docs/RepositoryApi.md#repo_create_pull_request) | **POST** /repos/{owner}/{repo}/pulls | Create a pull request -*RepositoryApi* | [**repo_create_pull_review**](docs/RepositoryApi.md#repo_create_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews | Create a review to an pull request -*RepositoryApi* | [**repo_create_pull_review_comment**](docs/RepositoryApi.md#repo_create_pull_review_comment) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Add a new comment to a pull request review -*RepositoryApi* | [**repo_create_pull_review_requests**](docs/RepositoryApi.md#repo_create_pull_review_requests) | **POST** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | Create review requests for a pull request -*RepositoryApi* | [**repo_create_release**](docs/RepositoryApi.md#repo_create_release) | **POST** /repos/{owner}/{repo}/releases | Create a release -*RepositoryApi* | [**repo_create_release_attachment**](docs/RepositoryApi.md#repo_create_release_attachment) | **POST** /repos/{owner}/{repo}/releases/{id}/assets | Create a release attachment -*RepositoryApi* | [**repo_create_status**](docs/RepositoryApi.md#repo_create_status) | **POST** /repos/{owner}/{repo}/statuses/{sha} | Create a commit status -*RepositoryApi* | [**repo_create_tag**](docs/RepositoryApi.md#repo_create_tag) | **POST** /repos/{owner}/{repo}/tags | Create a new git tag in a repository -*RepositoryApi* | [**repo_create_tag_protection**](docs/RepositoryApi.md#repo_create_tag_protection) | **POST** /repos/{owner}/{repo}/tag_protections | Create a tag protections for a repository -*RepositoryApi* | [**repo_create_wiki_page**](docs/RepositoryApi.md#repo_create_wiki_page) | **POST** /repos/{owner}/{repo}/wiki/new | Create a wiki page -*RepositoryApi* | [**repo_delete**](docs/RepositoryApi.md#repo_delete) | **DELETE** /repos/{owner}/{repo} | Delete a repository -*RepositoryApi* | [**repo_delete_all_flags**](docs/RepositoryApi.md#repo_delete_all_flags) | **DELETE** /repos/{owner}/{repo}/flags | Remove all flags from a repository -*RepositoryApi* | [**repo_delete_avatar**](docs/RepositoryApi.md#repo_delete_avatar) | **DELETE** /repos/{owner}/{repo}/avatar | Delete a repository's avatar -*RepositoryApi* | [**repo_delete_branch**](docs/RepositoryApi.md#repo_delete_branch) | **DELETE** /repos/{owner}/{repo}/branches/{branch} | Delete a specific branch from a repository -*RepositoryApi* | [**repo_delete_branch_protection**](docs/RepositoryApi.md#repo_delete_branch_protection) | **DELETE** /repos/{owner}/{repo}/branch_protections/{name} | Delete a specific branch protection for the repository -*RepositoryApi* | [**repo_delete_collaborator**](docs/RepositoryApi.md#repo_delete_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository -*RepositoryApi* | [**repo_delete_file**](docs/RepositoryApi.md#repo_delete_file) | **DELETE** /repos/{owner}/{repo}/contents/{filepath} | Delete a file in a repository -*RepositoryApi* | [**repo_delete_flag**](docs/RepositoryApi.md#repo_delete_flag) | **DELETE** /repos/{owner}/{repo}/flags/{flag} | Remove a flag from a repository -*RepositoryApi* | [**repo_delete_git_hook**](docs/RepositoryApi.md#repo_delete_git_hook) | **DELETE** /repos/{owner}/{repo}/hooks/git/{id} | Delete a Git hook in a repository -*RepositoryApi* | [**repo_delete_hook**](docs/RepositoryApi.md#repo_delete_hook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook in a repository -*RepositoryApi* | [**repo_delete_key**](docs/RepositoryApi.md#repo_delete_key) | **DELETE** /repos/{owner}/{repo}/keys/{id} | Delete a key from a repository -*RepositoryApi* | [**repo_delete_pull_review**](docs/RepositoryApi.md#repo_delete_pull_review) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Delete a specific review from a pull request -*RepositoryApi* | [**repo_delete_pull_review_comment**](docs/RepositoryApi.md#repo_delete_pull_review_comment) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment} | Delete a pull review comment -*RepositoryApi* | [**repo_delete_pull_review_requests**](docs/RepositoryApi.md#repo_delete_pull_review_requests) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | Cancel review requests for a pull request -*RepositoryApi* | [**repo_delete_push_mirror**](docs/RepositoryApi.md#repo_delete_push_mirror) | **DELETE** /repos/{owner}/{repo}/push_mirrors/{name} | Remove a push mirror from a repository by remoteName -*RepositoryApi* | [**repo_delete_release**](docs/RepositoryApi.md#repo_delete_release) | **DELETE** /repos/{owner}/{repo}/releases/{id} | Delete a release -*RepositoryApi* | [**repo_delete_release_attachment**](docs/RepositoryApi.md#repo_delete_release_attachment) | **DELETE** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment -*RepositoryApi* | [**repo_delete_release_by_tag**](docs/RepositoryApi.md#repo_delete_release_by_tag) | **DELETE** /repos/{owner}/{repo}/releases/tags/{tag} | Delete a release by tag name -*RepositoryApi* | [**repo_delete_tag**](docs/RepositoryApi.md#repo_delete_tag) | **DELETE** /repos/{owner}/{repo}/tags/{tag} | Delete a repository's tag by name -*RepositoryApi* | [**repo_delete_tag_protection**](docs/RepositoryApi.md#repo_delete_tag_protection) | **DELETE** /repos/{owner}/{repo}/tag_protections/{id} | Delete a specific tag protection for the repository -*RepositoryApi* | [**repo_delete_team**](docs/RepositoryApi.md#repo_delete_team) | **DELETE** /repos/{owner}/{repo}/teams/{team} | Delete a team from a repository -*RepositoryApi* | [**repo_delete_topic**](docs/RepositoryApi.md#repo_delete_topic) | **DELETE** /repos/{owner}/{repo}/topics/{topic} | Delete a topic from a repository -*RepositoryApi* | [**repo_delete_wiki_page**](docs/RepositoryApi.md#repo_delete_wiki_page) | **DELETE** /repos/{owner}/{repo}/wiki/page/{pageName} | Delete a wiki page -*RepositoryApi* | [**repo_dismiss_pull_review**](docs/RepositoryApi.md#repo_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals | Dismiss a review for a pull request -*RepositoryApi* | [**repo_download_commit_diff_or_patch**](docs/RepositoryApi.md#repo_download_commit_diff_or_patch) | **GET** /repos/{owner}/{repo}/git/commits/{sha}.{diffType} | Get a commit's diff or patch -*RepositoryApi* | [**repo_download_pull_diff_or_patch**](docs/RepositoryApi.md#repo_download_pull_diff_or_patch) | **GET** /repos/{owner}/{repo}/pulls/{index}.{diffType} | Get a pull request diff or patch -*RepositoryApi* | [**repo_edit**](docs/RepositoryApi.md#repo_edit) | **PATCH** /repos/{owner}/{repo} | Edit a repository's properties. Only fields that are set will be changed. -*RepositoryApi* | [**repo_edit_branch_protection**](docs/RepositoryApi.md#repo_edit_branch_protection) | **PATCH** /repos/{owner}/{repo}/branch_protections/{name} | Edit a branch protections for a repository. Only fields that are set will be changed -*RepositoryApi* | [**repo_edit_git_hook**](docs/RepositoryApi.md#repo_edit_git_hook) | **PATCH** /repos/{owner}/{repo}/hooks/git/{id} | Edit a Git hook in a repository -*RepositoryApi* | [**repo_edit_hook**](docs/RepositoryApi.md#repo_edit_hook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook in a repository -*RepositoryApi* | [**repo_edit_pull_request**](docs/RepositoryApi.md#repo_edit_pull_request) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. -*RepositoryApi* | [**repo_edit_release**](docs/RepositoryApi.md#repo_edit_release) | **PATCH** /repos/{owner}/{repo}/releases/{id} | Update a release -*RepositoryApi* | [**repo_edit_release_attachment**](docs/RepositoryApi.md#repo_edit_release_attachment) | **PATCH** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment -*RepositoryApi* | [**repo_edit_tag_protection**](docs/RepositoryApi.md#repo_edit_tag_protection) | **PATCH** /repos/{owner}/{repo}/tag_protections/{id} | Edit a tag protections for a repository. Only fields that are set will be changed -*RepositoryApi* | [**repo_edit_wiki_page**](docs/RepositoryApi.md#repo_edit_wiki_page) | **PATCH** /repos/{owner}/{repo}/wiki/page/{pageName} | Edit a wiki page -*RepositoryApi* | [**repo_get**](docs/RepositoryApi.md#repo_get) | **GET** /repos/{owner}/{repo} | Get a repository -*RepositoryApi* | [**repo_get_all_commits**](docs/RepositoryApi.md#repo_get_all_commits) | **GET** /repos/{owner}/{repo}/commits | Get a list of all commits from a repository -*RepositoryApi* | [**repo_get_archive**](docs/RepositoryApi.md#repo_get_archive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository -*RepositoryApi* | [**repo_get_assignees**](docs/RepositoryApi.md#repo_get_assignees) | **GET** /repos/{owner}/{repo}/assignees | Return all users that have write access and can be assigned to issues -*RepositoryApi* | [**repo_get_branch**](docs/RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository, including its effective branch protection -*RepositoryApi* | [**repo_get_branch_protection**](docs/RepositoryApi.md#repo_get_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections/{name} | Get a specific branch protection for the repository -*RepositoryApi* | [**repo_get_by_id**](docs/RepositoryApi.md#repo_get_by_id) | **GET** /repositories/{id} | Get a repository by id -*RepositoryApi* | [**repo_get_combined_status_by_ref**](docs/RepositoryApi.md#repo_get_combined_status_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/status | Get a commit's combined status, by branch/tag/commit reference -*RepositoryApi* | [**repo_get_commit_pull_request**](docs/RepositoryApi.md#repo_get_commit_pull_request) | **GET** /repos/{owner}/{repo}/commits/{sha}/pull | Get the pull request of the commit -*RepositoryApi* | [**repo_get_contents**](docs/RepositoryApi.md#repo_get_contents) | **GET** /repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir -*RepositoryApi* | [**repo_get_contents_list**](docs/RepositoryApi.md#repo_get_contents_list) | **GET** /repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir -*RepositoryApi* | [**repo_get_editor_config**](docs/RepositoryApi.md#repo_get_editor_config) | **GET** /repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository -*RepositoryApi* | [**repo_get_git_hook**](docs/RepositoryApi.md#repo_get_git_hook) | **GET** /repos/{owner}/{repo}/hooks/git/{id} | Get a Git hook -*RepositoryApi* | [**repo_get_hook**](docs/RepositoryApi.md#repo_get_hook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook -*RepositoryApi* | [**repo_get_issue_config**](docs/RepositoryApi.md#repo_get_issue_config) | **GET** /repos/{owner}/{repo}/issue_config | Returns the issue config for a repo -*RepositoryApi* | [**repo_get_issue_templates**](docs/RepositoryApi.md#repo_get_issue_templates) | **GET** /repos/{owner}/{repo}/issue_templates | Get available issue templates for a repository -*RepositoryApi* | [**repo_get_key**](docs/RepositoryApi.md#repo_get_key) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id -*RepositoryApi* | [**repo_get_languages**](docs/RepositoryApi.md#repo_get_languages) | **GET** /repos/{owner}/{repo}/languages | Get languages and number of bytes of code written -*RepositoryApi* | [**repo_get_latest_release**](docs/RepositoryApi.md#repo_get_latest_release) | **GET** /repos/{owner}/{repo}/releases/latest | Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at -*RepositoryApi* | [**repo_get_note**](docs/RepositoryApi.md#repo_get_note) | **GET** /repos/{owner}/{repo}/git/notes/{sha} | Get a note corresponding to a single commit from a repository -*RepositoryApi* | [**repo_get_pull_request**](docs/RepositoryApi.md#repo_get_pull_request) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request -*RepositoryApi* | [**repo_get_pull_request_by_base_head**](docs/RepositoryApi.md#repo_get_pull_request_by_base_head) | **GET** /repos/{owner}/{repo}/pulls/{base}/{head} | Get a pull request by base and head -*RepositoryApi* | [**repo_get_pull_request_commits**](docs/RepositoryApi.md#repo_get_pull_request_commits) | **GET** /repos/{owner}/{repo}/pulls/{index}/commits | Get commits for a pull request -*RepositoryApi* | [**repo_get_pull_request_files**](docs/RepositoryApi.md#repo_get_pull_request_files) | **GET** /repos/{owner}/{repo}/pulls/{index}/files | Get changed files for a pull request -*RepositoryApi* | [**repo_get_pull_review**](docs/RepositoryApi.md#repo_get_pull_review) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Get a specific review for a pull request -*RepositoryApi* | [**repo_get_pull_review_comment**](docs/RepositoryApi.md#repo_get_pull_review_comment) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment} | Get a pull review comment -*RepositoryApi* | [**repo_get_pull_review_comments**](docs/RepositoryApi.md#repo_get_pull_review_comments) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Get a specific review for a pull request -*RepositoryApi* | [**repo_get_push_mirror_by_remote_name**](docs/RepositoryApi.md#repo_get_push_mirror_by_remote_name) | **GET** /repos/{owner}/{repo}/push_mirrors/{name} | Get push mirror of the repository by remoteName -*RepositoryApi* | [**repo_get_raw_file**](docs/RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository -*RepositoryApi* | [**repo_get_raw_file_or_lfs**](docs/RepositoryApi.md#repo_get_raw_file_or_lfs) | **GET** /repos/{owner}/{repo}/media/{filepath} | Get a file or it's LFS object from a repository -*RepositoryApi* | [**repo_get_release**](docs/RepositoryApi.md#repo_get_release) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release -*RepositoryApi* | [**repo_get_release_attachment**](docs/RepositoryApi.md#repo_get_release_attachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment -*RepositoryApi* | [**repo_get_release_by_tag**](docs/RepositoryApi.md#repo_get_release_by_tag) | **GET** /repos/{owner}/{repo}/releases/tags/{tag} | Get a release by tag name -*RepositoryApi* | [**repo_get_repo_permissions**](docs/RepositoryApi.md#repo_get_repo_permissions) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator}/permission | Get repository permissions for a user -*RepositoryApi* | [**repo_get_reviewers**](docs/RepositoryApi.md#repo_get_reviewers) | **GET** /repos/{owner}/{repo}/reviewers | Return all users that can be requested to review in this repo -*RepositoryApi* | [**repo_get_runner_registration_token**](docs/RepositoryApi.md#repo_get_runner_registration_token) | **GET** /repos/{owner}/{repo}/actions/runners/registration-token | Get a repository's actions runner registration token -*RepositoryApi* | [**repo_get_single_commit**](docs/RepositoryApi.md#repo_get_single_commit) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository -*RepositoryApi* | [**repo_get_tag**](docs/RepositoryApi.md#repo_get_tag) | **GET** /repos/{owner}/{repo}/tags/{tag} | Get the tag of a repository by tag name -*RepositoryApi* | [**repo_get_tag_protection**](docs/RepositoryApi.md#repo_get_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections/{id} | Get a specific tag protection for the repository -*RepositoryApi* | [**repo_get_wiki_page**](docs/RepositoryApi.md#repo_get_wiki_page) | **GET** /repos/{owner}/{repo}/wiki/page/{pageName} | Get a wiki page -*RepositoryApi* | [**repo_get_wiki_page_revisions**](docs/RepositoryApi.md#repo_get_wiki_page_revisions) | **GET** /repos/{owner}/{repo}/wiki/revisions/{pageName} | Get revisions of a wiki page -*RepositoryApi* | [**repo_get_wiki_pages**](docs/RepositoryApi.md#repo_get_wiki_pages) | **GET** /repos/{owner}/{repo}/wiki/pages | Get all wiki pages -*RepositoryApi* | [**repo_list_actions_secrets**](docs/RepositoryApi.md#repo_list_actions_secrets) | **GET** /repos/{owner}/{repo}/actions/secrets | List an repo's actions secrets -*RepositoryApi* | [**repo_list_activity_feeds**](docs/RepositoryApi.md#repo_list_activity_feeds) | **GET** /repos/{owner}/{repo}/activities/feeds | List a repository's activity feeds -*RepositoryApi* | [**repo_list_all_git_refs**](docs/RepositoryApi.md#repo_list_all_git_refs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs -*RepositoryApi* | [**repo_list_branch_protection**](docs/RepositoryApi.md#repo_list_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections | List branch protections for a repository -*RepositoryApi* | [**repo_list_branches**](docs/RepositoryApi.md#repo_list_branches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches -*RepositoryApi* | [**repo_list_collaborators**](docs/RepositoryApi.md#repo_list_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators -*RepositoryApi* | [**repo_list_flags**](docs/RepositoryApi.md#repo_list_flags) | **GET** /repos/{owner}/{repo}/flags | List a repository's flags -*RepositoryApi* | [**repo_list_git_hooks**](docs/RepositoryApi.md#repo_list_git_hooks) | **GET** /repos/{owner}/{repo}/hooks/git | List the Git hooks in a repository -*RepositoryApi* | [**repo_list_git_refs**](docs/RepositoryApi.md#repo_list_git_refs) | **GET** /repos/{owner}/{repo}/git/refs/{ref} | Get specified ref or filtered repository's refs -*RepositoryApi* | [**repo_list_hooks**](docs/RepositoryApi.md#repo_list_hooks) | **GET** /repos/{owner}/{repo}/hooks | List the hooks in a repository -*RepositoryApi* | [**repo_list_keys**](docs/RepositoryApi.md#repo_list_keys) | **GET** /repos/{owner}/{repo}/keys | List a repository's keys -*RepositoryApi* | [**repo_list_pinned_issues**](docs/RepositoryApi.md#repo_list_pinned_issues) | **GET** /repos/{owner}/{repo}/issues/pinned | List a repo's pinned issues -*RepositoryApi* | [**repo_list_pinned_pull_requests**](docs/RepositoryApi.md#repo_list_pinned_pull_requests) | **GET** /repos/{owner}/{repo}/pulls/pinned | List a repo's pinned pull requests -*RepositoryApi* | [**repo_list_pull_requests**](docs/RepositoryApi.md#repo_list_pull_requests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results. -*RepositoryApi* | [**repo_list_pull_reviews**](docs/RepositoryApi.md#repo_list_pull_reviews) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews | List all reviews for a pull request -*RepositoryApi* | [**repo_list_push_mirrors**](docs/RepositoryApi.md#repo_list_push_mirrors) | **GET** /repos/{owner}/{repo}/push_mirrors | Get all push mirrors of the repository -*RepositoryApi* | [**repo_list_release_attachments**](docs/RepositoryApi.md#repo_list_release_attachments) | **GET** /repos/{owner}/{repo}/releases/{id}/assets | List release's attachments -*RepositoryApi* | [**repo_list_releases**](docs/RepositoryApi.md#repo_list_releases) | **GET** /repos/{owner}/{repo}/releases | List a repo's releases -*RepositoryApi* | [**repo_list_stargazers**](docs/RepositoryApi.md#repo_list_stargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers -*RepositoryApi* | [**repo_list_statuses**](docs/RepositoryApi.md#repo_list_statuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses -*RepositoryApi* | [**repo_list_statuses_by_ref**](docs/RepositoryApi.md#repo_list_statuses_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's statuses, by branch/tag/commit reference -*RepositoryApi* | [**repo_list_subscribers**](docs/RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers -*RepositoryApi* | [**repo_list_tag_protection**](docs/RepositoryApi.md#repo_list_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections | List tag protections for a repository -*RepositoryApi* | [**repo_list_tags**](docs/RepositoryApi.md#repo_list_tags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags -*RepositoryApi* | [**repo_list_teams**](docs/RepositoryApi.md#repo_list_teams) | **GET** /repos/{owner}/{repo}/teams | List a repository's teams -*RepositoryApi* | [**repo_list_topics**](docs/RepositoryApi.md#repo_list_topics) | **GET** /repos/{owner}/{repo}/topics | Get list of topics that a repository has -*RepositoryApi* | [**repo_merge_pull_request**](docs/RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request -*RepositoryApi* | [**repo_migrate**](docs/RepositoryApi.md#repo_migrate) | **POST** /repos/migrate | Migrate a remote git repository -*RepositoryApi* | [**repo_mirror_sync**](docs/RepositoryApi.md#repo_mirror_sync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository -*RepositoryApi* | [**repo_new_pin_allowed**](docs/RepositoryApi.md#repo_new_pin_allowed) | **GET** /repos/{owner}/{repo}/new_pin_allowed | Returns if new Issue Pins are allowed -*RepositoryApi* | [**repo_pull_request_is_merged**](docs/RepositoryApi.md#repo_pull_request_is_merged) | **GET** /repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged -*RepositoryApi* | [**repo_push_mirror_sync**](docs/RepositoryApi.md#repo_push_mirror_sync) | **POST** /repos/{owner}/{repo}/push_mirrors-sync | Sync all push mirrored repository -*RepositoryApi* | [**repo_remove_note**](docs/RepositoryApi.md#repo_remove_note) | **DELETE** /repos/{owner}/{repo}/git/notes/{sha} | Removes a note corresponding to a single commit from a repository -*RepositoryApi* | [**repo_replace_all_flags**](docs/RepositoryApi.md#repo_replace_all_flags) | **PUT** /repos/{owner}/{repo}/flags | Replace all flags of a repository -*RepositoryApi* | [**repo_search**](docs/RepositoryApi.md#repo_search) | **GET** /repos/search | Search for repositories -*RepositoryApi* | [**repo_search_run_jobs**](docs/RepositoryApi.md#repo_search_run_jobs) | **GET** /repos/{owner}/{repo}/actions/runners/jobs | Search for repository's action jobs according filter conditions -*RepositoryApi* | [**repo_set_note**](docs/RepositoryApi.md#repo_set_note) | **POST** /repos/{owner}/{repo}/git/notes/{sha} | Set a note corresponding to a single commit from a repository -*RepositoryApi* | [**repo_signing_key**](docs/RepositoryApi.md#repo_signing_key) | **GET** /repos/{owner}/{repo}/signing-key.gpg | Get signing-key.gpg for given repository -*RepositoryApi* | [**repo_submit_pull_review**](docs/RepositoryApi.md#repo_submit_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Submit a pending review to an pull request -*RepositoryApi* | [**repo_sync_fork_branch**](docs/RepositoryApi.md#repo_sync_fork_branch) | **POST** /repos/{owner}/{repo}/sync_fork/{branch} | Syncs a fork branch with the base branch -*RepositoryApi* | [**repo_sync_fork_branch_info**](docs/RepositoryApi.md#repo_sync_fork_branch_info) | **GET** /repos/{owner}/{repo}/sync_fork/{branch} | Gets information about syncing a fork branch with the base branch -*RepositoryApi* | [**repo_sync_fork_default**](docs/RepositoryApi.md#repo_sync_fork_default) | **POST** /repos/{owner}/{repo}/sync_fork | Syncs the default branch of a fork with the base branch -*RepositoryApi* | [**repo_sync_fork_default_info**](docs/RepositoryApi.md#repo_sync_fork_default_info) | **GET** /repos/{owner}/{repo}/sync_fork | Gets information about syncing the fork default branch with the base branch -*RepositoryApi* | [**repo_test_hook**](docs/RepositoryApi.md#repo_test_hook) | **POST** /repos/{owner}/{repo}/hooks/{id}/tests | Test a push webhook -*RepositoryApi* | [**repo_tracked_times**](docs/RepositoryApi.md#repo_tracked_times) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times -*RepositoryApi* | [**repo_transfer**](docs/RepositoryApi.md#repo_transfer) | **POST** /repos/{owner}/{repo}/transfer | Transfer a repo ownership -*RepositoryApi* | [**repo_un_dismiss_pull_review**](docs/RepositoryApi.md#repo_un_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals | Cancel to dismiss a review for a pull request -*RepositoryApi* | [**repo_update_avatar**](docs/RepositoryApi.md#repo_update_avatar) | **POST** /repos/{owner}/{repo}/avatar | Update a repository's avatar -*RepositoryApi* | [**repo_update_branch**](docs/RepositoryApi.md#repo_update_branch) | **PATCH** /repos/{owner}/{repo}/branches/{branch} | Update a branch -*RepositoryApi* | [**repo_update_file**](docs/RepositoryApi.md#repo_update_file) | **PUT** /repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository -*RepositoryApi* | [**repo_update_pull_request**](docs/RepositoryApi.md#repo_update_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/update | Merge PR's baseBranch into headBranch -*RepositoryApi* | [**repo_update_topics**](docs/RepositoryApi.md#repo_update_topics) | **PUT** /repos/{owner}/{repo}/topics | Replace list of topics for a repository -*RepositoryApi* | [**repo_validate_issue_config**](docs/RepositoryApi.md#repo_validate_issue_config) | **GET** /repos/{owner}/{repo}/issue_config/validate | Returns the validation information for a issue config -*RepositoryApi* | [**topic_search**](docs/RepositoryApi.md#topic_search) | **GET** /topics/search | Search for topics by keyword -*RepositoryApi* | [**update_repo_secret**](docs/RepositoryApi.md#update_repo_secret) | **PUT** /repos/{owner}/{repo}/actions/secrets/{secretname} | Create or Update a secret value in a repository -*RepositoryApi* | [**update_repo_variable**](docs/RepositoryApi.md#update_repo_variable) | **PUT** /repos/{owner}/{repo}/actions/variables/{variablename} | Update a repo-level variable -*RepositoryApi* | [**user_current_check_subscription**](docs/RepositoryApi.md#user_current_check_subscription) | **GET** /repos/{owner}/{repo}/subscription | Check if the current user is watching a repo -*RepositoryApi* | [**user_current_delete_subscription**](docs/RepositoryApi.md#user_current_delete_subscription) | **DELETE** /repos/{owner}/{repo}/subscription | Unwatch a repo -*RepositoryApi* | [**user_current_put_subscription**](docs/RepositoryApi.md#user_current_put_subscription) | **PUT** /repos/{owner}/{repo}/subscription | Watch a repo -*RepositoryApi* | [**user_tracked_times**](docs/RepositoryApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo -*SettingsApi* | [**get_general_api_settings**](docs/SettingsApi.md#get_general_api_settings) | **GET** /settings/api | Get instance's global settings for api -*SettingsApi* | [**get_general_attachment_settings**](docs/SettingsApi.md#get_general_attachment_settings) | **GET** /settings/attachment | Get instance's global settings for Attachment -*SettingsApi* | [**get_general_repository_settings**](docs/SettingsApi.md#get_general_repository_settings) | **GET** /settings/repository | Get instance's global settings for repositories -*SettingsApi* | [**get_general_ui_settings**](docs/SettingsApi.md#get_general_ui_settings) | **GET** /settings/ui | Get instance's global settings for ui -*UserApi* | [**create_current_user_repo**](docs/UserApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository -*UserApi* | [**create_user_variable**](docs/UserApi.md#create_user_variable) | **POST** /user/actions/variables/{variablename} | Create a user-level variable -*UserApi* | [**delete_user_secret**](docs/UserApi.md#delete_user_secret) | **DELETE** /user/actions/secrets/{secretname} | Delete a secret in a user scope -*UserApi* | [**delete_user_variable**](docs/UserApi.md#delete_user_variable) | **DELETE** /user/actions/variables/{variablename} | Delete a user-level variable which is created by current doer -*UserApi* | [**get_user_settings**](docs/UserApi.md#get_user_settings) | **GET** /user/settings | Get current user's account settings -*UserApi* | [**get_user_variable**](docs/UserApi.md#get_user_variable) | **GET** /user/actions/variables/{variablename} | Get a user-level variable which is created by current doer -*UserApi* | [**get_user_variables_list**](docs/UserApi.md#get_user_variables_list) | **GET** /user/actions/variables | Get the user-level list of variables which is created by current doer -*UserApi* | [**get_verification_token**](docs/UserApi.md#get_verification_token) | **GET** /user/gpg_key_token | Get a Token to verify -*UserApi* | [**update_user_secret**](docs/UserApi.md#update_user_secret) | **PUT** /user/actions/secrets/{secretname} | Create or Update a secret value in a user scope -*UserApi* | [**update_user_settings**](docs/UserApi.md#update_user_settings) | **PATCH** /user/settings | Update settings in current user's account -*UserApi* | [**update_user_variable**](docs/UserApi.md#update_user_variable) | **PUT** /user/actions/variables/{variablename} | Update a user-level variable which is created by current doer -*UserApi* | [**user_add_email**](docs/UserApi.md#user_add_email) | **POST** /user/emails | Add an email addresses to the current user's account -*UserApi* | [**user_block_user**](docs/UserApi.md#user_block_user) | **PUT** /user/block/{username} | Blocks a user from the doer -*UserApi* | [**user_check_following**](docs/UserApi.md#user_check_following) | **GET** /users/{username}/following/{target} | Check if one user is following another user -*UserApi* | [**user_check_quota**](docs/UserApi.md#user_check_quota) | **GET** /user/quota/check | Check if the authenticated user is over quota for a given subject -*UserApi* | [**user_create_hook**](docs/UserApi.md#user_create_hook) | **POST** /user/hooks | Create a hook -*UserApi* | [**user_create_o_auth2_application**](docs/UserApi.md#user_create_o_auth2_application) | **POST** /user/applications/oauth2 | Creates a new OAuth2 application -*UserApi* | [**user_create_token**](docs/UserApi.md#user_create_token) | **POST** /users/{username}/tokens | Generate an access token for the specified user -*UserApi* | [**user_current_check_following**](docs/UserApi.md#user_current_check_following) | **GET** /user/following/{username} | Check whether a user is followed by the authenticated user -*UserApi* | [**user_current_check_starring**](docs/UserApi.md#user_current_check_starring) | **GET** /user/starred/{owner}/{repo} | Whether the authenticated is starring the repo -*UserApi* | [**user_current_delete_follow**](docs/UserApi.md#user_current_delete_follow) | **DELETE** /user/following/{username} | Unfollow a user -*UserApi* | [**user_current_delete_gpg_key**](docs/UserApi.md#user_current_delete_gpg_key) | **DELETE** /user/gpg_keys/{id} | Remove a GPG public key from current user's account -*UserApi* | [**user_current_delete_key**](docs/UserApi.md#user_current_delete_key) | **DELETE** /user/keys/{id} | Delete a public key -*UserApi* | [**user_current_delete_star**](docs/UserApi.md#user_current_delete_star) | **DELETE** /user/starred/{owner}/{repo} | Unstar the given repo -*UserApi* | [**user_current_get_gpg_key**](docs/UserApi.md#user_current_get_gpg_key) | **GET** /user/gpg_keys/{id} | Get a GPG key -*UserApi* | [**user_current_get_key**](docs/UserApi.md#user_current_get_key) | **GET** /user/keys/{id} | Get a public key -*UserApi* | [**user_current_list_followers**](docs/UserApi.md#user_current_list_followers) | **GET** /user/followers | List the authenticated user's followers -*UserApi* | [**user_current_list_following**](docs/UserApi.md#user_current_list_following) | **GET** /user/following | List the users that the authenticated user is following -*UserApi* | [**user_current_list_gpg_keys**](docs/UserApi.md#user_current_list_gpg_keys) | **GET** /user/gpg_keys | List the authenticated user's GPG keys -*UserApi* | [**user_current_list_keys**](docs/UserApi.md#user_current_list_keys) | **GET** /user/keys | List the authenticated user's public keys -*UserApi* | [**user_current_list_repos**](docs/UserApi.md#user_current_list_repos) | **GET** /user/repos | List the repos that the authenticated user owns -*UserApi* | [**user_current_list_starred**](docs/UserApi.md#user_current_list_starred) | **GET** /user/starred | The repos that the authenticated user has starred -*UserApi* | [**user_current_list_subscriptions**](docs/UserApi.md#user_current_list_subscriptions) | **GET** /user/subscriptions | List repositories watched by the authenticated user -*UserApi* | [**user_current_post_gpg_key**](docs/UserApi.md#user_current_post_gpg_key) | **POST** /user/gpg_keys | Add a GPG public key to current user's account -*UserApi* | [**user_current_post_key**](docs/UserApi.md#user_current_post_key) | **POST** /user/keys | Create a public key -*UserApi* | [**user_current_put_follow**](docs/UserApi.md#user_current_put_follow) | **PUT** /user/following/{username} | Follow a user -*UserApi* | [**user_current_put_star**](docs/UserApi.md#user_current_put_star) | **PUT** /user/starred/{owner}/{repo} | Star the given repo -*UserApi* | [**user_current_tracked_times**](docs/UserApi.md#user_current_tracked_times) | **GET** /user/times | List the current user's tracked times -*UserApi* | [**user_delete_access_token**](docs/UserApi.md#user_delete_access_token) | **DELETE** /users/{username}/tokens/{token} | Delete an access token from the specified user's account -*UserApi* | [**user_delete_avatar**](docs/UserApi.md#user_delete_avatar) | **DELETE** /user/avatar | Delete avatar of the current user. It will be replaced by a default one -*UserApi* | [**user_delete_email**](docs/UserApi.md#user_delete_email) | **DELETE** /user/emails | Delete email addresses from the current user's account -*UserApi* | [**user_delete_hook**](docs/UserApi.md#user_delete_hook) | **DELETE** /user/hooks/{id} | Delete a hook -*UserApi* | [**user_delete_o_auth2_application**](docs/UserApi.md#user_delete_o_auth2_application) | **DELETE** /user/applications/oauth2/{id} | Delete an OAuth2 application -*UserApi* | [**user_edit_hook**](docs/UserApi.md#user_edit_hook) | **PATCH** /user/hooks/{id} | Update a hook -*UserApi* | [**user_get**](docs/UserApi.md#user_get) | **GET** /users/{username} | Get a user -*UserApi* | [**user_get_current**](docs/UserApi.md#user_get_current) | **GET** /user | Get the authenticated user -*UserApi* | [**user_get_heatmap_data**](docs/UserApi.md#user_get_heatmap_data) | **GET** /users/{username}/heatmap | Get a user's heatmap -*UserApi* | [**user_get_hook**](docs/UserApi.md#user_get_hook) | **GET** /user/hooks/{id} | Get a hook -*UserApi* | [**user_get_o_auth2_application**](docs/UserApi.md#user_get_o_auth2_application) | **GET** /user/applications/oauth2/{id} | Get an OAuth2 application -*UserApi* | [**user_get_o_auth2_applications**](docs/UserApi.md#user_get_o_auth2_applications) | **GET** /user/applications/oauth2 | List the authenticated user's oauth2 applications -*UserApi* | [**user_get_quota**](docs/UserApi.md#user_get_quota) | **GET** /user/quota | Get quota information for the authenticated user -*UserApi* | [**user_get_runner_registration_token**](docs/UserApi.md#user_get_runner_registration_token) | **GET** /user/actions/runners/registration-token | Get an user's actions runner registration token -*UserApi* | [**user_get_stop_watches**](docs/UserApi.md#user_get_stop_watches) | **GET** /user/stopwatches | Get list of all existing stopwatches -*UserApi* | [**user_get_tokens**](docs/UserApi.md#user_get_tokens) | **GET** /users/{username}/tokens | List the specified user's access tokens -*UserApi* | [**user_list_activity_feeds**](docs/UserApi.md#user_list_activity_feeds) | **GET** /users/{username}/activities/feeds | List a user's activity feeds -*UserApi* | [**user_list_blocked_users**](docs/UserApi.md#user_list_blocked_users) | **GET** /user/list_blocked | List the authenticated user's blocked users -*UserApi* | [**user_list_emails**](docs/UserApi.md#user_list_emails) | **GET** /user/emails | List all email addresses of the current user -*UserApi* | [**user_list_followers**](docs/UserApi.md#user_list_followers) | **GET** /users/{username}/followers | List the given user's followers -*UserApi* | [**user_list_following**](docs/UserApi.md#user_list_following) | **GET** /users/{username}/following | List the users that the given user is following -*UserApi* | [**user_list_gpg_keys**](docs/UserApi.md#user_list_gpg_keys) | **GET** /users/{username}/gpg_keys | List the given user's GPG keys -*UserApi* | [**user_list_hooks**](docs/UserApi.md#user_list_hooks) | **GET** /user/hooks | List the authenticated user's webhooks -*UserApi* | [**user_list_keys**](docs/UserApi.md#user_list_keys) | **GET** /users/{username}/keys | List the given user's public keys -*UserApi* | [**user_list_quota_artifacts**](docs/UserApi.md#user_list_quota_artifacts) | **GET** /user/quota/artifacts | List the artifacts affecting the authenticated user's quota -*UserApi* | [**user_list_quota_attachments**](docs/UserApi.md#user_list_quota_attachments) | **GET** /user/quota/attachments | List the attachments affecting the authenticated user's quota -*UserApi* | [**user_list_quota_packages**](docs/UserApi.md#user_list_quota_packages) | **GET** /user/quota/packages | List the packages affecting the authenticated user's quota -*UserApi* | [**user_list_repos**](docs/UserApi.md#user_list_repos) | **GET** /users/{username}/repos | List the repos owned by the given user -*UserApi* | [**user_list_starred**](docs/UserApi.md#user_list_starred) | **GET** /users/{username}/starred | The repos that the given user has starred -*UserApi* | [**user_list_subscriptions**](docs/UserApi.md#user_list_subscriptions) | **GET** /users/{username}/subscriptions | List the repositories watched by a user -*UserApi* | [**user_list_teams**](docs/UserApi.md#user_list_teams) | **GET** /user/teams | List all the teams a user belongs to -*UserApi* | [**user_search**](docs/UserApi.md#user_search) | **GET** /users/search | Search for users -*UserApi* | [**user_search_run_jobs**](docs/UserApi.md#user_search_run_jobs) | **GET** /user/actions/runners/jobs | Search for user's action jobs according filter conditions -*UserApi* | [**user_unblock_user**](docs/UserApi.md#user_unblock_user) | **PUT** /user/unblock/{username} | Unblocks a user from the doer -*UserApi* | [**user_update_avatar**](docs/UserApi.md#user_update_avatar) | **POST** /user/avatar | Update avatar of the current user -*UserApi* | [**user_update_o_auth2_application**](docs/UserApi.md#user_update_o_auth2_application) | **PATCH** /user/applications/oauth2/{id} | Update an OAuth2 application, this includes regenerating the client secret -*UserApi* | [**user_verify_gpg_key**](docs/UserApi.md#user_verify_gpg_key) | **POST** /user/gpg_key_verify | Verify a GPG key - - -## Documentation For Models - - - [AccessToken](docs/AccessToken.md) - - [ActionRun](docs/ActionRun.md) - - [ActionRunJob](docs/ActionRunJob.md) - - [ActionTask](docs/ActionTask.md) - - [ActionTaskResponse](docs/ActionTaskResponse.md) - - [ActionVariable](docs/ActionVariable.md) - - [Activity](docs/Activity.md) - - [ActivityPub](docs/ActivityPub.md) - - [AddCollaboratorOption](docs/AddCollaboratorOption.md) - - [AddTimeOption](docs/AddTimeOption.md) - - [AnnotatedTag](docs/AnnotatedTag.md) - - [AnnotatedTagObject](docs/AnnotatedTagObject.md) - - [ApiError](docs/ApiError.md) - - [ApiForbiddenError](docs/ApiForbiddenError.md) - - [ApiInternalServerError](docs/ApiInternalServerError.md) - - [ApiInvalidTopicsError](docs/ApiInvalidTopicsError.md) - - [ApiNotFound](docs/ApiNotFound.md) - - [ApiRepoArchivedError](docs/ApiRepoArchivedError.md) - - [ApiUnauthorizedError](docs/ApiUnauthorizedError.md) - - [ApiValidationError](docs/ApiValidationError.md) - - [Attachment](docs/Attachment.md) - - [BlockedUser](docs/BlockedUser.md) - - [Branch](docs/Branch.md) - - [BranchProtection](docs/BranchProtection.md) - - [ChangeFileOperation](docs/ChangeFileOperation.md) - - [ChangeFilesOptions](docs/ChangeFilesOptions.md) - - [ChangedFile](docs/ChangedFile.md) - - [CombinedStatus](docs/CombinedStatus.md) - - [Comment](docs/Comment.md) - - [Commit](docs/Commit.md) - - [CommitAffectedFiles](docs/CommitAffectedFiles.md) - - [CommitDateOptions](docs/CommitDateOptions.md) - - [CommitMeta](docs/CommitMeta.md) - - [CommitStats](docs/CommitStats.md) - - [CommitStatus](docs/CommitStatus.md) - - [CommitUser](docs/CommitUser.md) - - [Compare](docs/Compare.md) - - [ContentsResponse](docs/ContentsResponse.md) - - [CreateAccessTokenOption](docs/CreateAccessTokenOption.md) - - [CreateBranchProtectionOption](docs/CreateBranchProtectionOption.md) - - [CreateBranchRepoOption](docs/CreateBranchRepoOption.md) - - [CreateEmailOption](docs/CreateEmailOption.md) - - [CreateFileOptions](docs/CreateFileOptions.md) - - [CreateForkOption](docs/CreateForkOption.md) - - [CreateGpgKeyOption](docs/CreateGpgKeyOption.md) - - [CreateHookOption](docs/CreateHookOption.md) - - [CreateIssueCommentOption](docs/CreateIssueCommentOption.md) - - [CreateIssueOption](docs/CreateIssueOption.md) - - [CreateKeyOption](docs/CreateKeyOption.md) - - [CreateLabelOption](docs/CreateLabelOption.md) - - [CreateMilestoneOption](docs/CreateMilestoneOption.md) - - [CreateOAuth2ApplicationOptions](docs/CreateOAuth2ApplicationOptions.md) - - [CreateOrUpdateSecretOption](docs/CreateOrUpdateSecretOption.md) - - [CreateOrgOption](docs/CreateOrgOption.md) - - [CreatePullRequestOption](docs/CreatePullRequestOption.md) - - [CreatePullReviewComment](docs/CreatePullReviewComment.md) - - [CreatePullReviewOptions](docs/CreatePullReviewOptions.md) - - [CreatePushMirrorOption](docs/CreatePushMirrorOption.md) - - [CreateQuotaGroupOptions](docs/CreateQuotaGroupOptions.md) - - [CreateQuotaRuleOptions](docs/CreateQuotaRuleOptions.md) - - [CreateReleaseOption](docs/CreateReleaseOption.md) - - [CreateRepoOption](docs/CreateRepoOption.md) - - [CreateStatusOption](docs/CreateStatusOption.md) - - [CreateTagOption](docs/CreateTagOption.md) - - [CreateTagProtectionOption](docs/CreateTagProtectionOption.md) - - [CreateTeamOption](docs/CreateTeamOption.md) - - [CreateUserOption](docs/CreateUserOption.md) - - [CreateVariableOption](docs/CreateVariableOption.md) - - [CreateWikiPageOptions](docs/CreateWikiPageOptions.md) - - [Cron](docs/Cron.md) - - [DeleteEmailOption](docs/DeleteEmailOption.md) - - [DeleteFileOptions](docs/DeleteFileOptions.md) - - [DeleteLabelsOption](docs/DeleteLabelsOption.md) - - [DeployKey](docs/DeployKey.md) - - [DismissPullReviewOptions](docs/DismissPullReviewOptions.md) - - [DispatchWorkflowOption](docs/DispatchWorkflowOption.md) - - [DispatchWorkflowRun](docs/DispatchWorkflowRun.md) - - [EditAttachmentOptions](docs/EditAttachmentOptions.md) - - [EditBranchProtectionOption](docs/EditBranchProtectionOption.md) - - [EditDeadlineOption](docs/EditDeadlineOption.md) - - [EditGitHookOption](docs/EditGitHookOption.md) - - [EditHookOption](docs/EditHookOption.md) - - [EditIssueCommentOption](docs/EditIssueCommentOption.md) - - [EditIssueOption](docs/EditIssueOption.md) - - [EditLabelOption](docs/EditLabelOption.md) - - [EditMilestoneOption](docs/EditMilestoneOption.md) - - [EditOrgOption](docs/EditOrgOption.md) - - [EditPullRequestOption](docs/EditPullRequestOption.md) - - [EditQuotaRuleOptions](docs/EditQuotaRuleOptions.md) - - [EditReactionOption](docs/EditReactionOption.md) - - [EditReleaseOption](docs/EditReleaseOption.md) - - [EditRepoOption](docs/EditRepoOption.md) - - [EditTagProtectionOption](docs/EditTagProtectionOption.md) - - [EditTeamOption](docs/EditTeamOption.md) - - [EditUserOption](docs/EditUserOption.md) - - [Email](docs/Email.md) - - [ExternalTracker](docs/ExternalTracker.md) - - [ExternalWiki](docs/ExternalWiki.md) - - [FileCommitResponse](docs/FileCommitResponse.md) - - [FileDeleteResponse](docs/FileDeleteResponse.md) - - [FileLinksResponse](docs/FileLinksResponse.md) - - [FileResponse](docs/FileResponse.md) - - [FilesResponse](docs/FilesResponse.md) - - [GeneralApiSettings](docs/GeneralApiSettings.md) - - [GeneralAttachmentSettings](docs/GeneralAttachmentSettings.md) - - [GeneralRepoSettings](docs/GeneralRepoSettings.md) - - [GeneralUiSettings](docs/GeneralUiSettings.md) - - [GenerateRepoOption](docs/GenerateRepoOption.md) - - [GitBlob](docs/GitBlob.md) - - [GitEntry](docs/GitEntry.md) - - [GitHook](docs/GitHook.md) - - [GitObject](docs/GitObject.md) - - [GitTreeResponse](docs/GitTreeResponse.md) - - [GitignoreTemplateInfo](docs/GitignoreTemplateInfo.md) - - [GpgKey](docs/GpgKey.md) - - [GpgKeyEmail](docs/GpgKeyEmail.md) - - [Hook](docs/Hook.md) - - [Identity](docs/Identity.md) - - [InternalTracker](docs/InternalTracker.md) - - [Issue](docs/Issue.md) - - [IssueConfig](docs/IssueConfig.md) - - [IssueConfigContactLink](docs/IssueConfigContactLink.md) - - [IssueConfigValidation](docs/IssueConfigValidation.md) - - [IssueDeadline](docs/IssueDeadline.md) - - [IssueFormField](docs/IssueFormField.md) - - [IssueLabelsOption](docs/IssueLabelsOption.md) - - [IssueMeta](docs/IssueMeta.md) - - [IssueTemplate](docs/IssueTemplate.md) - - [Label](docs/Label.md) - - [LabelTemplate](docs/LabelTemplate.md) - - [LicenseTemplateInfo](docs/LicenseTemplateInfo.md) - - [LicensesTemplateListEntry](docs/LicensesTemplateListEntry.md) - - [ListActionRunResponse](docs/ListActionRunResponse.md) - - [MarkdownOption](docs/MarkdownOption.md) - - [MarkupOption](docs/MarkupOption.md) - - [MergePullRequestOption](docs/MergePullRequestOption.md) - - [MigrateRepoOptions](docs/MigrateRepoOptions.md) - - [Milestone](docs/Milestone.md) - - [NewIssuePinsAllowed](docs/NewIssuePinsAllowed.md) - - [NodeInfo](docs/NodeInfo.md) - - [NodeInfoServices](docs/NodeInfoServices.md) - - [NodeInfoSoftware](docs/NodeInfoSoftware.md) - - [NodeInfoUsage](docs/NodeInfoUsage.md) - - [NodeInfoUsageUsers](docs/NodeInfoUsageUsers.md) - - [Note](docs/Note.md) - - [NoteOptions](docs/NoteOptions.md) - - [NotificationCount](docs/NotificationCount.md) - - [NotificationSubject](docs/NotificationSubject.md) - - [NotificationThread](docs/NotificationThread.md) - - [OAuth2Application](docs/OAuth2Application.md) - - [Organization](docs/Organization.md) - - [OrganizationPermissions](docs/OrganizationPermissions.md) - - [Package](docs/Package.md) - - [PackageFile](docs/PackageFile.md) - - [PayloadCommit](docs/PayloadCommit.md) - - [PayloadCommitVerification](docs/PayloadCommitVerification.md) - - [PayloadUser](docs/PayloadUser.md) - - [Permission](docs/Permission.md) - - [PrBranchInfo](docs/PrBranchInfo.md) - - [PublicKey](docs/PublicKey.md) - - [PullRequest](docs/PullRequest.md) - - [PullRequestMeta](docs/PullRequestMeta.md) - - [PullReview](docs/PullReview.md) - - [PullReviewComment](docs/PullReviewComment.md) - - [PullReviewRequestOptions](docs/PullReviewRequestOptions.md) - - [PushMirror](docs/PushMirror.md) - - [QuotaGroup](docs/QuotaGroup.md) - - [QuotaInfo](docs/QuotaInfo.md) - - [QuotaRuleInfo](docs/QuotaRuleInfo.md) - - [QuotaUsed](docs/QuotaUsed.md) - - [QuotaUsedArtifact](docs/QuotaUsedArtifact.md) - - [QuotaUsedAttachment](docs/QuotaUsedAttachment.md) - - [QuotaUsedAttachmentContainedIn](docs/QuotaUsedAttachmentContainedIn.md) - - [QuotaUsedPackage](docs/QuotaUsedPackage.md) - - [QuotaUsedSize](docs/QuotaUsedSize.md) - - [QuotaUsedSizeAssets](docs/QuotaUsedSizeAssets.md) - - [QuotaUsedSizeAssetsAttachments](docs/QuotaUsedSizeAssetsAttachments.md) - - [QuotaUsedSizeAssetsPackages](docs/QuotaUsedSizeAssetsPackages.md) - - [QuotaUsedSizeGit](docs/QuotaUsedSizeGit.md) - - [QuotaUsedSizeRepos](docs/QuotaUsedSizeRepos.md) - - [Reaction](docs/Reaction.md) - - [Reference](docs/Reference.md) - - [RegistrationToken](docs/RegistrationToken.md) - - [Release](docs/Release.md) - - [RenameOrgOption](docs/RenameOrgOption.md) - - [RenameUserOption](docs/RenameUserOption.md) - - [ReplaceFlagsOption](docs/ReplaceFlagsOption.md) - - [RepoCollaboratorPermission](docs/RepoCollaboratorPermission.md) - - [RepoCommit](docs/RepoCommit.md) - - [RepoCreateReleaseAttachmentRequest](docs/RepoCreateReleaseAttachmentRequest.md) - - [RepoTopicOptions](docs/RepoTopicOptions.md) - - [RepoTransfer](docs/RepoTransfer.md) - - [Repository](docs/Repository.md) - - [RepositoryMeta](docs/RepositoryMeta.md) - - [SearchResults](docs/SearchResults.md) - - [Secret](docs/Secret.md) - - [ServerVersion](docs/ServerVersion.md) - - [SetUserQuotaGroupsOptions](docs/SetUserQuotaGroupsOptions.md) - - [StopWatch](docs/StopWatch.md) - - [SubmitPullReviewOptions](docs/SubmitPullReviewOptions.md) - - [SyncForkInfo](docs/SyncForkInfo.md) - - [Tag](docs/Tag.md) - - [TagArchiveDownloadCount](docs/TagArchiveDownloadCount.md) - - [TagProtection](docs/TagProtection.md) - - [Team](docs/Team.md) - - [TeamSearchResults](docs/TeamSearchResults.md) - - [TimelineComment](docs/TimelineComment.md) - - [TopicName](docs/TopicName.md) - - [TopicResponse](docs/TopicResponse.md) - - [TopicSearchResults](docs/TopicSearchResults.md) - - [TrackedTime](docs/TrackedTime.md) - - [TransferRepoOption](docs/TransferRepoOption.md) - - [UpdateBranchRepoOption](docs/UpdateBranchRepoOption.md) - - [UpdateFileOptions](docs/UpdateFileOptions.md) - - [UpdateRepoAvatarOption](docs/UpdateRepoAvatarOption.md) - - [UpdateUserAvatarOption](docs/UpdateUserAvatarOption.md) - - [UpdateVariableOption](docs/UpdateVariableOption.md) - - [User](docs/User.md) - - [UserHeatmapData](docs/UserHeatmapData.md) - - [UserSearchResults](docs/UserSearchResults.md) - - [UserSettings](docs/UserSettings.md) - - [UserSettingsOptions](docs/UserSettingsOptions.md) - - [VerifyGpgKeyOption](docs/VerifyGpgKeyOption.md) - - [WatchInfo](docs/WatchInfo.md) - - [WikiCommit](docs/WikiCommit.md) - - [WikiCommitList](docs/WikiCommitList.md) - - [WikiPage](docs/WikiPage.md) - - [WikiPageMetaData](docs/WikiPageMetaData.md) - - -To get access to the crate's generated documentation, use: - -``` -cargo doc --open -``` - -## Author - - - diff --git a/forgejo-openapi/docs/AccessToken.md b/forgejo-openapi/docs/AccessToken.md deleted file mode 100644 index d52fb41..0000000 --- a/forgejo-openapi/docs/AccessToken.md +++ /dev/null @@ -1,15 +0,0 @@ -# AccessToken - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | Option<**i64**> | | [optional] -**name** | Option<**String**> | | [optional] -**scopes** | Option<**Vec**> | | [optional] -**sha1** | Option<**String**> | | [optional] -**token_last_eight** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ActionRun.md b/forgejo-openapi/docs/ActionRun.md deleted file mode 100644 index 8114d38..0000000 --- a/forgejo-openapi/docs/ActionRun.md +++ /dev/null @@ -1,33 +0,0 @@ -# ActionRun - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**schedule_id** | Option<**i64**> | the cron id for the schedule trigger | [optional] -**approved_by** | Option<**i64**> | who approved this action run | [optional] -**commit_sha** | Option<**String**> | the commit sha the action run ran on | [optional] -**created** | Option<**String**> | when the action run was created | [optional] -**duration** | Option<**i64**> | A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years. | [optional] -**event** | Option<**String**> | the webhook event that causes the workflow to run | [optional] -**event_payload** | Option<**String**> | the payload of the webhook event that causes the workflow to run | [optional] -**html_url** | Option<**String**> | the url of this action run | [optional] -**id** | Option<**i64**> | the action run id | [optional] -**index_in_repo** | Option<**i64**> | a unique number for each run of a repository | [optional] -**is_fork_pull_request** | Option<**bool**> | If this is triggered by a PR from a forked repository or an untrusted user, we need to check if it is approved and limit permissions when running the workflow. | [optional] -**is_ref_deleted** | Option<**bool**> | has the commit/tag/… the action run ran on been deleted | [optional] -**need_approval** | Option<**bool**> | may need approval if it's a fork pull request | [optional] -**prettyref** | Option<**String**> | the commit/tag/… the action run ran on | [optional] -**repository** | Option<[**models::Repository**](Repository.md)> | | [optional] -**started** | Option<**String**> | when the action run was started | [optional] -**status** | Option<**String**> | the current status of this run | [optional] -**stopped** | Option<**String**> | when the action run was stopped | [optional] -**title** | Option<**String**> | the action run's title | [optional] -**trigger_event** | Option<**String**> | the trigger event defined in the `on` configuration of the triggered workflow | [optional] -**trigger_user** | Option<[**models::User**](User.md)> | | [optional] -**updated** | Option<**String**> | when the action run was last updated | [optional] -**workflow_id** | Option<**String**> | the name of workflow file | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ActionRunJob.md b/forgejo-openapi/docs/ActionRunJob.md deleted file mode 100644 index ca0887c..0000000 --- a/forgejo-openapi/docs/ActionRunJob.md +++ /dev/null @@ -1,18 +0,0 @@ -# ActionRunJob - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | Option<**i64**> | the action run job id | [optional] -**name** | Option<**String**> | the action run job name | [optional] -**needs** | Option<**Vec**> | the action run job needed ids | [optional] -**owner_id** | Option<**i64**> | the owner id | [optional] -**repo_id** | Option<**i64**> | the repository id | [optional] -**runs_on** | Option<**Vec**> | the action run job labels to run on | [optional] -**status** | Option<**String**> | the action run job status | [optional] -**task_id** | Option<**i64**> | the action run job latest task id | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ActionTask.md b/forgejo-openapi/docs/ActionTask.md deleted file mode 100644 index 3f70af3..0000000 --- a/forgejo-openapi/docs/ActionTask.md +++ /dev/null @@ -1,23 +0,0 @@ -# ActionTask - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | Option<**String**> | | [optional] -**display_title** | Option<**String**> | | [optional] -**event** | Option<**String**> | | [optional] -**head_branch** | Option<**String**> | | [optional] -**head_sha** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**name** | Option<**String**> | | [optional] -**run_number** | Option<**i64**> | | [optional] -**run_started_at** | Option<**String**> | | [optional] -**status** | Option<**String**> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] -**workflow_id** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ActionTaskResponse.md b/forgejo-openapi/docs/ActionTaskResponse.md deleted file mode 100644 index 3eeb5a4..0000000 --- a/forgejo-openapi/docs/ActionTaskResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActionTaskResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total_count** | Option<**i64**> | | [optional] -**workflow_runs** | Option<[**Vec**](ActionTask.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ActionVariable.md b/forgejo-openapi/docs/ActionVariable.md deleted file mode 100644 index 663b9c0..0000000 --- a/forgejo-openapi/docs/ActionVariable.md +++ /dev/null @@ -1,14 +0,0 @@ -# ActionVariable - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | Option<**String**> | the value of the variable | [optional] -**name** | Option<**String**> | the name of the variable | [optional] -**owner_id** | Option<**i64**> | the owner to which the variable belongs | [optional] -**repo_id** | Option<**i64**> | the repository to which the variable belongs | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Activity.md b/forgejo-openapi/docs/Activity.md deleted file mode 100644 index 3163858..0000000 --- a/forgejo-openapi/docs/Activity.md +++ /dev/null @@ -1,23 +0,0 @@ -# Activity - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**act_user** | Option<[**models::User**](User.md)> | | [optional] -**act_user_id** | Option<**i64**> | | [optional] -**comment** | Option<[**models::Comment**](Comment.md)> | | [optional] -**comment_id** | Option<**i64**> | | [optional] -**content** | Option<**String**> | | [optional] -**created** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**is_private** | Option<**bool**> | | [optional] -**op_type** | Option<**OpType**> | the type of action (enum: create_repo, rename_repo, star_repo, watch_repo, commit_repo, create_issue, create_pull_request, transfer_repo, push_tag, comment_issue, merge_pull_request, close_issue, reopen_issue, close_pull_request, reopen_pull_request, delete_tag, delete_branch, mirror_sync_push, mirror_sync_create, mirror_sync_delete, approve_pull_request, reject_pull_request, comment_pull, publish_release, pull_review_dismissed, pull_request_ready_for_review, auto_merge_pull_request) | [optional] -**ref_name** | Option<**String**> | | [optional] -**repo** | Option<[**models::Repository**](Repository.md)> | | [optional] -**repo_id** | Option<**i64**> | | [optional] -**user_id** | Option<**i64**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ActivityPub.md b/forgejo-openapi/docs/ActivityPub.md deleted file mode 100644 index 433610d..0000000 --- a/forgejo-openapi/docs/ActivityPub.md +++ /dev/null @@ -1,11 +0,0 @@ -# ActivityPub - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**at_context** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ActivitypubApi.md b/forgejo-openapi/docs/ActivitypubApi.md deleted file mode 100644 index b788087..0000000 --- a/forgejo-openapi/docs/ActivitypubApi.md +++ /dev/null @@ -1,321 +0,0 @@ -# \ActivitypubApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**activitypub_instance_actor**](ActivitypubApi.md#activitypub_instance_actor) | **GET** /activitypub/actor | Returns the instance's Actor -[**activitypub_instance_actor_inbox**](ActivitypubApi.md#activitypub_instance_actor_inbox) | **POST** /activitypub/actor/inbox | Send to the inbox -[**activitypub_instance_actor_outbox**](ActivitypubApi.md#activitypub_instance_actor_outbox) | **POST** /activitypub/actor/outbox | Display the outbox (always empty) -[**activitypub_person**](ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user_id} | Returns the Person actor for a user -[**activitypub_person_activity**](ActivitypubApi.md#activitypub_person_activity) | **GET** /activitypub/user-id/{user_id}/activities/{activity_id}/activity | Get a specific activity of the user -[**activitypub_person_activity_note**](ActivitypubApi.md#activitypub_person_activity_note) | **GET** /activitypub/user-id/{user_id}/activities/{activity_id} | Get a specific activity object of the user -[**activitypub_person_feed**](ActivitypubApi.md#activitypub_person_feed) | **GET** /activitypub/user-id/{user_id}/outbox | List the user's recorded activity -[**activitypub_person_inbox**](ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user_id}/inbox | Send to the inbox -[**activitypub_repository**](ActivitypubApi.md#activitypub_repository) | **GET** /activitypub/repository-id/{repository_id} | Returns the Repository actor for a repo -[**activitypub_repository_inbox**](ActivitypubApi.md#activitypub_repository_inbox) | **POST** /activitypub/repository-id/{repository_id}/inbox | Send to the inbox -[**activitypub_repository_outbox**](ActivitypubApi.md#activitypub_repository_outbox) | **POST** /activitypub/repository-id/{repository_id}/outbox | Display the outbox - - - -## activitypub_instance_actor - -> models::ActivityPub activitypub_instance_actor() -Returns the instance's Actor - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::ActivityPub**](ActivityPub.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## activitypub_instance_actor_inbox - -> activitypub_instance_actor_inbox() -Send to the inbox - -### Parameters - -This endpoint does not need any parameter. - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## activitypub_instance_actor_outbox - -> serde_json::Value activitypub_instance_actor_outbox() -Display the outbox (always empty) - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**serde_json::Value**](serde_json::Value.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/ld+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## activitypub_person - -> models::ActivityPub activitypub_person(user_id) -Returns the Person actor for a user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **i64** | user ID of the user | [required] | - -### Return type - -[**models::ActivityPub**](ActivityPub.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## activitypub_person_activity - -> models::ActivityPub activitypub_person_activity(user_id, activity_id) -Get a specific activity of the user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **i32** | user ID of the user | [required] | -**activity_id** | **i32** | activity ID of the sought activity | [required] | - -### Return type - -[**models::ActivityPub**](ActivityPub.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## activitypub_person_activity_note - -> models::ActivityPub activitypub_person_activity_note(user_id, activity_id) -Get a specific activity object of the user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **i32** | user ID of the user | [required] | -**activity_id** | **i32** | activity ID of the sought activity | [required] | - -### Return type - -[**models::ActivityPub**](ActivityPub.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## activitypub_person_feed - -> serde_json::Value activitypub_person_feed(user_id) -List the user's recorded activity - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **i32** | user ID of the user | [required] | - -### Return type - -[**serde_json::Value**](serde_json::Value.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## activitypub_person_inbox - -> activitypub_person_inbox(user_id) -Send to the inbox - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **i64** | user ID of the user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## activitypub_repository - -> models::ActivityPub activitypub_repository(repository_id) -Returns the Repository actor for a repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**repository_id** | **i64** | repository ID of the repo | [required] | - -### Return type - -[**models::ActivityPub**](ActivityPub.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## activitypub_repository_inbox - -> activitypub_repository_inbox(repository_id, body) -Send to the inbox - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**repository_id** | **i64** | repository ID of the repo | [required] | -**body** | Option<**serde_json::Value**> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## activitypub_repository_outbox - -> serde_json::Value activitypub_repository_outbox(repository_id) -Display the outbox - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**repository_id** | **i64** | repository ID of the repo | [required] | - -### Return type - -[**serde_json::Value**](serde_json::Value.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/ld+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/forgejo-openapi/docs/AddCollaboratorOption.md b/forgejo-openapi/docs/AddCollaboratorOption.md deleted file mode 100644 index c614fd6..0000000 --- a/forgejo-openapi/docs/AddCollaboratorOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddCollaboratorOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**permission** | Option<**Permission**> | (enum: read, write, admin) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/AddTimeOption.md b/forgejo-openapi/docs/AddTimeOption.md deleted file mode 100644 index e64bdc4..0000000 --- a/forgejo-openapi/docs/AddTimeOption.md +++ /dev/null @@ -1,13 +0,0 @@ -# AddTimeOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created** | Option<**String**> | | [optional] -**time** | **i64** | time in seconds | -**user_name** | Option<**String**> | User who spent the time (optional) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/AdminApi.md b/forgejo-openapi/docs/AdminApi.md deleted file mode 100644 index cb89920..0000000 --- a/forgejo-openapi/docs/AdminApi.md +++ /dev/null @@ -1,1246 +0,0 @@ -# \AdminApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**admin_add_rule_to_quota_group**](AdminApi.md#admin_add_rule_to_quota_group) | **PUT** /admin/quota/groups/{quotagroup}/rules/{quotarule} | Adds a rule to a quota group -[**admin_add_user_to_quota_group**](AdminApi.md#admin_add_user_to_quota_group) | **PUT** /admin/quota/groups/{quotagroup}/users/{username} | Add a user to a quota group -[**admin_adopt_repository**](AdminApi.md#admin_adopt_repository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository -[**admin_create_hook**](AdminApi.md#admin_create_hook) | **POST** /admin/hooks | Create a hook -[**admin_create_org**](AdminApi.md#admin_create_org) | **POST** /admin/users/{username}/orgs | Create an organization -[**admin_create_public_key**](AdminApi.md#admin_create_public_key) | **POST** /admin/users/{username}/keys | Add an SSH public key to user's account -[**admin_create_quota_group**](AdminApi.md#admin_create_quota_group) | **POST** /admin/quota/groups | Create a new quota group -[**admin_create_quota_rule**](AdminApi.md#admin_create_quota_rule) | **POST** /admin/quota/rules | Create a new quota rule -[**admin_create_repo**](AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf of a user -[**admin_create_user**](AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user account -[**admin_cron_list**](AdminApi.md#admin_cron_list) | **GET** /admin/cron | List cron tasks -[**admin_cron_run**](AdminApi.md#admin_cron_run) | **POST** /admin/cron/{task} | Run cron task -[**admin_delete_hook**](AdminApi.md#admin_delete_hook) | **DELETE** /admin/hooks/{id} | Delete a hook -[**admin_delete_quota_group**](AdminApi.md#admin_delete_quota_group) | **DELETE** /admin/quota/groups/{quotagroup} | Delete a quota group -[**admin_delete_quota_rule**](AdminApi.md#admin_delete_quota_rule) | **DELETE** /admin/quota/rules/{quotarule} | Deletes a quota rule -[**admin_delete_unadopted_repository**](AdminApi.md#admin_delete_unadopted_repository) | **DELETE** /admin/unadopted/{owner}/{repo} | Delete unadopted files -[**admin_delete_user**](AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete user account -[**admin_delete_user_emails**](AdminApi.md#admin_delete_user_emails) | **DELETE** /admin/users/{username}/emails | Delete email addresses from a user's account -[**admin_delete_user_public_key**](AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Remove a public key from user's account -[**admin_edit_hook**](AdminApi.md#admin_edit_hook) | **PATCH** /admin/hooks/{id} | Update a hook -[**admin_edit_quota_rule**](AdminApi.md#admin_edit_quota_rule) | **PATCH** /admin/quota/rules/{quotarule} | Change an existing quota rule -[**admin_edit_user**](AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user -[**admin_get_all_emails**](AdminApi.md#admin_get_all_emails) | **GET** /admin/emails | List all users' email addresses -[**admin_get_all_orgs**](AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations -[**admin_get_hook**](AdminApi.md#admin_get_hook) | **GET** /admin/hooks/{id} | Get a hook -[**admin_get_quota_group**](AdminApi.md#admin_get_quota_group) | **GET** /admin/quota/groups/{quotagroup} | Get information about the quota group -[**admin_get_quota_rule**](AdminApi.md#admin_get_quota_rule) | **GET** /admin/quota/rules/{quotarule} | Get information about a quota rule -[**admin_get_runner_registration_token**](AdminApi.md#admin_get_runner_registration_token) | **GET** /admin/runners/registration-token | Get an global actions runner registration token -[**admin_get_user_quota**](AdminApi.md#admin_get_user_quota) | **GET** /admin/users/{username}/quota | Get the user's quota info -[**admin_list_hooks**](AdminApi.md#admin_list_hooks) | **GET** /admin/hooks | List global (system) webhooks -[**admin_list_quota_groups**](AdminApi.md#admin_list_quota_groups) | **GET** /admin/quota/groups | List the available quota groups -[**admin_list_quota_rules**](AdminApi.md#admin_list_quota_rules) | **GET** /admin/quota/rules | List the available quota rules -[**admin_list_user_emails**](AdminApi.md#admin_list_user_emails) | **GET** /admin/users/{username}/emails | List all email addresses for a user -[**admin_list_users_in_quota_group**](AdminApi.md#admin_list_users_in_quota_group) | **GET** /admin/quota/groups/{quotagroup}/users | List users in a quota group -[**admin_remove_rule_from_quota_group**](AdminApi.md#admin_remove_rule_from_quota_group) | **DELETE** /admin/quota/groups/{quotagroup}/rules/{quotarule} | Removes a rule from a quota group -[**admin_remove_user_from_quota_group**](AdminApi.md#admin_remove_user_from_quota_group) | **DELETE** /admin/quota/groups/{quotagroup}/users/{username} | Remove a user from a quota group -[**admin_rename_user**](AdminApi.md#admin_rename_user) | **POST** /admin/users/{username}/rename | Rename a user -[**admin_search_emails**](AdminApi.md#admin_search_emails) | **GET** /admin/emails/search | Search users' email addresses -[**admin_search_run_jobs**](AdminApi.md#admin_search_run_jobs) | **GET** /admin/runners/jobs | Search action jobs according filter conditions -[**admin_search_users**](AdminApi.md#admin_search_users) | **GET** /admin/users | Search users according filter conditions -[**admin_set_user_quota_groups**](AdminApi.md#admin_set_user_quota_groups) | **POST** /admin/users/{username}/quota/groups | Set the user's quota groups to a given list. -[**admin_unadopted_list**](AdminApi.md#admin_unadopted_list) | **GET** /admin/unadopted | List unadopted repositories - - - -## admin_add_rule_to_quota_group - -> admin_add_rule_to_quota_group(quotagroup, quotarule) -Adds a rule to a quota group - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**quotagroup** | **String** | quota group to add a rule to | [required] | -**quotarule** | **String** | the name of the quota rule to add to the group | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_add_user_to_quota_group - -> admin_add_user_to_quota_group(quotagroup, username) -Add a user to a quota group - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**quotagroup** | **String** | quota group to add the user to | [required] | -**username** | **String** | username of the user to add to the quota group | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_adopt_repository - -> admin_adopt_repository(owner, repo) -Adopt unadopted files as a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_create_hook - -> models::Hook admin_create_hook(body) -Create a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**CreateHookOption**](CreateHookOption.md) | | [required] | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_create_org - -> models::Organization admin_create_org(username, organization) -Create an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of the user that will own the created organization | [required] | -**organization** | [**CreateOrgOption**](CreateOrgOption.md) | | [required] | - -### Return type - -[**models::Organization**](Organization.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_create_public_key - -> models::PublicKey admin_create_public_key(username, key) -Add an SSH public key to user's account - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of the user | [required] | -**key** | Option<[**CreateKeyOption**](CreateKeyOption.md)> | | | - -### Return type - -[**models::PublicKey**](PublicKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_create_quota_group - -> models::QuotaGroup admin_create_quota_group(group) -Create a new quota group - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**group** | [**CreateQuotaGroupOptions**](CreateQuotaGroupOptions.md) | Definition of the quota group | [required] | - -### Return type - -[**models::QuotaGroup**](QuotaGroup.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_create_quota_rule - -> models::QuotaRuleInfo admin_create_quota_rule(rule) -Create a new quota rule - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**rule** | [**CreateQuotaRuleOptions**](CreateQuotaRuleOptions.md) | Definition of the quota rule | [required] | - -### Return type - -[**models::QuotaRuleInfo**](QuotaRuleInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_create_repo - -> models::Repository admin_create_repo(username, repository) -Create a repository on behalf of a user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of the user. This user will own the created repository | [required] | -**repository** | [**CreateRepoOption**](CreateRepoOption.md) | | [required] | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_create_user - -> models::User admin_create_user(body) -Create a user account - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**CreateUserOption**](CreateUserOption.md)> | | | - -### Return type - -[**models::User**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_cron_list - -> Vec admin_cron_list(page, limit) -List cron tasks - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Cron.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_cron_run - -> admin_cron_run(task) -Run cron task - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**task** | **String** | task to run | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_delete_hook - -> admin_delete_hook(id) -Delete a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the hook to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_delete_quota_group - -> admin_delete_quota_group(quotagroup) -Delete a quota group - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**quotagroup** | **String** | quota group to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_delete_quota_rule - -> admin_delete_quota_rule(quotarule) -Deletes a quota rule - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**quotarule** | **String** | quota rule to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_delete_unadopted_repository - -> admin_delete_unadopted_repository(owner, repo) -Delete unadopted files - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_delete_user - -> admin_delete_user(username, purge) -Delete user account - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user to delete | [required] | -**purge** | Option<**bool**> | purge the user from the system completely | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_delete_user_emails - -> admin_delete_user_emails(username, body) -Delete email addresses from a user's account - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user to delete email addresses from | [required] | -**body** | Option<[**DeleteEmailOption**](DeleteEmailOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_delete_user_public_key - -> admin_delete_user_public_key(username, id) -Remove a public key from user's account - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**id** | **i64** | id of the key to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_edit_hook - -> models::Hook admin_edit_hook(id, body) -Update a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the hook to update | [required] | -**body** | Option<[**EditHookOption**](EditHookOption.md)> | | | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_edit_quota_rule - -> models::QuotaRuleInfo admin_edit_quota_rule(quotarule, rule) -Change an existing quota rule - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**quotarule** | **String** | Quota rule to change | [required] | -**rule** | [**EditQuotaRuleOptions**](EditQuotaRuleOptions.md) | | [required] | - -### Return type - -[**models::QuotaRuleInfo**](QuotaRuleInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_edit_user - -> models::User admin_edit_user(username, body) -Edit an existing user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user to edit | [required] | -**body** | Option<[**EditUserOption**](EditUserOption.md)> | | | - -### Return type - -[**models::User**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_get_all_emails - -> Vec admin_get_all_emails(page, limit) -List all users' email addresses - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Email.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_get_all_orgs - -> Vec admin_get_all_orgs(page, limit) -List all organizations - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Organization.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_get_hook - -> models::Hook admin_get_hook(id) -Get a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the hook to get | [required] | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_get_quota_group - -> models::QuotaGroup admin_get_quota_group(quotagroup) -Get information about the quota group - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**quotagroup** | **String** | quota group to query | [required] | - -### Return type - -[**models::QuotaGroup**](QuotaGroup.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_get_quota_rule - -> models::QuotaRuleInfo admin_get_quota_rule(quotarule) -Get information about a quota rule - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**quotarule** | **String** | quota rule to query | [required] | - -### Return type - -[**models::QuotaRuleInfo**](QuotaRuleInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_get_runner_registration_token - -> models::RegistrationToken admin_get_runner_registration_token() -Get an global actions runner registration token - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::RegistrationToken**](RegistrationToken.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_get_user_quota - -> models::QuotaInfo admin_get_user_quota(username) -Get the user's quota info - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user to query | [required] | - -### Return type - -[**models::QuotaInfo**](QuotaInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_list_hooks - -> Vec admin_list_hooks(page, limit) -List global (system) webhooks - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_list_quota_groups - -> Vec admin_list_quota_groups() -List the available quota groups - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Vec**](QuotaGroup.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_list_quota_rules - -> Vec admin_list_quota_rules() -List the available quota rules - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Vec**](QuotaRuleInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_list_user_emails - -> Vec admin_list_user_emails(username) -List all email addresses for a user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user to get email addresses of | [required] | - -### Return type - -[**Vec**](Email.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_list_users_in_quota_group - -> Vec admin_list_users_in_quota_group(quotagroup) -List users in a quota group - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**quotagroup** | **String** | quota group to list members of | [required] | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_remove_rule_from_quota_group - -> admin_remove_rule_from_quota_group(quotagroup, quotarule) -Removes a rule from a quota group - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**quotagroup** | **String** | quota group to remove a rule from | [required] | -**quotarule** | **String** | the name of the quota rule to remove from the group | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_remove_user_from_quota_group - -> admin_remove_user_from_quota_group(quotagroup, username) -Remove a user from a quota group - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**quotagroup** | **String** | quota group to remove a user from | [required] | -**username** | **String** | username of the user to remove from the quota group | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_rename_user - -> admin_rename_user(username, body) -Rename a user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | existing username of user | [required] | -**body** | [**RenameUserOption**](RenameUserOption.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_search_emails - -> Vec admin_search_emails(q, page, limit) -Search users' email addresses - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**q** | Option<**String**> | keyword | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Email.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_search_run_jobs - -> Vec admin_search_run_jobs(labels) -Search action jobs according filter conditions - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**labels** | Option<**String**> | a comma separated list of run job labels to search for | | - -### Return type - -[**Vec**](ActionRunJob.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_search_users - -> Vec admin_search_users(source_id, login_name, sort, page, limit) -Search users according filter conditions - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**source_id** | Option<**i64**> | ID of the user's login source to search for | | -**login_name** | Option<**String**> | user's login name to search for | | -**sort** | Option<**String**> | sort order of results | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_set_user_quota_groups - -> admin_set_user_quota_groups(username, groups) -Set the user's quota groups to a given list. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of the user to modify the quota groups from | [required] | -**groups** | [**SetUserQuotaGroupsOptions**](SetUserQuotaGroupsOptions.md) | list of groups that the user should be a member of | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## admin_unadopted_list - -> Vec admin_unadopted_list(page, limit, pattern) -List unadopted repositories - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | -**pattern** | Option<**String**> | pattern of repositories to search for | | - -### Return type - -**Vec** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/forgejo-openapi/docs/AnnotatedTag.md b/forgejo-openapi/docs/AnnotatedTag.md deleted file mode 100644 index 69fec26..0000000 --- a/forgejo-openapi/docs/AnnotatedTag.md +++ /dev/null @@ -1,18 +0,0 @@ -# AnnotatedTag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**archive_download_count** | Option<[**models::TagArchiveDownloadCount**](TagArchiveDownloadCount.md)> | | [optional] -**message** | Option<**String**> | | [optional] -**object** | Option<[**models::AnnotatedTagObject**](AnnotatedTagObject.md)> | | [optional] -**sha** | Option<**String**> | | [optional] -**tag** | Option<**String**> | | [optional] -**tagger** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] -**url** | Option<**String**> | | [optional] -**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/AnnotatedTagObject.md b/forgejo-openapi/docs/AnnotatedTagObject.md deleted file mode 100644 index 01837b9..0000000 --- a/forgejo-openapi/docs/AnnotatedTagObject.md +++ /dev/null @@ -1,13 +0,0 @@ -# AnnotatedTagObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sha** | Option<**String**> | | [optional] -**r#type** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ApiError.md b/forgejo-openapi/docs/ApiError.md deleted file mode 100644 index 94e66d5..0000000 --- a/forgejo-openapi/docs/ApiError.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ApiForbiddenError.md b/forgejo-openapi/docs/ApiForbiddenError.md deleted file mode 100644 index b786de3..0000000 --- a/forgejo-openapi/docs/ApiForbiddenError.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiForbiddenError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ApiInternalServerError.md b/forgejo-openapi/docs/ApiInternalServerError.md deleted file mode 100644 index 07fb4ac..0000000 --- a/forgejo-openapi/docs/ApiInternalServerError.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiInternalServerError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ApiInvalidTopicsError.md b/forgejo-openapi/docs/ApiInvalidTopicsError.md deleted file mode 100644 index 6bf2d24..0000000 --- a/forgejo-openapi/docs/ApiInvalidTopicsError.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiInvalidTopicsError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invalid_topics** | Option<**Vec**> | | [optional] -**message** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ApiNotFound.md b/forgejo-openapi/docs/ApiNotFound.md deleted file mode 100644 index 18d5230..0000000 --- a/forgejo-openapi/docs/ApiNotFound.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiNotFound - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**errors** | Option<**Vec**> | | [optional] -**message** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ApiRepoArchivedError.md b/forgejo-openapi/docs/ApiRepoArchivedError.md deleted file mode 100644 index 5b2f93c..0000000 --- a/forgejo-openapi/docs/ApiRepoArchivedError.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiRepoArchivedError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ApiUnauthorizedError.md b/forgejo-openapi/docs/ApiUnauthorizedError.md deleted file mode 100644 index 6ce0171..0000000 --- a/forgejo-openapi/docs/ApiUnauthorizedError.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiUnauthorizedError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ApiValidationError.md b/forgejo-openapi/docs/ApiValidationError.md deleted file mode 100644 index e074c1a..0000000 --- a/forgejo-openapi/docs/ApiValidationError.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiValidationError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Attachment.md b/forgejo-openapi/docs/Attachment.md deleted file mode 100644 index d57ae79..0000000 --- a/forgejo-openapi/docs/Attachment.md +++ /dev/null @@ -1,18 +0,0 @@ -# Attachment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**browser_download_url** | Option<**String**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**download_count** | Option<**i64**> | | [optional] -**id** | Option<**i64**> | | [optional] -**name** | Option<**String**> | | [optional] -**size** | Option<**i64**> | | [optional] -**r#type** | Option<**Type**> | (enum: attachment, external) | [optional] -**uuid** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/BlockedUser.md b/forgejo-openapi/docs/BlockedUser.md deleted file mode 100644 index 0cd7f99..0000000 --- a/forgejo-openapi/docs/BlockedUser.md +++ /dev/null @@ -1,12 +0,0 @@ -# BlockedUser - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**block_id** | Option<**i64**> | | [optional] -**created_at** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Branch.md b/forgejo-openapi/docs/Branch.md deleted file mode 100644 index 4f50aa0..0000000 --- a/forgejo-openapi/docs/Branch.md +++ /dev/null @@ -1,19 +0,0 @@ -# Branch - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commit** | Option<[**models::PayloadCommit**](PayloadCommit.md)> | | [optional] -**effective_branch_protection_name** | Option<**String**> | | [optional] -**enable_status_check** | Option<**bool**> | | [optional] -**name** | Option<**String**> | | [optional] -**protected** | Option<**bool**> | | [optional] -**required_approvals** | Option<**i64**> | | [optional] -**status_check_contexts** | Option<**Vec**> | | [optional] -**user_can_merge** | Option<**bool**> | | [optional] -**user_can_push** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/BranchProtection.md b/forgejo-openapi/docs/BranchProtection.md deleted file mode 100644 index 6ecc625..0000000 --- a/forgejo-openapi/docs/BranchProtection.md +++ /dev/null @@ -1,37 +0,0 @@ -# BranchProtection - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apply_to_admins** | Option<**bool**> | | [optional] -**approvals_whitelist_teams** | Option<**Vec**> | | [optional] -**approvals_whitelist_username** | Option<**Vec**> | | [optional] -**block_on_official_review_requests** | Option<**bool**> | | [optional] -**block_on_outdated_branch** | Option<**bool**> | | [optional] -**block_on_rejected_reviews** | Option<**bool**> | | [optional] -**branch_name** | Option<**String**> | Deprecated: true | [optional] -**created_at** | Option<**String**> | | [optional] -**dismiss_stale_approvals** | Option<**bool**> | | [optional] -**enable_approvals_whitelist** | Option<**bool**> | | [optional] -**enable_merge_whitelist** | Option<**bool**> | | [optional] -**enable_push** | Option<**bool**> | | [optional] -**enable_push_whitelist** | Option<**bool**> | | [optional] -**enable_status_check** | Option<**bool**> | | [optional] -**ignore_stale_approvals** | Option<**bool**> | | [optional] -**merge_whitelist_teams** | Option<**Vec**> | | [optional] -**merge_whitelist_usernames** | Option<**Vec**> | | [optional] -**protected_file_patterns** | Option<**String**> | | [optional] -**push_whitelist_deploy_keys** | Option<**bool**> | | [optional] -**push_whitelist_teams** | Option<**Vec**> | | [optional] -**push_whitelist_usernames** | Option<**Vec**> | | [optional] -**require_signed_commits** | Option<**bool**> | | [optional] -**required_approvals** | Option<**i64**> | | [optional] -**rule_name** | Option<**String**> | | [optional] -**status_check_contexts** | Option<**Vec**> | | [optional] -**unprotected_file_patterns** | Option<**String**> | | [optional] -**updated_at** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ChangeFileOperation.md b/forgejo-openapi/docs/ChangeFileOperation.md deleted file mode 100644 index e960e92..0000000 --- a/forgejo-openapi/docs/ChangeFileOperation.md +++ /dev/null @@ -1,15 +0,0 @@ -# ChangeFileOperation - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | Option<**String**> | new or updated file content, must be base64 encoded | [optional] -**from_path** | Option<**String**> | old path of the file to move | [optional] -**operation** | **Operation** | indicates what to do with the file (enum: create, update, delete) | -**path** | **String** | path to the existing or new file | -**sha** | Option<**String**> | sha is the SHA for the file that already exists, required for update or delete | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ChangeFilesOptions.md b/forgejo-openapi/docs/ChangeFilesOptions.md deleted file mode 100644 index afee795..0000000 --- a/forgejo-openapi/docs/ChangeFilesOptions.md +++ /dev/null @@ -1,18 +0,0 @@ -# ChangeFilesOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**author** | Option<[**models::Identity**](Identity.md)> | | [optional] -**branch** | Option<**String**> | branch (optional) to base this file from. if not given, the default branch is used | [optional] -**committer** | Option<[**models::Identity**](Identity.md)> | | [optional] -**dates** | Option<[**models::CommitDateOptions**](CommitDateOptions.md)> | | [optional] -**files** | [**Vec**](ChangeFileOperation.md) | list of file operations | -**message** | Option<**String**> | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] -**new_branch** | Option<**String**> | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] -**signoff** | Option<**bool**> | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ChangedFile.md b/forgejo-openapi/docs/ChangedFile.md deleted file mode 100644 index 680133b..0000000 --- a/forgejo-openapi/docs/ChangedFile.md +++ /dev/null @@ -1,19 +0,0 @@ -# ChangedFile - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additions** | Option<**i64**> | | [optional] -**changes** | Option<**i64**> | | [optional] -**contents_url** | Option<**String**> | | [optional] -**deletions** | Option<**i64**> | | [optional] -**filename** | Option<**String**> | | [optional] -**html_url** | Option<**String**> | | [optional] -**previous_filename** | Option<**String**> | | [optional] -**raw_url** | Option<**String**> | | [optional] -**status** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CombinedStatus.md b/forgejo-openapi/docs/CombinedStatus.md deleted file mode 100644 index 5adaf8f..0000000 --- a/forgejo-openapi/docs/CombinedStatus.md +++ /dev/null @@ -1,17 +0,0 @@ -# CombinedStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commit_url** | Option<**String**> | | [optional] -**repository** | Option<[**models::Repository**](Repository.md)> | | [optional] -**sha** | Option<**String**> | | [optional] -**state** | Option<**String**> | CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" | [optional] -**statuses** | Option<[**Vec**](CommitStatus.md)> | | [optional] -**total_count** | Option<**i64**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Comment.md b/forgejo-openapi/docs/Comment.md deleted file mode 100644 index fcf0484..0000000 --- a/forgejo-openapi/docs/Comment.md +++ /dev/null @@ -1,21 +0,0 @@ -# Comment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assets** | Option<[**Vec**](Attachment.md)> | | [optional] -**body** | Option<**String**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**html_url** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**issue_url** | Option<**String**> | | [optional] -**original_author** | Option<**String**> | | [optional] -**original_author_id** | Option<**i64**> | | [optional] -**pull_request_url** | Option<**String**> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**user** | Option<[**models::User**](User.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Commit.md b/forgejo-openapi/docs/Commit.md deleted file mode 100644 index 6bc6fd8..0000000 --- a/forgejo-openapi/docs/Commit.md +++ /dev/null @@ -1,20 +0,0 @@ -# Commit - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**author** | Option<[**models::User**](User.md)> | | [optional] -**commit** | Option<[**models::RepoCommit**](RepoCommit.md)> | | [optional] -**committer** | Option<[**models::User**](User.md)> | | [optional] -**created** | Option<**String**> | | [optional] -**files** | Option<[**Vec**](CommitAffectedFiles.md)> | | [optional] -**html_url** | Option<**String**> | | [optional] -**parents** | Option<[**Vec**](CommitMeta.md)> | | [optional] -**sha** | Option<**String**> | | [optional] -**stats** | Option<[**models::CommitStats**](CommitStats.md)> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CommitAffectedFiles.md b/forgejo-openapi/docs/CommitAffectedFiles.md deleted file mode 100644 index 04ca21e..0000000 --- a/forgejo-openapi/docs/CommitAffectedFiles.md +++ /dev/null @@ -1,12 +0,0 @@ -# CommitAffectedFiles - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**filename** | Option<**String**> | | [optional] -**status** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CommitDateOptions.md b/forgejo-openapi/docs/CommitDateOptions.md deleted file mode 100644 index b118f48..0000000 --- a/forgejo-openapi/docs/CommitDateOptions.md +++ /dev/null @@ -1,12 +0,0 @@ -# CommitDateOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**author** | Option<**String**> | | [optional] -**committer** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CommitMeta.md b/forgejo-openapi/docs/CommitMeta.md deleted file mode 100644 index e026016..0000000 --- a/forgejo-openapi/docs/CommitMeta.md +++ /dev/null @@ -1,13 +0,0 @@ -# CommitMeta - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created** | Option<**String**> | | [optional] -**sha** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CommitStats.md b/forgejo-openapi/docs/CommitStats.md deleted file mode 100644 index 1ebf9e2..0000000 --- a/forgejo-openapi/docs/CommitStats.md +++ /dev/null @@ -1,13 +0,0 @@ -# CommitStats - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additions** | Option<**i64**> | | [optional] -**deletions** | Option<**i64**> | | [optional] -**total** | Option<**i64**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CommitStatus.md b/forgejo-openapi/docs/CommitStatus.md deleted file mode 100644 index e78b65b..0000000 --- a/forgejo-openapi/docs/CommitStatus.md +++ /dev/null @@ -1,19 +0,0 @@ -# CommitStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | Option<**String**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**creator** | Option<[**models::User**](User.md)> | | [optional] -**description** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**status** | Option<**String**> | CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" | [optional] -**target_url** | Option<**String**> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CommitUser.md b/forgejo-openapi/docs/CommitUser.md deleted file mode 100644 index cafe69d..0000000 --- a/forgejo-openapi/docs/CommitUser.md +++ /dev/null @@ -1,13 +0,0 @@ -# CommitUser - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**date** | Option<**String**> | | [optional] -**email** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Compare.md b/forgejo-openapi/docs/Compare.md deleted file mode 100644 index 3b3618f..0000000 --- a/forgejo-openapi/docs/Compare.md +++ /dev/null @@ -1,13 +0,0 @@ -# Compare - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commits** | Option<[**Vec**](Commit.md)> | | [optional] -**files** | Option<[**Vec**](CommitAffectedFiles.md)> | | [optional] -**total_commits** | Option<**i64**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ContentsResponse.md b/forgejo-openapi/docs/ContentsResponse.md deleted file mode 100644 index 6fe7047..0000000 --- a/forgejo-openapi/docs/ContentsResponse.md +++ /dev/null @@ -1,26 +0,0 @@ -# ContentsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | Option<[**models::FileLinksResponse**](FileLinksResponse.md)> | | [optional] -**content** | Option<**String**> | `content` is populated when `type` is `file`, otherwise null | [optional] -**download_url** | Option<**String**> | | [optional] -**encoding** | Option<**String**> | `encoding` is populated when `type` is `file`, otherwise null | [optional] -**git_url** | Option<**String**> | | [optional] -**html_url** | Option<**String**> | | [optional] -**last_commit_sha** | Option<**String**> | | [optional] -**last_commit_when** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**path** | Option<**String**> | | [optional] -**sha** | Option<**String**> | | [optional] -**size** | Option<**i64**> | | [optional] -**submodule_git_url** | Option<**String**> | `submodule_git_url` is populated when `type` is `submodule`, otherwise null | [optional] -**target** | Option<**String**> | `target` is populated when `type` is `symlink`, otherwise null | [optional] -**r#type** | Option<**String**> | `type` will be `file`, `dir`, `symlink`, or `submodule` | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateAccessTokenOption.md b/forgejo-openapi/docs/CreateAccessTokenOption.md deleted file mode 100644 index 604b7d9..0000000 --- a/forgejo-openapi/docs/CreateAccessTokenOption.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateAccessTokenOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**scopes** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateBranchProtectionOption.md b/forgejo-openapi/docs/CreateBranchProtectionOption.md deleted file mode 100644 index 44f565e..0000000 --- a/forgejo-openapi/docs/CreateBranchProtectionOption.md +++ /dev/null @@ -1,35 +0,0 @@ -# CreateBranchProtectionOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apply_to_admins** | Option<**bool**> | | [optional] -**approvals_whitelist_teams** | Option<**Vec**> | | [optional] -**approvals_whitelist_username** | Option<**Vec**> | | [optional] -**block_on_official_review_requests** | Option<**bool**> | | [optional] -**block_on_outdated_branch** | Option<**bool**> | | [optional] -**block_on_rejected_reviews** | Option<**bool**> | | [optional] -**branch_name** | Option<**String**> | Deprecated: true | [optional] -**dismiss_stale_approvals** | Option<**bool**> | | [optional] -**enable_approvals_whitelist** | Option<**bool**> | | [optional] -**enable_merge_whitelist** | Option<**bool**> | | [optional] -**enable_push** | Option<**bool**> | | [optional] -**enable_push_whitelist** | Option<**bool**> | | [optional] -**enable_status_check** | Option<**bool**> | | [optional] -**ignore_stale_approvals** | Option<**bool**> | | [optional] -**merge_whitelist_teams** | Option<**Vec**> | | [optional] -**merge_whitelist_usernames** | Option<**Vec**> | | [optional] -**protected_file_patterns** | Option<**String**> | | [optional] -**push_whitelist_deploy_keys** | Option<**bool**> | | [optional] -**push_whitelist_teams** | Option<**Vec**> | | [optional] -**push_whitelist_usernames** | Option<**Vec**> | | [optional] -**require_signed_commits** | Option<**bool**> | | [optional] -**required_approvals** | Option<**i64**> | | [optional] -**rule_name** | Option<**String**> | | [optional] -**status_check_contexts** | Option<**Vec**> | | [optional] -**unprotected_file_patterns** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateBranchRepoOption.md b/forgejo-openapi/docs/CreateBranchRepoOption.md deleted file mode 100644 index d46da8e..0000000 --- a/forgejo-openapi/docs/CreateBranchRepoOption.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateBranchRepoOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**new_branch_name** | **String** | Name of the branch to create | -**old_branch_name** | Option<**String**> | Deprecated: true Name of the old branch to create from | [optional] -**old_ref_name** | Option<**String**> | Name of the old branch/tag/commit to create from | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateEmailOption.md b/forgejo-openapi/docs/CreateEmailOption.md deleted file mode 100644 index 1224abf..0000000 --- a/forgejo-openapi/docs/CreateEmailOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateEmailOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**emails** | Option<**Vec**> | email addresses to add | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateFileOptions.md b/forgejo-openapi/docs/CreateFileOptions.md deleted file mode 100644 index ff20b70..0000000 --- a/forgejo-openapi/docs/CreateFileOptions.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreateFileOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**author** | Option<[**models::Identity**](Identity.md)> | | [optional] -**branch** | Option<**String**> | branch (optional) to base this file from. if not given, the default branch is used | [optional] -**committer** | Option<[**models::Identity**](Identity.md)> | | [optional] -**content** | **String** | content must be base64 encoded | -**dates** | Option<[**models::CommitDateOptions**](CommitDateOptions.md)> | | [optional] -**message** | Option<**String**> | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] -**new_branch** | Option<**String**> | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] -**signoff** | Option<**bool**> | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateForkOption.md b/forgejo-openapi/docs/CreateForkOption.md deleted file mode 100644 index f24a7cc..0000000 --- a/forgejo-openapi/docs/CreateForkOption.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateForkOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | Option<**String**> | name of the forked repository | [optional] -**organization** | Option<**String**> | organization name, if forking into an organization | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateGpgKeyOption.md b/forgejo-openapi/docs/CreateGpgKeyOption.md deleted file mode 100644 index a96e002..0000000 --- a/forgejo-openapi/docs/CreateGpgKeyOption.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateGpgKeyOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**armored_public_key** | **String** | An armored GPG key to add | -**armored_signature** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateHookOption.md b/forgejo-openapi/docs/CreateHookOption.md deleted file mode 100644 index 9c0e765..0000000 --- a/forgejo-openapi/docs/CreateHookOption.md +++ /dev/null @@ -1,16 +0,0 @@ -# CreateHookOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active** | Option<**bool**> | | [optional][default to false] -**authorization_header** | Option<**String**> | | [optional] -**branch_filter** | Option<**String**> | | [optional] -**config** | **std::collections::HashMap** | CreateHookOptionConfig has all config options in it required are \"content_type\" and \"url\" Required | -**events** | Option<**Vec**> | | [optional] -**r#type** | **Type** | (enum: forgejo, dingtalk, discord, gitea, gogs, msteams, slack, telegram, feishu, wechatwork, packagist) | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateIssueCommentOption.md b/forgejo-openapi/docs/CreateIssueCommentOption.md deleted file mode 100644 index 5e00325..0000000 --- a/forgejo-openapi/docs/CreateIssueCommentOption.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateIssueCommentOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | **String** | | -**updated_at** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateIssueOption.md b/forgejo-openapi/docs/CreateIssueOption.md deleted file mode 100644 index 08e71d6..0000000 --- a/forgejo-openapi/docs/CreateIssueOption.md +++ /dev/null @@ -1,19 +0,0 @@ -# CreateIssueOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assignee** | Option<**String**> | deprecated | [optional] -**assignees** | Option<**Vec**> | | [optional] -**body** | Option<**String**> | | [optional] -**closed** | Option<**bool**> | | [optional] -**due_date** | Option<**String**> | | [optional] -**labels** | Option<**Vec**> | list of label ids | [optional] -**milestone** | Option<**i64**> | milestone id | [optional] -**r#ref** | Option<**String**> | | [optional] -**title** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateKeyOption.md b/forgejo-openapi/docs/CreateKeyOption.md deleted file mode 100644 index cdab8a1..0000000 --- a/forgejo-openapi/docs/CreateKeyOption.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateKeyOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | An armored SSH key to add | -**read_only** | Option<**bool**> | Describe if the key has only read access or read/write | [optional] -**title** | **String** | Title of the key to add | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateLabelOption.md b/forgejo-openapi/docs/CreateLabelOption.md deleted file mode 100644 index 4db4045..0000000 --- a/forgejo-openapi/docs/CreateLabelOption.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateLabelOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**color** | **String** | | -**description** | Option<**String**> | | [optional] -**exclusive** | Option<**bool**> | | [optional] -**is_archived** | Option<**bool**> | | [optional] -**name** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateMilestoneOption.md b/forgejo-openapi/docs/CreateMilestoneOption.md deleted file mode 100644 index bd356db..0000000 --- a/forgejo-openapi/docs/CreateMilestoneOption.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateMilestoneOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | | [optional] -**due_on** | Option<**String**> | | [optional] -**state** | Option<**State**> | (enum: open, closed) | [optional] -**title** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateOAuth2ApplicationOptions.md b/forgejo-openapi/docs/CreateOAuth2ApplicationOptions.md deleted file mode 100644 index da5608c..0000000 --- a/forgejo-openapi/docs/CreateOAuth2ApplicationOptions.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateOAuth2ApplicationOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**confidential_client** | Option<**bool**> | | [optional] -**name** | Option<**String**> | | [optional] -**redirect_uris** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateOrUpdateSecretOption.md b/forgejo-openapi/docs/CreateOrUpdateSecretOption.md deleted file mode 100644 index 0bebb3d..0000000 --- a/forgejo-openapi/docs/CreateOrUpdateSecretOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateOrUpdateSecretOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | **String** | Data of the secret to update | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateOrgOption.md b/forgejo-openapi/docs/CreateOrgOption.md deleted file mode 100644 index d398d89..0000000 --- a/forgejo-openapi/docs/CreateOrgOption.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreateOrgOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | | [optional] -**email** | Option<**String**> | | [optional] -**full_name** | Option<**String**> | | [optional] -**location** | Option<**String**> | | [optional] -**repo_admin_change_team_access** | Option<**bool**> | | [optional] -**username** | **String** | | -**visibility** | Option<**Visibility**> | possible values are `public` (default), `limited` or `private` (enum: public, limited, private) | [optional] -**website** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreatePullRequestOption.md b/forgejo-openapi/docs/CreatePullRequestOption.md deleted file mode 100644 index 1028806..0000000 --- a/forgejo-openapi/docs/CreatePullRequestOption.md +++ /dev/null @@ -1,19 +0,0 @@ -# CreatePullRequestOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assignee** | Option<**String**> | | [optional] -**assignees** | Option<**Vec**> | | [optional] -**base** | Option<**String**> | | [optional] -**body** | Option<**String**> | | [optional] -**due_date** | Option<**String**> | | [optional] -**head** | Option<**String**> | | [optional] -**labels** | Option<**Vec**> | | [optional] -**milestone** | Option<**i64**> | | [optional] -**title** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreatePullReviewComment.md b/forgejo-openapi/docs/CreatePullReviewComment.md deleted file mode 100644 index 62985a9..0000000 --- a/forgejo-openapi/docs/CreatePullReviewComment.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreatePullReviewComment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | Option<**String**> | | [optional] -**new_position** | Option<**i64**> | if comment to new file line or 0 | [optional] -**old_position** | Option<**i64**> | if comment to old file line or 0 | [optional] -**path** | Option<**String**> | the tree path | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreatePullReviewOptions.md b/forgejo-openapi/docs/CreatePullReviewOptions.md deleted file mode 100644 index 7e3331b..0000000 --- a/forgejo-openapi/docs/CreatePullReviewOptions.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreatePullReviewOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | Option<**String**> | | [optional] -**comments** | Option<[**Vec**](CreatePullReviewComment.md)> | | [optional] -**commit_id** | Option<**String**> | | [optional] -**event** | Option<**String**> | ReviewStateType review state type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreatePushMirrorOption.md b/forgejo-openapi/docs/CreatePushMirrorOption.md deleted file mode 100644 index a0baa9f..0000000 --- a/forgejo-openapi/docs/CreatePushMirrorOption.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreatePushMirrorOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**branch_filter** | Option<**String**> | | [optional] -**interval** | Option<**String**> | | [optional] -**remote_address** | Option<**String**> | | [optional] -**remote_password** | Option<**String**> | | [optional] -**remote_username** | Option<**String**> | | [optional] -**sync_on_commit** | Option<**bool**> | | [optional] -**use_ssh** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateQuotaGroupOptions.md b/forgejo-openapi/docs/CreateQuotaGroupOptions.md deleted file mode 100644 index 4a5abe5..0000000 --- a/forgejo-openapi/docs/CreateQuotaGroupOptions.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateQuotaGroupOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | Option<**String**> | Name of the quota group to create | [optional] -**rules** | Option<[**Vec**](CreateQuotaRuleOptions.md)> | Rules to add to the newly created group. If a rule does not exist, it will be created. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateQuotaRuleOptions.md b/forgejo-openapi/docs/CreateQuotaRuleOptions.md deleted file mode 100644 index 167b2f1..0000000 --- a/forgejo-openapi/docs/CreateQuotaRuleOptions.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateQuotaRuleOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | Option<**i64**> | The limit set by the rule | [optional] -**name** | Option<**String**> | Name of the rule to create | [optional] -**subjects** | Option<**Vec**> | The subjects affected by the rule | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateReleaseOption.md b/forgejo-openapi/docs/CreateReleaseOption.md deleted file mode 100644 index fae07ab..0000000 --- a/forgejo-openapi/docs/CreateReleaseOption.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateReleaseOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | Option<**String**> | | [optional] -**draft** | Option<**bool**> | | [optional] -**hide_archive_links** | Option<**bool**> | | [optional] -**name** | Option<**String**> | | [optional] -**prerelease** | Option<**bool**> | | [optional] -**tag_name** | **String** | | -**target_commitish** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateRepoOption.md b/forgejo-openapi/docs/CreateRepoOption.md deleted file mode 100644 index 09763cc..0000000 --- a/forgejo-openapi/docs/CreateRepoOption.md +++ /dev/null @@ -1,22 +0,0 @@ -# CreateRepoOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auto_init** | Option<**bool**> | Whether the repository should be auto-initialized? | [optional] -**default_branch** | Option<**String**> | DefaultBranch of the repository (used when initializes and in template) | [optional] -**description** | Option<**String**> | Description of the repository to create | [optional] -**gitignores** | Option<**String**> | Gitignores to use | [optional] -**issue_labels** | Option<**String**> | Label-Set to use | [optional] -**license** | Option<**String**> | License to use | [optional] -**name** | **String** | Name of the repository to create | -**object_format_name** | Option<**ObjectFormatName**> | ObjectFormatName of the underlying git repository (enum: sha1, sha256) | [optional] -**private** | Option<**bool**> | Whether the repository is private | [optional] -**readme** | Option<**String**> | Readme of the repository to create | [optional] -**template** | Option<**bool**> | Whether the repository is template | [optional] -**trust_model** | Option<**TrustModel**> | TrustModel of the repository (enum: default, collaborator, committer, collaboratorcommitter) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateStatusOption.md b/forgejo-openapi/docs/CreateStatusOption.md deleted file mode 100644 index 81cad3a..0000000 --- a/forgejo-openapi/docs/CreateStatusOption.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateStatusOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | Option<**String**> | | [optional] -**description** | Option<**String**> | | [optional] -**state** | Option<**String**> | CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" | [optional] -**target_url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateTagOption.md b/forgejo-openapi/docs/CreateTagOption.md deleted file mode 100644 index 475f578..0000000 --- a/forgejo-openapi/docs/CreateTagOption.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateTagOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] -**tag_name** | **String** | | -**target** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateTagProtectionOption.md b/forgejo-openapi/docs/CreateTagProtectionOption.md deleted file mode 100644 index 847480a..0000000 --- a/forgejo-openapi/docs/CreateTagProtectionOption.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateTagProtectionOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name_pattern** | Option<**String**> | | [optional] -**whitelist_teams** | Option<**Vec**> | | [optional] -**whitelist_usernames** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateTeamOption.md b/forgejo-openapi/docs/CreateTeamOption.md deleted file mode 100644 index 535c009..0000000 --- a/forgejo-openapi/docs/CreateTeamOption.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateTeamOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**can_create_org_repo** | Option<**bool**> | | [optional] -**description** | Option<**String**> | | [optional] -**includes_all_repositories** | Option<**bool**> | | [optional] -**name** | **String** | | -**permission** | Option<**Permission**> | (enum: read, write, admin) | [optional] -**units** | Option<**Vec**> | | [optional] -**units_map** | Option<**std::collections::HashMap**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateUserOption.md b/forgejo-openapi/docs/CreateUserOption.md deleted file mode 100644 index 56b0d9d..0000000 --- a/forgejo-openapi/docs/CreateUserOption.md +++ /dev/null @@ -1,21 +0,0 @@ -# CreateUserOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | Option<**String**> | For explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to \"now\". | [optional] -**email** | **String** | | -**full_name** | Option<**String**> | | [optional] -**login_name** | Option<**String**> | | [optional] -**must_change_password** | Option<**bool**> | | [optional] -**password** | Option<**String**> | | [optional] -**restricted** | Option<**bool**> | | [optional] -**send_notify** | Option<**bool**> | | [optional] -**source_id** | Option<**i64**> | | [optional] -**username** | **String** | | -**visibility** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateVariableOption.md b/forgejo-openapi/docs/CreateVariableOption.md deleted file mode 100644 index efce49f..0000000 --- a/forgejo-openapi/docs/CreateVariableOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateVariableOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **String** | Value of the variable to create | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/CreateWikiPageOptions.md b/forgejo-openapi/docs/CreateWikiPageOptions.md deleted file mode 100644 index 3b90c8d..0000000 --- a/forgejo-openapi/docs/CreateWikiPageOptions.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateWikiPageOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content_base64** | Option<**String**> | content must be base64 encoded | [optional] -**message** | Option<**String**> | optional commit message summarizing the change | [optional] -**title** | Option<**String**> | page title. leave empty to keep unchanged | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Cron.md b/forgejo-openapi/docs/Cron.md deleted file mode 100644 index 5fc02c3..0000000 --- a/forgejo-openapi/docs/Cron.md +++ /dev/null @@ -1,15 +0,0 @@ -# Cron - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**exec_times** | Option<**i64**> | | [optional] -**name** | Option<**String**> | | [optional] -**next** | Option<**String**> | | [optional] -**prev** | Option<**String**> | | [optional] -**schedule** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/DeleteEmailOption.md b/forgejo-openapi/docs/DeleteEmailOption.md deleted file mode 100644 index 0c15e6e..0000000 --- a/forgejo-openapi/docs/DeleteEmailOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteEmailOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**emails** | Option<**Vec**> | email addresses to delete | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/DeleteFileOptions.md b/forgejo-openapi/docs/DeleteFileOptions.md deleted file mode 100644 index c17bdc5..0000000 --- a/forgejo-openapi/docs/DeleteFileOptions.md +++ /dev/null @@ -1,18 +0,0 @@ -# DeleteFileOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**author** | Option<[**models::Identity**](Identity.md)> | | [optional] -**branch** | Option<**String**> | branch (optional) to base this file from. if not given, the default branch is used | [optional] -**committer** | Option<[**models::Identity**](Identity.md)> | | [optional] -**dates** | Option<[**models::CommitDateOptions**](CommitDateOptions.md)> | | [optional] -**message** | Option<**String**> | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] -**new_branch** | Option<**String**> | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] -**sha** | **String** | sha is the SHA for the file that already exists | -**signoff** | Option<**bool**> | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/DeleteLabelsOption.md b/forgejo-openapi/docs/DeleteLabelsOption.md deleted file mode 100644 index 04a15b7..0000000 --- a/forgejo-openapi/docs/DeleteLabelsOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteLabelsOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**updated_at** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/DeployKey.md b/forgejo-openapi/docs/DeployKey.md deleted file mode 100644 index 8167696..0000000 --- a/forgejo-openapi/docs/DeployKey.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeployKey - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | Option<**String**> | | [optional] -**fingerprint** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**key** | Option<**String**> | | [optional] -**key_id** | Option<**i64**> | | [optional] -**read_only** | Option<**bool**> | | [optional] -**repository** | Option<[**models::Repository**](Repository.md)> | | [optional] -**title** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/DismissPullReviewOptions.md b/forgejo-openapi/docs/DismissPullReviewOptions.md deleted file mode 100644 index 58cbdb7..0000000 --- a/forgejo-openapi/docs/DismissPullReviewOptions.md +++ /dev/null @@ -1,12 +0,0 @@ -# DismissPullReviewOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] -**priors** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/DispatchWorkflowOption.md b/forgejo-openapi/docs/DispatchWorkflowOption.md deleted file mode 100644 index dd01ac6..0000000 --- a/forgejo-openapi/docs/DispatchWorkflowOption.md +++ /dev/null @@ -1,13 +0,0 @@ -# DispatchWorkflowOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**inputs** | Option<**std::collections::HashMap**> | Input keys and values configured in the workflow file. | [optional] -**r#ref** | **String** | Git reference for the workflow | -**return_run_info** | Option<**bool**> | Flag to return the run info | [optional][default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/DispatchWorkflowRun.md b/forgejo-openapi/docs/DispatchWorkflowRun.md deleted file mode 100644 index 4fc758b..0000000 --- a/forgejo-openapi/docs/DispatchWorkflowRun.md +++ /dev/null @@ -1,13 +0,0 @@ -# DispatchWorkflowRun - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | Option<**i64**> | the workflow run id | [optional] -**jobs** | Option<**Vec**> | the jobs name | [optional] -**run_number** | Option<**i64**> | a unique number for each run of a repository | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditAttachmentOptions.md b/forgejo-openapi/docs/EditAttachmentOptions.md deleted file mode 100644 index 14b5972..0000000 --- a/forgejo-openapi/docs/EditAttachmentOptions.md +++ /dev/null @@ -1,12 +0,0 @@ -# EditAttachmentOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**browser_download_url** | Option<**String**> | (Can only be set if existing attachment is of external type) | [optional] -**name** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditBranchProtectionOption.md b/forgejo-openapi/docs/EditBranchProtectionOption.md deleted file mode 100644 index 65edf57..0000000 --- a/forgejo-openapi/docs/EditBranchProtectionOption.md +++ /dev/null @@ -1,33 +0,0 @@ -# EditBranchProtectionOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apply_to_admins** | Option<**bool**> | | [optional] -**approvals_whitelist_teams** | Option<**Vec**> | | [optional] -**approvals_whitelist_username** | Option<**Vec**> | | [optional] -**block_on_official_review_requests** | Option<**bool**> | | [optional] -**block_on_outdated_branch** | Option<**bool**> | | [optional] -**block_on_rejected_reviews** | Option<**bool**> | | [optional] -**dismiss_stale_approvals** | Option<**bool**> | | [optional] -**enable_approvals_whitelist** | Option<**bool**> | | [optional] -**enable_merge_whitelist** | Option<**bool**> | | [optional] -**enable_push** | Option<**bool**> | | [optional] -**enable_push_whitelist** | Option<**bool**> | | [optional] -**enable_status_check** | Option<**bool**> | | [optional] -**ignore_stale_approvals** | Option<**bool**> | | [optional] -**merge_whitelist_teams** | Option<**Vec**> | | [optional] -**merge_whitelist_usernames** | Option<**Vec**> | | [optional] -**protected_file_patterns** | Option<**String**> | | [optional] -**push_whitelist_deploy_keys** | Option<**bool**> | | [optional] -**push_whitelist_teams** | Option<**Vec**> | | [optional] -**push_whitelist_usernames** | Option<**Vec**> | | [optional] -**require_signed_commits** | Option<**bool**> | | [optional] -**required_approvals** | Option<**i64**> | | [optional] -**status_check_contexts** | Option<**Vec**> | | [optional] -**unprotected_file_patterns** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditDeadlineOption.md b/forgejo-openapi/docs/EditDeadlineOption.md deleted file mode 100644 index 2924880..0000000 --- a/forgejo-openapi/docs/EditDeadlineOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# EditDeadlineOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**due_date** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditGitHookOption.md b/forgejo-openapi/docs/EditGitHookOption.md deleted file mode 100644 index 01bd2a8..0000000 --- a/forgejo-openapi/docs/EditGitHookOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# EditGitHookOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditHookOption.md b/forgejo-openapi/docs/EditHookOption.md deleted file mode 100644 index f62d9ce..0000000 --- a/forgejo-openapi/docs/EditHookOption.md +++ /dev/null @@ -1,15 +0,0 @@ -# EditHookOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active** | Option<**bool**> | | [optional] -**authorization_header** | Option<**String**> | | [optional] -**branch_filter** | Option<**String**> | | [optional] -**config** | Option<**std::collections::HashMap**> | | [optional] -**events** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditIssueCommentOption.md b/forgejo-openapi/docs/EditIssueCommentOption.md deleted file mode 100644 index 05f5501..0000000 --- a/forgejo-openapi/docs/EditIssueCommentOption.md +++ /dev/null @@ -1,12 +0,0 @@ -# EditIssueCommentOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | **String** | | -**updated_at** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditIssueOption.md b/forgejo-openapi/docs/EditIssueOption.md deleted file mode 100644 index a08b665..0000000 --- a/forgejo-openapi/docs/EditIssueOption.md +++ /dev/null @@ -1,20 +0,0 @@ -# EditIssueOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assignee** | Option<**String**> | deprecated | [optional] -**assignees** | Option<**Vec**> | | [optional] -**body** | Option<**String**> | | [optional] -**due_date** | Option<**String**> | | [optional] -**milestone** | Option<**i64**> | | [optional] -**r#ref** | Option<**String**> | | [optional] -**state** | Option<**String**> | | [optional] -**title** | Option<**String**> | | [optional] -**unset_due_date** | Option<**bool**> | | [optional] -**updated_at** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditLabelOption.md b/forgejo-openapi/docs/EditLabelOption.md deleted file mode 100644 index 6385abe..0000000 --- a/forgejo-openapi/docs/EditLabelOption.md +++ /dev/null @@ -1,15 +0,0 @@ -# EditLabelOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**color** | Option<**String**> | | [optional] -**description** | Option<**String**> | | [optional] -**exclusive** | Option<**bool**> | | [optional] -**is_archived** | Option<**bool**> | | [optional] -**name** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditMilestoneOption.md b/forgejo-openapi/docs/EditMilestoneOption.md deleted file mode 100644 index e266c1c..0000000 --- a/forgejo-openapi/docs/EditMilestoneOption.md +++ /dev/null @@ -1,14 +0,0 @@ -# EditMilestoneOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | | [optional] -**due_on** | Option<**String**> | | [optional] -**state** | Option<**String**> | | [optional] -**title** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditOrgOption.md b/forgejo-openapi/docs/EditOrgOption.md deleted file mode 100644 index e97f5be..0000000 --- a/forgejo-openapi/docs/EditOrgOption.md +++ /dev/null @@ -1,17 +0,0 @@ -# EditOrgOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | | [optional] -**email** | Option<**String**> | | [optional] -**full_name** | Option<**String**> | | [optional] -**location** | Option<**String**> | | [optional] -**repo_admin_change_team_access** | Option<**bool**> | | [optional] -**visibility** | Option<**Visibility**> | possible values are `public`, `limited` or `private` (enum: public, limited, private) | [optional] -**website** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditPullRequestOption.md b/forgejo-openapi/docs/EditPullRequestOption.md deleted file mode 100644 index fe31231..0000000 --- a/forgejo-openapi/docs/EditPullRequestOption.md +++ /dev/null @@ -1,21 +0,0 @@ -# EditPullRequestOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allow_maintainer_edit** | Option<**bool**> | | [optional] -**assignee** | Option<**String**> | | [optional] -**assignees** | Option<**Vec**> | | [optional] -**base** | Option<**String**> | | [optional] -**body** | Option<**String**> | | [optional] -**due_date** | Option<**String**> | | [optional] -**labels** | Option<**Vec**> | | [optional] -**milestone** | Option<**i64**> | | [optional] -**state** | Option<**String**> | | [optional] -**title** | Option<**String**> | | [optional] -**unset_due_date** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditQuotaRuleOptions.md b/forgejo-openapi/docs/EditQuotaRuleOptions.md deleted file mode 100644 index 5cb1dfa..0000000 --- a/forgejo-openapi/docs/EditQuotaRuleOptions.md +++ /dev/null @@ -1,12 +0,0 @@ -# EditQuotaRuleOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | Option<**i64**> | The limit set by the rule | [optional] -**subjects** | Option<**Vec**> | The subjects affected by the rule | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditReactionOption.md b/forgejo-openapi/docs/EditReactionOption.md deleted file mode 100644 index 6f01410..0000000 --- a/forgejo-openapi/docs/EditReactionOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# EditReactionOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditReleaseOption.md b/forgejo-openapi/docs/EditReleaseOption.md deleted file mode 100644 index adbc849..0000000 --- a/forgejo-openapi/docs/EditReleaseOption.md +++ /dev/null @@ -1,17 +0,0 @@ -# EditReleaseOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | Option<**String**> | | [optional] -**draft** | Option<**bool**> | | [optional] -**hide_archive_links** | Option<**bool**> | | [optional] -**name** | Option<**String**> | | [optional] -**prerelease** | Option<**bool**> | | [optional] -**tag_name** | Option<**String**> | | [optional] -**target_commitish** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditRepoOption.md b/forgejo-openapi/docs/EditRepoOption.md deleted file mode 100644 index 8291e2c..0000000 --- a/forgejo-openapi/docs/EditRepoOption.md +++ /dev/null @@ -1,44 +0,0 @@ -# EditRepoOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allow_fast_forward_only_merge** | Option<**bool**> | either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging. | [optional] -**allow_manual_merge** | Option<**bool**> | either `true` to allow mark pr as merged manually, or `false` to prevent it. | [optional] -**allow_merge_commits** | Option<**bool**> | either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. | [optional] -**allow_rebase** | Option<**bool**> | either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. | [optional] -**allow_rebase_explicit** | Option<**bool**> | either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. | [optional] -**allow_rebase_update** | Option<**bool**> | either `true` to allow updating pull request branch by rebase, or `false` to prevent it. | [optional] -**allow_squash_merge** | Option<**bool**> | either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. | [optional] -**archived** | Option<**bool**> | set to `true` to archive this repository. | [optional] -**autodetect_manual_merge** | Option<**bool**> | either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. | [optional] -**default_allow_maintainer_edit** | Option<**bool**> | set to `true` to allow edits from maintainers by default | [optional] -**default_branch** | Option<**String**> | sets the default branch for this repository. | [optional] -**default_delete_branch_after_merge** | Option<**bool**> | set to `true` to delete pr branch after merge by default | [optional] -**default_merge_style** | Option<**String**> | set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", \"fast-forward-only\", \"manually-merged\", or \"rebase-update-only\". | [optional] -**default_update_style** | Option<**String**> | set to a update style to be used by this repository: \"rebase\" or \"merge\" | [optional] -**description** | Option<**String**> | a short description of the repository. | [optional] -**enable_prune** | Option<**bool**> | enable prune - remove obsolete remote-tracking references when mirroring | [optional] -**external_tracker** | Option<[**models::ExternalTracker**](ExternalTracker.md)> | | [optional] -**external_wiki** | Option<[**models::ExternalWiki**](ExternalWiki.md)> | | [optional] -**globally_editable_wiki** | Option<**bool**> | set the globally editable state of the wiki | [optional] -**has_actions** | Option<**bool**> | either `true` to enable actions unit, or `false` to disable them. | [optional] -**has_issues** | Option<**bool**> | either `true` to enable issues for this repository or `false` to disable them. | [optional] -**has_packages** | Option<**bool**> | either `true` to enable packages unit, or `false` to disable them. | [optional] -**has_projects** | Option<**bool**> | either `true` to enable project unit, or `false` to disable them. | [optional] -**has_pull_requests** | Option<**bool**> | either `true` to allow pull requests, or `false` to prevent pull request. | [optional] -**has_releases** | Option<**bool**> | either `true` to enable releases unit, or `false` to disable them. | [optional] -**has_wiki** | Option<**bool**> | either `true` to enable the wiki for this repository or `false` to disable it. | [optional] -**ignore_whitespace_conflicts** | Option<**bool**> | either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. | [optional] -**internal_tracker** | Option<[**models::InternalTracker**](InternalTracker.md)> | | [optional] -**mirror_interval** | Option<**String**> | set to a string like `8h30m0s` to set the mirror interval time | [optional] -**name** | Option<**String**> | name of the repository | [optional] -**private** | Option<**bool**> | either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. | [optional] -**template** | Option<**bool**> | either `true` to make this repository a template or `false` to make it a normal repository | [optional] -**website** | Option<**String**> | a URL with more information about the repository. | [optional] -**wiki_branch** | Option<**String**> | sets the branch used for this repository's wiki. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditTagProtectionOption.md b/forgejo-openapi/docs/EditTagProtectionOption.md deleted file mode 100644 index 906ac9a..0000000 --- a/forgejo-openapi/docs/EditTagProtectionOption.md +++ /dev/null @@ -1,13 +0,0 @@ -# EditTagProtectionOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name_pattern** | Option<**String**> | | [optional] -**whitelist_teams** | Option<**Vec**> | | [optional] -**whitelist_usernames** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditTeamOption.md b/forgejo-openapi/docs/EditTeamOption.md deleted file mode 100644 index cacb70d..0000000 --- a/forgejo-openapi/docs/EditTeamOption.md +++ /dev/null @@ -1,17 +0,0 @@ -# EditTeamOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**can_create_org_repo** | Option<**bool**> | | [optional] -**description** | Option<**String**> | | [optional] -**includes_all_repositories** | Option<**bool**> | | [optional] -**name** | **String** | | -**permission** | Option<**Permission**> | (enum: read, write, admin) | [optional] -**units** | Option<**Vec**> | | [optional] -**units_map** | Option<**std::collections::HashMap**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/EditUserOption.md b/forgejo-openapi/docs/EditUserOption.md deleted file mode 100644 index fec62cb..0000000 --- a/forgejo-openapi/docs/EditUserOption.md +++ /dev/null @@ -1,30 +0,0 @@ -# EditUserOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active** | Option<**bool**> | | [optional] -**admin** | Option<**bool**> | | [optional] -**allow_create_organization** | Option<**bool**> | | [optional] -**allow_git_hook** | Option<**bool**> | | [optional] -**allow_import_local** | Option<**bool**> | | [optional] -**description** | Option<**String**> | | [optional] -**email** | Option<**String**> | | [optional] -**full_name** | Option<**String**> | | [optional] -**hide_email** | Option<**bool**> | | [optional] -**location** | Option<**String**> | | [optional] -**login_name** | Option<**String**> | | [optional] -**max_repo_creation** | Option<**i64**> | | [optional] -**must_change_password** | Option<**bool**> | | [optional] -**password** | Option<**String**> | | [optional] -**prohibit_login** | Option<**bool**> | | [optional] -**pronouns** | Option<**String**> | | [optional] -**restricted** | Option<**bool**> | | [optional] -**source_id** | Option<**i64**> | | [optional] -**visibility** | Option<**String**> | | [optional] -**website** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Email.md b/forgejo-openapi/docs/Email.md deleted file mode 100644 index 0b0d7f7..0000000 --- a/forgejo-openapi/docs/Email.md +++ /dev/null @@ -1,15 +0,0 @@ -# Email - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | Option<**String**> | | [optional] -**primary** | Option<**bool**> | | [optional] -**user_id** | Option<**i64**> | | [optional] -**username** | Option<**String**> | | [optional] -**verified** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ExternalTracker.md b/forgejo-openapi/docs/ExternalTracker.md deleted file mode 100644 index 11ba791..0000000 --- a/forgejo-openapi/docs/ExternalTracker.md +++ /dev/null @@ -1,14 +0,0 @@ -# ExternalTracker - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**external_tracker_format** | Option<**String**> | External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. | [optional] -**external_tracker_regexp_pattern** | Option<**String**> | External Issue Tracker issue regular expression | [optional] -**external_tracker_style** | Option<**String**> | External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` | [optional] -**external_tracker_url** | Option<**String**> | URL of external issue tracker. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ExternalWiki.md b/forgejo-openapi/docs/ExternalWiki.md deleted file mode 100644 index 73c0abd..0000000 --- a/forgejo-openapi/docs/ExternalWiki.md +++ /dev/null @@ -1,11 +0,0 @@ -# ExternalWiki - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**external_wiki_url** | Option<**String**> | URL of external wiki. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/FileCommitResponse.md b/forgejo-openapi/docs/FileCommitResponse.md deleted file mode 100644 index 300ca9f..0000000 --- a/forgejo-openapi/docs/FileCommitResponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# FileCommitResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**author** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] -**committer** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] -**created** | Option<**String**> | | [optional] -**html_url** | Option<**String**> | | [optional] -**message** | Option<**String**> | | [optional] -**parents** | Option<[**Vec**](CommitMeta.md)> | | [optional] -**sha** | Option<**String**> | | [optional] -**tree** | Option<[**models::CommitMeta**](CommitMeta.md)> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/FileDeleteResponse.md b/forgejo-openapi/docs/FileDeleteResponse.md deleted file mode 100644 index ef7e876..0000000 --- a/forgejo-openapi/docs/FileDeleteResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# FileDeleteResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commit** | Option<[**models::FileCommitResponse**](FileCommitResponse.md)> | | [optional] -**content** | Option<**serde_json::Value**> | | [optional] -**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/FileLinksResponse.md b/forgejo-openapi/docs/FileLinksResponse.md deleted file mode 100644 index c6f1372..0000000 --- a/forgejo-openapi/docs/FileLinksResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# FileLinksResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**git** | Option<**String**> | | [optional] -**html** | Option<**String**> | | [optional] -**param_self** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/FileResponse.md b/forgejo-openapi/docs/FileResponse.md deleted file mode 100644 index b9a0a3f..0000000 --- a/forgejo-openapi/docs/FileResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# FileResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commit** | Option<[**models::FileCommitResponse**](FileCommitResponse.md)> | | [optional] -**content** | Option<[**models::ContentsResponse**](ContentsResponse.md)> | | [optional] -**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/FilesResponse.md b/forgejo-openapi/docs/FilesResponse.md deleted file mode 100644 index cd78f4a..0000000 --- a/forgejo-openapi/docs/FilesResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# FilesResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commit** | Option<[**models::FileCommitResponse**](FileCommitResponse.md)> | | [optional] -**files** | Option<[**Vec**](ContentsResponse.md)> | | [optional] -**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GeneralApiSettings.md b/forgejo-openapi/docs/GeneralApiSettings.md deleted file mode 100644 index 70a12c7..0000000 --- a/forgejo-openapi/docs/GeneralApiSettings.md +++ /dev/null @@ -1,14 +0,0 @@ -# GeneralApiSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**default_git_trees_per_page** | Option<**i64**> | | [optional] -**default_max_blob_size** | Option<**i64**> | | [optional] -**default_paging_num** | Option<**i64**> | | [optional] -**max_response_items** | Option<**i64**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GeneralAttachmentSettings.md b/forgejo-openapi/docs/GeneralAttachmentSettings.md deleted file mode 100644 index 3597dc2..0000000 --- a/forgejo-openapi/docs/GeneralAttachmentSettings.md +++ /dev/null @@ -1,14 +0,0 @@ -# GeneralAttachmentSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allowed_types** | Option<**String**> | | [optional] -**enabled** | Option<**bool**> | | [optional] -**max_files** | Option<**i64**> | | [optional] -**max_size** | Option<**i64**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GeneralRepoSettings.md b/forgejo-openapi/docs/GeneralRepoSettings.md deleted file mode 100644 index 7b36fcc..0000000 --- a/forgejo-openapi/docs/GeneralRepoSettings.md +++ /dev/null @@ -1,17 +0,0 @@ -# GeneralRepoSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**forks_disabled** | Option<**bool**> | | [optional] -**http_git_disabled** | Option<**bool**> | | [optional] -**lfs_disabled** | Option<**bool**> | | [optional] -**migrations_disabled** | Option<**bool**> | | [optional] -**mirrors_disabled** | Option<**bool**> | | [optional] -**stars_disabled** | Option<**bool**> | | [optional] -**time_tracking_disabled** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GeneralUiSettings.md b/forgejo-openapi/docs/GeneralUiSettings.md deleted file mode 100644 index bdec13d..0000000 --- a/forgejo-openapi/docs/GeneralUiSettings.md +++ /dev/null @@ -1,13 +0,0 @@ -# GeneralUiSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allowed_reactions** | Option<**Vec**> | | [optional] -**custom_emojis** | Option<**Vec**> | | [optional] -**default_theme** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GenerateRepoOption.md b/forgejo-openapi/docs/GenerateRepoOption.md deleted file mode 100644 index 997d4ef..0000000 --- a/forgejo-openapi/docs/GenerateRepoOption.md +++ /dev/null @@ -1,22 +0,0 @@ -# GenerateRepoOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**avatar** | Option<**bool**> | include avatar of the template repo | [optional] -**default_branch** | Option<**String**> | Default branch of the new repository | [optional] -**description** | Option<**String**> | Description of the repository to create | [optional] -**git_content** | Option<**bool**> | include git content of default branch in template repo | [optional] -**git_hooks** | Option<**bool**> | include git hooks in template repo | [optional] -**labels** | Option<**bool**> | include labels in template repo | [optional] -**name** | **String** | Name of the repository to create | -**owner** | **String** | The organization or person who will own the new repository | -**private** | Option<**bool**> | Whether the repository is private | [optional] -**protected_branch** | Option<**bool**> | include protected branches in template repo | [optional] -**topics** | Option<**bool**> | include topics in template repo | [optional] -**webhooks** | Option<**bool**> | include webhooks in template repo | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GitBlob.md b/forgejo-openapi/docs/GitBlob.md deleted file mode 100644 index 8c8de9c..0000000 --- a/forgejo-openapi/docs/GitBlob.md +++ /dev/null @@ -1,15 +0,0 @@ -# GitBlob - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | Option<**String**> | | [optional] -**encoding** | Option<**String**> | | [optional] -**sha** | Option<**String**> | | [optional] -**size** | Option<**i64**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GitEntry.md b/forgejo-openapi/docs/GitEntry.md deleted file mode 100644 index c0acd13..0000000 --- a/forgejo-openapi/docs/GitEntry.md +++ /dev/null @@ -1,16 +0,0 @@ -# GitEntry - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | Option<**String**> | | [optional] -**path** | Option<**String**> | | [optional] -**sha** | Option<**String**> | | [optional] -**size** | Option<**i64**> | | [optional] -**r#type** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GitHook.md b/forgejo-openapi/docs/GitHook.md deleted file mode 100644 index 9d52a95..0000000 --- a/forgejo-openapi/docs/GitHook.md +++ /dev/null @@ -1,13 +0,0 @@ -# GitHook - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | Option<**String**> | | [optional] -**is_active** | Option<**bool**> | | [optional] -**name** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GitObject.md b/forgejo-openapi/docs/GitObject.md deleted file mode 100644 index 4ed7c79..0000000 --- a/forgejo-openapi/docs/GitObject.md +++ /dev/null @@ -1,13 +0,0 @@ -# GitObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sha** | Option<**String**> | | [optional] -**r#type** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GitTreeResponse.md b/forgejo-openapi/docs/GitTreeResponse.md deleted file mode 100644 index 390705d..0000000 --- a/forgejo-openapi/docs/GitTreeResponse.md +++ /dev/null @@ -1,16 +0,0 @@ -# GitTreeResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page** | Option<**i64**> | | [optional] -**sha** | Option<**String**> | | [optional] -**total_count** | Option<**i64**> | | [optional] -**tree** | Option<[**Vec**](GitEntry.md)> | | [optional] -**truncated** | Option<**bool**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GitignoreTemplateInfo.md b/forgejo-openapi/docs/GitignoreTemplateInfo.md deleted file mode 100644 index 67edca5..0000000 --- a/forgejo-openapi/docs/GitignoreTemplateInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# GitignoreTemplateInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | Option<**String**> | | [optional] -**source** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GpgKey.md b/forgejo-openapi/docs/GpgKey.md deleted file mode 100644 index 608c7b4..0000000 --- a/forgejo-openapi/docs/GpgKey.md +++ /dev/null @@ -1,23 +0,0 @@ -# GpgKey - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**can_certify** | Option<**bool**> | | [optional] -**can_encrypt_comms** | Option<**bool**> | | [optional] -**can_encrypt_storage** | Option<**bool**> | | [optional] -**can_sign** | Option<**bool**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**emails** | Option<[**Vec**](GPGKeyEmail.md)> | | [optional] -**expires_at** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**key_id** | Option<**String**> | | [optional] -**primary_key_id** | Option<**String**> | | [optional] -**public_key** | Option<**String**> | | [optional] -**subkeys** | Option<[**Vec**](GPGKey.md)> | | [optional] -**verified** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/GpgKeyEmail.md b/forgejo-openapi/docs/GpgKeyEmail.md deleted file mode 100644 index 191cd58..0000000 --- a/forgejo-openapi/docs/GpgKeyEmail.md +++ /dev/null @@ -1,12 +0,0 @@ -# GpgKeyEmail - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | Option<**String**> | | [optional] -**verified** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Hook.md b/forgejo-openapi/docs/Hook.md deleted file mode 100644 index f74a62d..0000000 --- a/forgejo-openapi/docs/Hook.md +++ /dev/null @@ -1,22 +0,0 @@ -# Hook - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active** | Option<**bool**> | | [optional] -**authorization_header** | Option<**String**> | | [optional] -**branch_filter** | Option<**String**> | | [optional] -**config** | Option<**std::collections::HashMap**> | Deprecated: use Metadata instead | [optional] -**content_type** | Option<**String**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**events** | Option<**Vec**> | | [optional] -**id** | Option<**i64**> | | [optional] -**metadata** | Option<**serde_json::Value**> | | [optional] -**r#type** | Option<**String**> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Identity.md b/forgejo-openapi/docs/Identity.md deleted file mode 100644 index 3f1e0a2..0000000 --- a/forgejo-openapi/docs/Identity.md +++ /dev/null @@ -1,12 +0,0 @@ -# Identity - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/InternalTracker.md b/forgejo-openapi/docs/InternalTracker.md deleted file mode 100644 index 6daf626..0000000 --- a/forgejo-openapi/docs/InternalTracker.md +++ /dev/null @@ -1,13 +0,0 @@ -# InternalTracker - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allow_only_contributors_to_track_time** | Option<**bool**> | Let only contributors track time (Built-in issue tracker) | [optional] -**enable_issue_dependencies** | Option<**bool**> | Enable dependencies for issues and pull requests (Built-in issue tracker) | [optional] -**enable_time_tracker** | Option<**bool**> | Enable time tracking (Built-in issue tracker) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Issue.md b/forgejo-openapi/docs/Issue.md deleted file mode 100644 index da68428..0000000 --- a/forgejo-openapi/docs/Issue.md +++ /dev/null @@ -1,35 +0,0 @@ -# Issue - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assets** | Option<[**Vec**](Attachment.md)> | | [optional] -**assignee** | Option<[**models::User**](User.md)> | | [optional] -**assignees** | Option<[**Vec**](User.md)> | | [optional] -**body** | Option<**String**> | | [optional] -**closed_at** | Option<**String**> | | [optional] -**comments** | Option<**i64**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**due_date** | Option<**String**> | | [optional] -**html_url** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**is_locked** | Option<**bool**> | | [optional] -**labels** | Option<[**Vec**](Label.md)> | | [optional] -**milestone** | Option<[**models::Milestone**](Milestone.md)> | | [optional] -**number** | Option<**i64**> | | [optional] -**original_author** | Option<**String**> | | [optional] -**original_author_id** | Option<**i64**> | | [optional] -**pin_order** | Option<**i64**> | | [optional] -**pull_request** | Option<[**models::PullRequestMeta**](PullRequestMeta.md)> | | [optional] -**r#ref** | Option<**String**> | | [optional] -**repository** | Option<[**models::RepositoryMeta**](RepositoryMeta.md)> | | [optional] -**state** | Option<**String**> | StateType issue state type | [optional] -**title** | Option<**String**> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] -**user** | Option<[**models::User**](User.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/IssueApi.md b/forgejo-openapi/docs/IssueApi.md deleted file mode 100644 index fc6ad35..0000000 --- a/forgejo-openapi/docs/IssueApi.md +++ /dev/null @@ -1,2180 +0,0 @@ -# \IssueApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**issue_add_label**](IssueApi.md#issue_add_label) | **POST** /repos/{owner}/{repo}/issues/{index}/labels | Add a label to an issue -[**issue_add_subscription**](IssueApi.md#issue_add_subscription) | **PUT** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Subscribe user to issue -[**issue_add_time**](IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{index}/times | Add tracked time to a issue -[**issue_check_subscription**](IssueApi.md#issue_check_subscription) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions/check | Check if user is subscribed to an issue -[**issue_clear_labels**](IssueApi.md#issue_clear_labels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue -[**issue_create_comment**](IssueApi.md#issue_create_comment) | **POST** /repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue -[**issue_create_issue**](IssueApi.md#issue_create_issue) | **POST** /repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored. -[**issue_create_issue_attachment**](IssueApi.md#issue_create_issue_attachment) | **POST** /repos/{owner}/{repo}/issues/{index}/assets | Create an issue attachment -[**issue_create_issue_blocking**](IssueApi.md#issue_create_issue_blocking) | **POST** /repos/{owner}/{repo}/issues/{index}/blocks | Block the issue given in the body by the issue in path -[**issue_create_issue_comment_attachment**](IssueApi.md#issue_create_issue_comment_attachment) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/assets | Create a comment attachment -[**issue_create_issue_dependencies**](IssueApi.md#issue_create_issue_dependencies) | **POST** /repos/{owner}/{repo}/issues/{index}/dependencies | Make the issue in the url depend on the issue in the form. -[**issue_create_label**](IssueApi.md#issue_create_label) | **POST** /repos/{owner}/{repo}/labels | Create a label -[**issue_create_milestone**](IssueApi.md#issue_create_milestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone -[**issue_delete**](IssueApi.md#issue_delete) | **DELETE** /repos/{owner}/{repo}/issues/{index} | Delete an issue -[**issue_delete_comment**](IssueApi.md#issue_delete_comment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment -[**issue_delete_comment_deprecated**](IssueApi.md#issue_delete_comment_deprecated) | **DELETE** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Delete a comment -[**issue_delete_comment_reaction**](IssueApi.md#issue_delete_comment_reaction) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Remove a reaction from a comment of an issue -[**issue_delete_issue_attachment**](IssueApi.md#issue_delete_issue_attachment) | **DELETE** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Delete an issue attachment -[**issue_delete_issue_comment_attachment**](IssueApi.md#issue_delete_issue_comment_attachment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Delete a comment attachment -[**issue_delete_issue_reaction**](IssueApi.md#issue_delete_issue_reaction) | **DELETE** /repos/{owner}/{repo}/issues/{index}/reactions | Remove a reaction from an issue -[**issue_delete_label**](IssueApi.md#issue_delete_label) | **DELETE** /repos/{owner}/{repo}/labels/{id} | Delete a label -[**issue_delete_milestone**](IssueApi.md#issue_delete_milestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone -[**issue_delete_stop_watch**](IssueApi.md#issue_delete_stop_watch) | **DELETE** /repos/{owner}/{repo}/issues/{index}/stopwatch/delete | Delete an issue's existing stopwatch. -[**issue_delete_subscription**](IssueApi.md#issue_delete_subscription) | **DELETE** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Unsubscribe user from issue -[**issue_delete_time**](IssueApi.md#issue_delete_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times/{id} | Delete specific tracked time -[**issue_edit_comment**](IssueApi.md#issue_edit_comment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id} | Edit a comment -[**issue_edit_comment_deprecated**](IssueApi.md#issue_edit_comment_deprecated) | **PATCH** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment -[**issue_edit_issue**](IssueApi.md#issue_edit_issue) | **PATCH** /repos/{owner}/{repo}/issues/{index} | Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. -[**issue_edit_issue_attachment**](IssueApi.md#issue_edit_issue_attachment) | **PATCH** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Edit an issue attachment -[**issue_edit_issue_comment_attachment**](IssueApi.md#issue_edit_issue_comment_attachment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Edit a comment attachment -[**issue_edit_issue_deadline**](IssueApi.md#issue_edit_issue_deadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. -[**issue_edit_label**](IssueApi.md#issue_edit_label) | **PATCH** /repos/{owner}/{repo}/labels/{id} | Update a label -[**issue_edit_milestone**](IssueApi.md#issue_edit_milestone) | **PATCH** /repos/{owner}/{repo}/milestones/{id} | Update a milestone -[**issue_get_comment**](IssueApi.md#issue_get_comment) | **GET** /repos/{owner}/{repo}/issues/comments/{id} | Get a comment -[**issue_get_comment_reactions**](IssueApi.md#issue_get_comment_reactions) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Get a list of reactions from a comment of an issue -[**issue_get_comments**](IssueApi.md#issue_get_comments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue -[**issue_get_comments_and_timeline**](IssueApi.md#issue_get_comments_and_timeline) | **GET** /repos/{owner}/{repo}/issues/{index}/timeline | List all comments and events on an issue -[**issue_get_issue**](IssueApi.md#issue_get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get an issue -[**issue_get_issue_attachment**](IssueApi.md#issue_get_issue_attachment) | **GET** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Get an issue attachment -[**issue_get_issue_comment_attachment**](IssueApi.md#issue_get_issue_comment_attachment) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Get a comment attachment -[**issue_get_issue_reactions**](IssueApi.md#issue_get_issue_reactions) | **GET** /repos/{owner}/{repo}/issues/{index}/reactions | Get a list reactions of an issue -[**issue_get_label**](IssueApi.md#issue_get_label) | **GET** /repos/{owner}/{repo}/labels/{id} | Get a single label -[**issue_get_labels**](IssueApi.md#issue_get_labels) | **GET** /repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels -[**issue_get_milestone**](IssueApi.md#issue_get_milestone) | **GET** /repos/{owner}/{repo}/milestones/{id} | Get a milestone -[**issue_get_milestones_list**](IssueApi.md#issue_get_milestones_list) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones -[**issue_get_repo_comments**](IssueApi.md#issue_get_repo_comments) | **GET** /repos/{owner}/{repo}/issues/comments | List all comments in a repository -[**issue_list_blocks**](IssueApi.md#issue_list_blocks) | **GET** /repos/{owner}/{repo}/issues/{index}/blocks | List issues that are blocked by this issue -[**issue_list_issue_attachments**](IssueApi.md#issue_list_issue_attachments) | **GET** /repos/{owner}/{repo}/issues/{index}/assets | List issue's attachments -[**issue_list_issue_comment_attachments**](IssueApi.md#issue_list_issue_comment_attachments) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets | List comment's attachments -[**issue_list_issue_dependencies**](IssueApi.md#issue_list_issue_dependencies) | **GET** /repos/{owner}/{repo}/issues/{index}/dependencies | List an issue's dependencies, i.e all issues that block this issue. -[**issue_list_issues**](IssueApi.md#issue_list_issues) | **GET** /repos/{owner}/{repo}/issues | List a repository's issues -[**issue_list_labels**](IssueApi.md#issue_list_labels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels -[**issue_post_comment_reaction**](IssueApi.md#issue_post_comment_reaction) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Add a reaction to a comment of an issue -[**issue_post_issue_reaction**](IssueApi.md#issue_post_issue_reaction) | **POST** /repos/{owner}/{repo}/issues/{index}/reactions | Add a reaction to an issue -[**issue_remove_issue_blocking**](IssueApi.md#issue_remove_issue_blocking) | **DELETE** /repos/{owner}/{repo}/issues/{index}/blocks | Unblock the issue given in the body by the issue in path -[**issue_remove_issue_dependencies**](IssueApi.md#issue_remove_issue_dependencies) | **DELETE** /repos/{owner}/{repo}/issues/{index}/dependencies | Remove an issue dependency -[**issue_remove_label**](IssueApi.md#issue_remove_label) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{identifier} | Remove a label from an issue -[**issue_replace_labels**](IssueApi.md#issue_replace_labels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels -[**issue_reset_time**](IssueApi.md#issue_reset_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times | Reset a tracked time of an issue -[**issue_search_issues**](IssueApi.md#issue_search_issues) | **GET** /repos/issues/search | Search for issues across the repositories that the user has access to -[**issue_start_stop_watch**](IssueApi.md#issue_start_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue. -[**issue_stop_stop_watch**](IssueApi.md#issue_stop_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. -[**issue_subscriptions**](IssueApi.md#issue_subscriptions) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions | Get users who subscribed on an issue. -[**issue_tracked_times**](IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{index}/times | List an issue's tracked times -[**move_issue_pin**](IssueApi.md#move_issue_pin) | **PATCH** /repos/{owner}/{repo}/issues/{index}/pin/{position} | Moves the Pin to the given Position -[**pin_issue**](IssueApi.md#pin_issue) | **POST** /repos/{owner}/{repo}/issues/{index}/pin | Pin an Issue -[**unpin_issue**](IssueApi.md#unpin_issue) | **DELETE** /repos/{owner}/{repo}/issues/{index}/pin | Unpin an Issue - - - -## issue_add_label - -> Vec issue_add_label(owner, repo, index, body) -Add a label to an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**body** | Option<[**IssueLabelsOption**](IssueLabelsOption.md)> | | | - -### Return type - -[**Vec**](Label.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_add_subscription - -> issue_add_subscription(owner, repo, index, user) -Subscribe user to issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**user** | **String** | user to subscribe | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_add_time - -> models::TrackedTime issue_add_time(owner, repo, index, body) -Add tracked time to a issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**body** | Option<[**AddTimeOption**](AddTimeOption.md)> | | | - -### Return type - -[**models::TrackedTime**](TrackedTime.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_check_subscription - -> models::WatchInfo issue_check_subscription(owner, repo, index) -Check if user is subscribed to an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | - -### Return type - -[**models::WatchInfo**](WatchInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_clear_labels - -> issue_clear_labels(owner, repo, index, body) -Remove all labels from an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**body** | Option<[**DeleteLabelsOption**](DeleteLabelsOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_create_comment - -> models::Comment issue_create_comment(owner, repo, index, body) -Add a comment to an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**body** | Option<[**CreateIssueCommentOption**](CreateIssueCommentOption.md)> | | | - -### Return type - -[**models::Comment**](Comment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_create_issue - -> models::Issue issue_create_issue(owner, repo, body) -Create an issue. If using deadline only the date will be taken into account, and time of day ignored. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreateIssueOption**](CreateIssueOption.md)> | | | - -### Return type - -[**models::Issue**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_create_issue_attachment - -> models::Attachment issue_create_issue_attachment(owner, repo, index, attachment, name, updated_at) -Create an issue attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**attachment** | **std::path::PathBuf** | attachment to upload | [required] | -**name** | Option<**String**> | name of the attachment | | -**updated_at** | Option<**String**> | time of the attachment's creation. This is a timestamp in RFC 3339 format | | - -### Return type - -[**models::Attachment**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_create_issue_blocking - -> models::Issue issue_create_issue_blocking(owner, repo, index, body) -Block the issue given in the body by the issue in path - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**body** | Option<[**IssueMeta**](IssueMeta.md)> | | | - -### Return type - -[**models::Issue**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_create_issue_comment_attachment - -> models::Attachment issue_create_issue_comment_attachment(owner, repo, id, attachment, name, updated_at) -Create a comment attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the comment | [required] | -**attachment** | **std::path::PathBuf** | attachment to upload | [required] | -**name** | Option<**String**> | name of the attachment | | -**updated_at** | Option<**String**> | time of the attachment's creation. This is a timestamp in RFC 3339 format | | - -### Return type - -[**models::Attachment**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_create_issue_dependencies - -> models::Issue issue_create_issue_dependencies(owner, repo, index, body) -Make the issue in the url depend on the issue in the form. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**body** | Option<[**IssueMeta**](IssueMeta.md)> | | | - -### Return type - -[**models::Issue**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_create_label - -> models::Label issue_create_label(owner, repo, body) -Create a label - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreateLabelOption**](CreateLabelOption.md)> | | | - -### Return type - -[**models::Label**](Label.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_create_milestone - -> models::Milestone issue_create_milestone(owner, repo, body) -Create a milestone - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreateMilestoneOption**](CreateMilestoneOption.md)> | | | - -### Return type - -[**models::Milestone**](Milestone.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete - -> issue_delete(owner, repo, index) -Delete an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of issue to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete_comment - -> issue_delete_comment(owner, repo, id) -Delete a comment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of comment to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete_comment_deprecated - -> issue_delete_comment_deprecated(owner, repo, index, id) -Delete a comment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i32** | this parameter is ignored | [required] | -**id** | **i64** | id of comment to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete_comment_reaction - -> issue_delete_comment_reaction(owner, repo, id, content) -Remove a reaction from a comment of an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the comment to edit | [required] | -**content** | Option<[**EditReactionOption**](EditReactionOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete_issue_attachment - -> issue_delete_issue_attachment(owner, repo, index, attachment_id) -Delete an issue attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**attachment_id** | **i64** | id of the attachment to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete_issue_comment_attachment - -> issue_delete_issue_comment_attachment(owner, repo, id, attachment_id) -Delete a comment attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the comment | [required] | -**attachment_id** | **i64** | id of the attachment to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete_issue_reaction - -> issue_delete_issue_reaction(owner, repo, index, content) -Remove a reaction from an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**content** | Option<[**EditReactionOption**](EditReactionOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete_label - -> issue_delete_label(owner, repo, id) -Delete a label - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the label to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete_milestone - -> issue_delete_milestone(owner, repo, id) -Delete a milestone - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | the milestone to delete, identified by ID and if not available by name | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete_stop_watch - -> issue_delete_stop_watch(owner, repo, index) -Delete an issue's existing stopwatch. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue to stop the stopwatch on | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete_subscription - -> issue_delete_subscription(owner, repo, index, user) -Unsubscribe user from issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**user** | **String** | user witch unsubscribe | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_delete_time - -> issue_delete_time(owner, repo, index, id) -Delete specific tracked time - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**id** | **i64** | id of time to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_edit_comment - -> models::Comment issue_edit_comment(owner, repo, id, body) -Edit a comment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the comment to edit | [required] | -**body** | Option<[**EditIssueCommentOption**](EditIssueCommentOption.md)> | | | - -### Return type - -[**models::Comment**](Comment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_edit_comment_deprecated - -> models::Comment issue_edit_comment_deprecated(owner, repo, index, id, body) -Edit a comment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i32** | this parameter is ignored | [required] | -**id** | **i64** | id of the comment to edit | [required] | -**body** | Option<[**EditIssueCommentOption**](EditIssueCommentOption.md)> | | | - -### Return type - -[**models::Comment**](Comment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_edit_issue - -> models::Issue issue_edit_issue(owner, repo, index, body) -Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue to edit | [required] | -**body** | Option<[**EditIssueOption**](EditIssueOption.md)> | | | - -### Return type - -[**models::Issue**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_edit_issue_attachment - -> models::Attachment issue_edit_issue_attachment(owner, repo, index, attachment_id, body) -Edit an issue attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**attachment_id** | **i64** | id of the attachment to edit | [required] | -**body** | Option<[**EditAttachmentOptions**](EditAttachmentOptions.md)> | | | - -### Return type - -[**models::Attachment**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_edit_issue_comment_attachment - -> models::Attachment issue_edit_issue_comment_attachment(owner, repo, id, attachment_id, body) -Edit a comment attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the comment | [required] | -**attachment_id** | **i64** | id of the attachment to edit | [required] | -**body** | Option<[**EditAttachmentOptions**](EditAttachmentOptions.md)> | | | - -### Return type - -[**models::Attachment**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_edit_issue_deadline - -> models::IssueDeadline issue_edit_issue_deadline(owner, repo, index, body) -Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue to create or update a deadline on | [required] | -**body** | Option<[**EditDeadlineOption**](EditDeadlineOption.md)> | | | - -### Return type - -[**models::IssueDeadline**](IssueDeadline.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_edit_label - -> models::Label issue_edit_label(owner, repo, id, body) -Update a label - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the label to edit | [required] | -**body** | Option<[**EditLabelOption**](EditLabelOption.md)> | | | - -### Return type - -[**models::Label**](Label.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_edit_milestone - -> models::Milestone issue_edit_milestone(owner, repo, id, body) -Update a milestone - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | the milestone to edit, identified by ID and if not available by name | [required] | -**body** | Option<[**EditMilestoneOption**](EditMilestoneOption.md)> | | | - -### Return type - -[**models::Milestone**](Milestone.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_comment - -> models::Comment issue_get_comment(owner, repo, id) -Get a comment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the comment | [required] | - -### Return type - -[**models::Comment**](Comment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_comment_reactions - -> Vec issue_get_comment_reactions(owner, repo, id) -Get a list of reactions from a comment of an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the comment to edit | [required] | - -### Return type - -[**Vec**](Reaction.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_comments - -> Vec issue_get_comments(owner, repo, index, since, before) -List all comments on an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**since** | Option<**String**> | if provided, only comments updated since the specified time are returned. | | -**before** | Option<**String**> | if provided, only comments updated before the provided time are returned. | | - -### Return type - -[**Vec**](Comment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_comments_and_timeline - -> Vec issue_get_comments_and_timeline(owner, repo, index, since, page, limit, before) -List all comments and events on an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**since** | Option<**String**> | if provided, only comments updated since the specified time are returned. | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | -**before** | Option<**String**> | if provided, only comments updated before the provided time are returned. | | - -### Return type - -[**Vec**](TimelineComment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_issue - -> models::Issue issue_get_issue(owner, repo, index) -Get an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue to get | [required] | - -### Return type - -[**models::Issue**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_issue_attachment - -> models::Attachment issue_get_issue_attachment(owner, repo, index, attachment_id) -Get an issue attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**attachment_id** | **i64** | id of the attachment to get | [required] | - -### Return type - -[**models::Attachment**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_issue_comment_attachment - -> models::Attachment issue_get_issue_comment_attachment(owner, repo, id, attachment_id) -Get a comment attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the comment | [required] | -**attachment_id** | **i64** | id of the attachment to get | [required] | - -### Return type - -[**models::Attachment**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_issue_reactions - -> Vec issue_get_issue_reactions(owner, repo, index, page, limit) -Get a list reactions of an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Reaction.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_label - -> models::Label issue_get_label(owner, repo, id) -Get a single label - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the label to get | [required] | - -### Return type - -[**models::Label**](Label.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_labels - -> Vec issue_get_labels(owner, repo, index) -Get an issue's labels - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | - -### Return type - -[**Vec**](Label.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_milestone - -> models::Milestone issue_get_milestone(owner, repo, id) -Get a milestone - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | the milestone to get, identified by ID and if not available by name | [required] | - -### Return type - -[**models::Milestone**](Milestone.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_milestones_list - -> Vec issue_get_milestones_list(owner, repo, state, name, page, limit) -Get all of a repository's opened milestones - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**state** | Option<**String**> | Milestone state, Recognized values are open, closed and all. Defaults to \"open\" | | -**name** | Option<**String**> | filter by milestone name | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Milestone.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_get_repo_comments - -> Vec issue_get_repo_comments(owner, repo, since, before, page, limit) -List all comments in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**since** | Option<**String**> | if provided, only comments updated since the provided time are returned. | | -**before** | Option<**String**> | if provided, only comments updated before the provided time are returned. | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Comment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_list_blocks - -> Vec issue_list_blocks(owner, repo, index, page, limit) -List issues that are blocked by this issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_list_issue_attachments - -> Vec issue_list_issue_attachments(owner, repo, index) -List issue's attachments - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | - -### Return type - -[**Vec**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_list_issue_comment_attachments - -> Vec issue_list_issue_comment_attachments(owner, repo, id) -List comment's attachments - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the comment | [required] | - -### Return type - -[**Vec**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_list_issue_dependencies - -> Vec issue_list_issue_dependencies(owner, repo, index, page, limit) -List an issue's dependencies, i.e all issues that block this issue. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_list_issues - -> Vec issue_list_issues(owner, repo, state, labels, q, r#type, milestones, since, before, created_by, assigned_by, mentioned_by, page, limit, sort) -List a repository's issues - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**state** | Option<**String**> | whether issue is open or closed | | -**labels** | Option<**String**> | comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded | | -**q** | Option<**String**> | search string | | -**r#type** | Option<**String**> | filter by type (issues / pulls) if set | | -**milestones** | Option<**String**> | 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 | | -**since** | Option<**String**> | Only show items updated after the given time. This is a timestamp in RFC 3339 format | | -**before** | Option<**String**> | Only show items updated before the given time. This is a timestamp in RFC 3339 format | | -**created_by** | Option<**String**> | Only show items which were created by the given user | | -**assigned_by** | Option<**String**> | Only show items for which the given user is assigned | | -**mentioned_by** | Option<**String**> | Only show items in which the given user was mentioned | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | -**sort** | Option<**String**> | Type of sort | |[default to latest] - -### Return type - -[**Vec**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_list_labels - -> Vec issue_list_labels(owner, repo, sort, page, limit) -Get all of a repository's labels - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sort** | Option<**String**> | Specifies the sorting method: mostissues, leastissues, or reversealphabetically. | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Label.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_post_comment_reaction - -> models::Reaction issue_post_comment_reaction(owner, repo, id, content) -Add a reaction to a comment of an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the comment to edit | [required] | -**content** | Option<[**EditReactionOption**](EditReactionOption.md)> | | | - -### Return type - -[**models::Reaction**](Reaction.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_post_issue_reaction - -> models::Reaction issue_post_issue_reaction(owner, repo, index, content) -Add a reaction to an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**content** | Option<[**EditReactionOption**](EditReactionOption.md)> | | | - -### Return type - -[**models::Reaction**](Reaction.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_remove_issue_blocking - -> models::Issue issue_remove_issue_blocking(owner, repo, index, body) -Unblock the issue given in the body by the issue in path - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**body** | Option<[**IssueMeta**](IssueMeta.md)> | | | - -### Return type - -[**models::Issue**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_remove_issue_dependencies - -> models::Issue issue_remove_issue_dependencies(owner, repo, index, body) -Remove an issue dependency - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**body** | Option<[**IssueMeta**](IssueMeta.md)> | | | - -### Return type - -[**models::Issue**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_remove_label - -> issue_remove_label(owner, repo, index, identifier, body) -Remove a label from an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**identifier** | **String** | name or id of the label to remove | [required] | -**body** | Option<[**DeleteLabelsOption**](DeleteLabelsOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_replace_labels - -> Vec issue_replace_labels(owner, repo, index, body) -Replace an issue's labels - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**body** | Option<[**IssueLabelsOption**](IssueLabelsOption.md)> | | | - -### Return type - -[**Vec**](Label.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_reset_time - -> issue_reset_time(owner, repo, index) -Reset a tracked time of an issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue to add tracked time to | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_search_issues - -> Vec issue_search_issues(state, labels, milestones, q, priority_repo_id, r#type, since, before, assigned, created, mentioned, review_requested, reviewed, owner, team, page, limit, sort) -Search for issues across the repositories that the user has access to - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**state** | Option<**String**> | State of the issue | |[default to open] -**labels** | Option<**String**> | Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded. | | -**milestones** | Option<**String**> | Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded. | | -**q** | Option<**String**> | Search string | | -**priority_repo_id** | Option<**i64**> | Repository ID to prioritize in the results | | -**r#type** | Option<**String**> | Filter by issue type | | -**since** | Option<**String**> | Only show issues updated after the given time (RFC 3339 format) | | -**before** | Option<**String**> | Only show issues updated before the given time (RFC 3339 format) | | -**assigned** | Option<**bool**> | Filter issues or pulls assigned to the authenticated user | |[default to false] -**created** | Option<**bool**> | Filter issues or pulls created by the authenticated user | |[default to false] -**mentioned** | Option<**bool**> | Filter issues or pulls mentioning the authenticated user | |[default to false] -**review_requested** | Option<**bool**> | Filter pull requests where the authenticated user's review was requested | |[default to false] -**reviewed** | Option<**bool**> | Filter pull requests reviewed by the authenticated user | |[default to false] -**owner** | Option<**String**> | Filter by repository owner | | -**team** | Option<**String**> | Filter by team (requires organization owner parameter) | | -**page** | Option<**i32**> | Page number of results to return (1-based) | |[default to 1] -**limit** | Option<**i32**> | Number of items per page | | -**sort** | Option<**String**> | Type of sort | |[default to latest] - -### Return type - -[**Vec**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_start_stop_watch - -> issue_start_stop_watch(owner, repo, index) -Start stopwatch on an issue. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue to create the stopwatch on | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_stop_stop_watch - -> issue_stop_stop_watch(owner, repo, index) -Stop an issue's existing stopwatch. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue to stop the stopwatch on | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_subscriptions - -> Vec issue_subscriptions(owner, repo, index, page, limit) -Get users who subscribed on an issue. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## issue_tracked_times - -> Vec issue_tracked_times(owner, repo, index, user, since, before, page, limit) -List an issue's tracked times - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the issue | [required] | -**user** | Option<**String**> | optional filter by user (available for issue managers) | | -**since** | Option<**String**> | Only show times updated after the given time. This is a timestamp in RFC 3339 format | | -**before** | Option<**String**> | Only show times updated before the given time. This is a timestamp in RFC 3339 format | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](TrackedTime.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## move_issue_pin - -> move_issue_pin(owner, repo, index, position) -Moves the Pin to the given Position - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of issue | [required] | -**position** | **i64** | the new position | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## pin_issue - -> pin_issue(owner, repo, index) -Pin an Issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of issue to pin | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## unpin_issue - -> unpin_issue(owner, repo, index) -Unpin an Issue - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of issue to unpin | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/forgejo-openapi/docs/IssueConfig.md b/forgejo-openapi/docs/IssueConfig.md deleted file mode 100644 index 46d0409..0000000 --- a/forgejo-openapi/docs/IssueConfig.md +++ /dev/null @@ -1,12 +0,0 @@ -# IssueConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**blank_issues_enabled** | Option<**bool**> | | [optional] -**contact_links** | Option<[**Vec**](IssueConfigContactLink.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/IssueConfigContactLink.md b/forgejo-openapi/docs/IssueConfigContactLink.md deleted file mode 100644 index 358e60f..0000000 --- a/forgejo-openapi/docs/IssueConfigContactLink.md +++ /dev/null @@ -1,13 +0,0 @@ -# IssueConfigContactLink - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**about** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/IssueConfigValidation.md b/forgejo-openapi/docs/IssueConfigValidation.md deleted file mode 100644 index 7156d30..0000000 --- a/forgejo-openapi/docs/IssueConfigValidation.md +++ /dev/null @@ -1,12 +0,0 @@ -# IssueConfigValidation - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] -**valid** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/IssueDeadline.md b/forgejo-openapi/docs/IssueDeadline.md deleted file mode 100644 index 94c4d91..0000000 --- a/forgejo-openapi/docs/IssueDeadline.md +++ /dev/null @@ -1,11 +0,0 @@ -# IssueDeadline - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**due_date** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/IssueFormField.md b/forgejo-openapi/docs/IssueFormField.md deleted file mode 100644 index 14da9ac..0000000 --- a/forgejo-openapi/docs/IssueFormField.md +++ /dev/null @@ -1,15 +0,0 @@ -# IssueFormField - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributes** | Option<**std::collections::HashMap**> | | [optional] -**id** | Option<**String**> | | [optional] -**r#type** | Option<**String**> | | [optional] -**validations** | Option<**std::collections::HashMap**> | | [optional] -**visible** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/IssueLabelsOption.md b/forgejo-openapi/docs/IssueLabelsOption.md deleted file mode 100644 index 682fa54..0000000 --- a/forgejo-openapi/docs/IssueLabelsOption.md +++ /dev/null @@ -1,12 +0,0 @@ -# IssueLabelsOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**labels** | Option<**Vec**> | Labels can be a list of integers representing label IDs or a list of strings representing label names | [optional] -**updated_at** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/IssueMeta.md b/forgejo-openapi/docs/IssueMeta.md deleted file mode 100644 index a5000bc..0000000 --- a/forgejo-openapi/docs/IssueMeta.md +++ /dev/null @@ -1,13 +0,0 @@ -# IssueMeta - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**index** | Option<**i64**> | | [optional] -**owner** | Option<**String**> | | [optional] -**repo** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/IssueTemplate.md b/forgejo-openapi/docs/IssueTemplate.md deleted file mode 100644 index 34679d6..0000000 --- a/forgejo-openapi/docs/IssueTemplate.md +++ /dev/null @@ -1,18 +0,0 @@ -# IssueTemplate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**about** | Option<**String**> | | [optional] -**body** | Option<[**Vec**](IssueFormField.md)> | | [optional] -**content** | Option<**String**> | | [optional] -**file_name** | Option<**String**> | | [optional] -**labels** | Option<**Vec**> | | [optional] -**name** | Option<**String**> | | [optional] -**r#ref** | Option<**String**> | | [optional] -**title** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Label.md b/forgejo-openapi/docs/Label.md deleted file mode 100644 index a018dbb..0000000 --- a/forgejo-openapi/docs/Label.md +++ /dev/null @@ -1,17 +0,0 @@ -# Label - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**color** | Option<**String**> | | [optional] -**description** | Option<**String**> | | [optional] -**exclusive** | Option<**bool**> | | [optional] -**id** | Option<**i64**> | | [optional] -**is_archived** | Option<**bool**> | | [optional] -**name** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/LabelTemplate.md b/forgejo-openapi/docs/LabelTemplate.md deleted file mode 100644 index d0ded8d..0000000 --- a/forgejo-openapi/docs/LabelTemplate.md +++ /dev/null @@ -1,14 +0,0 @@ -# LabelTemplate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**color** | Option<**String**> | | [optional] -**description** | Option<**String**> | | [optional] -**exclusive** | Option<**bool**> | | [optional] -**name** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/LicenseTemplateInfo.md b/forgejo-openapi/docs/LicenseTemplateInfo.md deleted file mode 100644 index 832dc8c..0000000 --- a/forgejo-openapi/docs/LicenseTemplateInfo.md +++ /dev/null @@ -1,15 +0,0 @@ -# LicenseTemplateInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | Option<**String**> | | [optional] -**implementation** | Option<**String**> | | [optional] -**key** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/LicensesTemplateListEntry.md b/forgejo-openapi/docs/LicensesTemplateListEntry.md deleted file mode 100644 index 0a1a61a..0000000 --- a/forgejo-openapi/docs/LicensesTemplateListEntry.md +++ /dev/null @@ -1,13 +0,0 @@ -# LicensesTemplateListEntry - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ListActionRunResponse.md b/forgejo-openapi/docs/ListActionRunResponse.md deleted file mode 100644 index b2b2760..0000000 --- a/forgejo-openapi/docs/ListActionRunResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListActionRunResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total_count** | Option<**i64**> | | [optional] -**workflow_runs** | Option<[**Vec**](ActionRun.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/MarkdownOption.md b/forgejo-openapi/docs/MarkdownOption.md deleted file mode 100644 index 33f0218..0000000 --- a/forgejo-openapi/docs/MarkdownOption.md +++ /dev/null @@ -1,14 +0,0 @@ -# MarkdownOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context** | Option<**String**> | Context to render in: body | [optional] -**mode** | Option<**String**> | Mode to render (comment, gfm, markdown) in: body | [optional] -**text** | Option<**String**> | Text markdown to render in: body | [optional] -**wiki** | Option<**bool**> | Is it a wiki page ? in: body | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/MarkupOption.md b/forgejo-openapi/docs/MarkupOption.md deleted file mode 100644 index ac15ef0..0000000 --- a/forgejo-openapi/docs/MarkupOption.md +++ /dev/null @@ -1,16 +0,0 @@ -# MarkupOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**branch_path** | Option<**String**> | The current branch path where the form gets posted in: body | [optional] -**context** | Option<**String**> | Context to render in: body | [optional] -**file_path** | Option<**String**> | File path for detecting extension in file mode in: body | [optional] -**mode** | Option<**String**> | Mode to render (comment, gfm, markdown, file) in: body | [optional] -**text** | Option<**String**> | Text markup to render in: body | [optional] -**wiki** | Option<**bool**> | Is it a wiki page ? in: body | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/MergePullRequestOption.md b/forgejo-openapi/docs/MergePullRequestOption.md deleted file mode 100644 index 1755f6b..0000000 --- a/forgejo-openapi/docs/MergePullRequestOption.md +++ /dev/null @@ -1,18 +0,0 @@ -# MergePullRequestOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**r#do** | **Do** | (enum: merge, rebase, rebase-merge, squash, fast-forward-only, manually-merged) | -**merge_commit_id** | Option<**String**> | | [optional] -**merge_message_field** | Option<**String**> | | [optional] -**merge_title_field** | Option<**String**> | | [optional] -**delete_branch_after_merge** | Option<**bool**> | | [optional] -**force_merge** | Option<**bool**> | | [optional] -**head_commit_id** | Option<**String**> | | [optional] -**merge_when_checks_succeed** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/MigrateRepoOptions.md b/forgejo-openapi/docs/MigrateRepoOptions.md deleted file mode 100644 index a6e38fa..0000000 --- a/forgejo-openapi/docs/MigrateRepoOptions.md +++ /dev/null @@ -1,30 +0,0 @@ -# MigrateRepoOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auth_password** | Option<**String**> | | [optional] -**auth_token** | Option<**String**> | | [optional] -**auth_username** | Option<**String**> | | [optional] -**clone_addr** | **String** | | -**description** | Option<**String**> | | [optional] -**issues** | Option<**bool**> | | [optional] -**labels** | Option<**bool**> | | [optional] -**lfs** | Option<**bool**> | | [optional] -**lfs_endpoint** | Option<**String**> | | [optional] -**milestones** | Option<**bool**> | | [optional] -**mirror** | Option<**bool**> | | [optional] -**mirror_interval** | Option<**String**> | | [optional] -**private** | Option<**bool**> | | [optional] -**pull_requests** | Option<**bool**> | | [optional] -**releases** | Option<**bool**> | | [optional] -**repo_name** | **String** | | -**repo_owner** | Option<**String**> | Name of User or Organisation who will own Repo after migration | [optional] -**service** | Option<**Service**> | (enum: git, github, gitea, gitlab, gogs, onedev, gitbucket, codebase) | [optional] -**uid** | Option<**i64**> | deprecated (only for backwards compatibility) | [optional] -**wiki** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Milestone.md b/forgejo-openapi/docs/Milestone.md deleted file mode 100644 index c92f404..0000000 --- a/forgejo-openapi/docs/Milestone.md +++ /dev/null @@ -1,20 +0,0 @@ -# Milestone - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**closed_at** | Option<**String**> | | [optional] -**closed_issues** | Option<**i64**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**description** | Option<**String**> | | [optional] -**due_on** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**open_issues** | Option<**i64**> | | [optional] -**state** | Option<**String**> | StateType issue state type | [optional] -**title** | Option<**String**> | | [optional] -**updated_at** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/MiscellaneousApi.md b/forgejo-openapi/docs/MiscellaneousApi.md deleted file mode 100644 index daf3d21..0000000 --- a/forgejo-openapi/docs/MiscellaneousApi.md +++ /dev/null @@ -1,364 +0,0 @@ -# \MiscellaneousApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_gitignore_template_info**](MiscellaneousApi.md#get_gitignore_template_info) | **GET** /gitignore/templates/{name} | Returns information about a gitignore template -[**get_label_template_info**](MiscellaneousApi.md#get_label_template_info) | **GET** /label/templates/{name} | Returns all labels in a template -[**get_license_template_info**](MiscellaneousApi.md#get_license_template_info) | **GET** /licenses/{name} | Returns information about a license template -[**get_node_info**](MiscellaneousApi.md#get_node_info) | **GET** /nodeinfo | Returns the nodeinfo of the Forgejo application -[**get_signing_key**](MiscellaneousApi.md#get_signing_key) | **GET** /signing-key.gpg | Get default signing-key.gpg -[**get_ssh_signing_key**](MiscellaneousApi.md#get_ssh_signing_key) | **GET** /signing-key.ssh | Get default signing-key.ssh -[**get_version**](MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the running application -[**list_gitignores_templates**](MiscellaneousApi.md#list_gitignores_templates) | **GET** /gitignore/templates | Returns a list of all gitignore templates -[**list_label_templates**](MiscellaneousApi.md#list_label_templates) | **GET** /label/templates | Returns a list of all label templates -[**list_license_templates**](MiscellaneousApi.md#list_license_templates) | **GET** /licenses | Returns a list of all license templates -[**render_markdown**](MiscellaneousApi.md#render_markdown) | **POST** /markdown | Render a markdown document as HTML -[**render_markdown_raw**](MiscellaneousApi.md#render_markdown_raw) | **POST** /markdown/raw | Render raw markdown as HTML -[**render_markup**](MiscellaneousApi.md#render_markup) | **POST** /markup | Render a markup document as HTML - - - -## get_gitignore_template_info - -> models::GitignoreTemplateInfo get_gitignore_template_info(name) -Returns information about a gitignore template - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**name** | **String** | name of the template | [required] | - -### Return type - -[**models::GitignoreTemplateInfo**](GitignoreTemplateInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_label_template_info - -> Vec get_label_template_info(name) -Returns all labels in a template - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**name** | **String** | name of the template | [required] | - -### Return type - -[**Vec**](LabelTemplate.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_license_template_info - -> models::LicenseTemplateInfo get_license_template_info(name) -Returns information about a license template - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**name** | **String** | name of the license | [required] | - -### Return type - -[**models::LicenseTemplateInfo**](LicenseTemplateInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_node_info - -> models::NodeInfo get_node_info() -Returns the nodeinfo of the Forgejo application - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::NodeInfo**](NodeInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_signing_key - -> String get_signing_key() -Get default signing-key.gpg - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**String** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/plain - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_ssh_signing_key - -> String get_ssh_signing_key() -Get default signing-key.ssh - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**String** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/plain - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_version - -> models::ServerVersion get_version() -Returns the version of the running application - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::ServerVersion**](ServerVersion.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## list_gitignores_templates - -> Vec list_gitignores_templates() -Returns a list of all gitignore templates - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**Vec** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## list_label_templates - -> Vec list_label_templates() -Returns a list of all label templates - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**Vec** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## list_license_templates - -> Vec list_license_templates() -Returns a list of all license templates - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Vec**](LicensesTemplateListEntry.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## render_markdown - -> String render_markdown(body) -Render a markdown document as HTML - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**MarkdownOption**](MarkdownOption.md)> | | | - -### Return type - -**String** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## render_markdown_raw - -> String render_markdown_raw(body) -Render raw markdown as HTML - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | **String** | Request body to render | [required] | - -### Return type - -**String** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: text/plain -- **Accept**: text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## render_markup - -> String render_markup(body) -Render a markup document as HTML - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**MarkupOption**](MarkupOption.md)> | | | - -### Return type - -**String** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/forgejo-openapi/docs/NewIssuePinsAllowed.md b/forgejo-openapi/docs/NewIssuePinsAllowed.md deleted file mode 100644 index 5145e76..0000000 --- a/forgejo-openapi/docs/NewIssuePinsAllowed.md +++ /dev/null @@ -1,12 +0,0 @@ -# NewIssuePinsAllowed - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**issues** | Option<**bool**> | | [optional] -**pull_requests** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/NodeInfo.md b/forgejo-openapi/docs/NodeInfo.md deleted file mode 100644 index b86967f..0000000 --- a/forgejo-openapi/docs/NodeInfo.md +++ /dev/null @@ -1,17 +0,0 @@ -# NodeInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**metadata** | Option<**serde_json::Value**> | | [optional] -**open_registrations** | Option<**bool**> | | [optional] -**protocols** | Option<**Vec**> | | [optional] -**services** | Option<[**models::NodeInfoServices**](NodeInfoServices.md)> | | [optional] -**software** | Option<[**models::NodeInfoSoftware**](NodeInfoSoftware.md)> | | [optional] -**usage** | Option<[**models::NodeInfoUsage**](NodeInfoUsage.md)> | | [optional] -**version** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/NodeInfoServices.md b/forgejo-openapi/docs/NodeInfoServices.md deleted file mode 100644 index 1cde335..0000000 --- a/forgejo-openapi/docs/NodeInfoServices.md +++ /dev/null @@ -1,12 +0,0 @@ -# NodeInfoServices - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**inbound** | Option<**Vec**> | | [optional] -**outbound** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/NodeInfoSoftware.md b/forgejo-openapi/docs/NodeInfoSoftware.md deleted file mode 100644 index 0660bf8..0000000 --- a/forgejo-openapi/docs/NodeInfoSoftware.md +++ /dev/null @@ -1,14 +0,0 @@ -# NodeInfoSoftware - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**homepage** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**repository** | Option<**String**> | | [optional] -**version** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/NodeInfoUsage.md b/forgejo-openapi/docs/NodeInfoUsage.md deleted file mode 100644 index a4246f7..0000000 --- a/forgejo-openapi/docs/NodeInfoUsage.md +++ /dev/null @@ -1,13 +0,0 @@ -# NodeInfoUsage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**local_comments** | Option<**i64**> | | [optional] -**local_posts** | Option<**i64**> | | [optional] -**users** | Option<[**models::NodeInfoUsageUsers**](NodeInfoUsageUsers.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/NodeInfoUsageUsers.md b/forgejo-openapi/docs/NodeInfoUsageUsers.md deleted file mode 100644 index ee1808b..0000000 --- a/forgejo-openapi/docs/NodeInfoUsageUsers.md +++ /dev/null @@ -1,13 +0,0 @@ -# NodeInfoUsageUsers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active_halfyear** | Option<**i64**> | | [optional] -**active_month** | Option<**i64**> | | [optional] -**total** | Option<**i64**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Note.md b/forgejo-openapi/docs/Note.md deleted file mode 100644 index f32f313..0000000 --- a/forgejo-openapi/docs/Note.md +++ /dev/null @@ -1,12 +0,0 @@ -# Note - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commit** | Option<[**models::Commit**](Commit.md)> | | [optional] -**message** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/NoteOptions.md b/forgejo-openapi/docs/NoteOptions.md deleted file mode 100644 index 65bfc39..0000000 --- a/forgejo-openapi/docs/NoteOptions.md +++ /dev/null @@ -1,11 +0,0 @@ -# NoteOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/NotificationApi.md b/forgejo-openapi/docs/NotificationApi.md deleted file mode 100644 index 3dd9c3e..0000000 --- a/forgejo-openapi/docs/NotificationApi.md +++ /dev/null @@ -1,231 +0,0 @@ -# \NotificationApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**notify_get_list**](NotificationApi.md#notify_get_list) | **GET** /notifications | List users's notification threads -[**notify_get_repo_list**](NotificationApi.md#notify_get_repo_list) | **GET** /repos/{owner}/{repo}/notifications | List users's notification threads on a specific repo -[**notify_get_thread**](NotificationApi.md#notify_get_thread) | **GET** /notifications/threads/{id} | Get notification thread by ID -[**notify_new_available**](NotificationApi.md#notify_new_available) | **GET** /notifications/new | Check if unread notifications exist -[**notify_read_list**](NotificationApi.md#notify_read_list) | **PUT** /notifications | Mark notification threads as read, pinned or unread -[**notify_read_repo_list**](NotificationApi.md#notify_read_repo_list) | **PUT** /repos/{owner}/{repo}/notifications | Mark notification threads as read, pinned or unread on a specific repo -[**notify_read_thread**](NotificationApi.md#notify_read_thread) | **PATCH** /notifications/threads/{id} | Mark notification thread as read by ID - - - -## notify_get_list - -> Vec notify_get_list(all, status_types, subject_type, since, before, page, limit) -List users's notification threads - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**all** | Option<**bool**> | If true, show notifications marked as read. Default value is false | | -**status_types** | Option<[**Vec**](String.md)> | Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. | | -**subject_type** | Option<[**Vec**](String.md)> | filter notifications by subject type | | -**since** | Option<**String**> | Only show notifications updated after the given time. This is a timestamp in RFC 3339 format | | -**before** | Option<**String**> | Only show notifications updated before the given time. This is a timestamp in RFC 3339 format | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](NotificationThread.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## notify_get_repo_list - -> Vec notify_get_repo_list(owner, repo, all, status_types, subject_type, since, before, page, limit) -List users's notification threads on a specific repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**all** | Option<**bool**> | If true, show notifications marked as read. Default value is false | | -**status_types** | Option<[**Vec**](String.md)> | Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned | | -**subject_type** | Option<[**Vec**](String.md)> | filter notifications by subject type | | -**since** | Option<**String**> | Only show notifications updated after the given time. This is a timestamp in RFC 3339 format | | -**before** | Option<**String**> | Only show notifications updated before the given time. This is a timestamp in RFC 3339 format | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](NotificationThread.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## notify_get_thread - -> models::NotificationThread notify_get_thread(id) -Get notification thread by ID - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of notification thread | [required] | - -### Return type - -[**models::NotificationThread**](NotificationThread.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## notify_new_available - -> models::NotificationCount notify_new_available() -Check if unread notifications exist - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::NotificationCount**](NotificationCount.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## notify_read_list - -> Vec notify_read_list(last_read_at, all, status_types, to_status) -Mark notification threads as read, pinned or unread - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**last_read_at** | Option<**String**> | Describes the last point that notifications were checked. Anything updated since this time will not be updated. | | -**all** | Option<**bool**> | If true, mark all notifications on this repo. Default value is false | | -**status_types** | Option<[**Vec**](String.md)> | Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. | | -**to_status** | Option<**String**> | Status to mark notifications as, Defaults to read. | | - -### Return type - -[**Vec**](NotificationThread.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## notify_read_repo_list - -> Vec notify_read_repo_list(owner, repo, all, status_types, to_status, last_read_at) -Mark notification threads as read, pinned or unread on a specific repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**all** | Option<**bool**> | If true, mark all notifications on this repo. Default value is false | | -**status_types** | Option<[**Vec**](String.md)> | Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. | | -**to_status** | Option<**String**> | Status to mark notifications as. Defaults to read. | | -**last_read_at** | Option<**String**> | Describes the last point that notifications were checked. Anything updated since this time will not be updated. | | - -### Return type - -[**Vec**](NotificationThread.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## notify_read_thread - -> models::NotificationThread notify_read_thread(id, to_status) -Mark notification thread as read by ID - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of notification thread | [required] | -**to_status** | Option<**String**> | Status to mark notifications as | |[default to read] - -### Return type - -[**models::NotificationThread**](NotificationThread.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/forgejo-openapi/docs/NotificationCount.md b/forgejo-openapi/docs/NotificationCount.md deleted file mode 100644 index 0c76de0..0000000 --- a/forgejo-openapi/docs/NotificationCount.md +++ /dev/null @@ -1,11 +0,0 @@ -# NotificationCount - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**new** | Option<**i64**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/NotificationSubject.md b/forgejo-openapi/docs/NotificationSubject.md deleted file mode 100644 index 8a28c83..0000000 --- a/forgejo-openapi/docs/NotificationSubject.md +++ /dev/null @@ -1,17 +0,0 @@ -# NotificationSubject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**html_url** | Option<**String**> | | [optional] -**latest_comment_html_url** | Option<**String**> | | [optional] -**latest_comment_url** | Option<**String**> | | [optional] -**state** | Option<**String**> | StateType issue state type | [optional] -**title** | Option<**String**> | | [optional] -**r#type** | Option<**String**> | NotifySubjectType represent type of notification subject | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/NotificationThread.md b/forgejo-openapi/docs/NotificationThread.md deleted file mode 100644 index a67580f..0000000 --- a/forgejo-openapi/docs/NotificationThread.md +++ /dev/null @@ -1,17 +0,0 @@ -# NotificationThread - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | Option<**i64**> | | [optional] -**pinned** | Option<**bool**> | | [optional] -**repository** | Option<[**models::Repository**](Repository.md)> | | [optional] -**subject** | Option<[**models::NotificationSubject**](NotificationSubject.md)> | | [optional] -**unread** | Option<**bool**> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/OAuth2Application.md b/forgejo-openapi/docs/OAuth2Application.md deleted file mode 100644 index 19e3cbb..0000000 --- a/forgejo-openapi/docs/OAuth2Application.md +++ /dev/null @@ -1,17 +0,0 @@ -# OAuth2Application - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_id** | Option<**String**> | | [optional] -**client_secret** | Option<**String**> | | [optional] -**confidential_client** | Option<**bool**> | | [optional] -**created** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**name** | Option<**String**> | | [optional] -**redirect_uris** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Organization.md b/forgejo-openapi/docs/Organization.md deleted file mode 100644 index 5ca228b..0000000 --- a/forgejo-openapi/docs/Organization.md +++ /dev/null @@ -1,21 +0,0 @@ -# Organization - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**avatar_url** | Option<**String**> | | [optional] -**description** | Option<**String**> | | [optional] -**email** | Option<**String**> | | [optional] -**full_name** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**location** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**repo_admin_change_team_access** | Option<**bool**> | | [optional] -**username** | Option<**String**> | deprecated | [optional] -**visibility** | Option<**String**> | | [optional] -**website** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/OrganizationApi.md b/forgejo-openapi/docs/OrganizationApi.md deleted file mode 100644 index 0de0344..0000000 --- a/forgejo-openapi/docs/OrganizationApi.md +++ /dev/null @@ -1,1983 +0,0 @@ -# \OrganizationApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_org_repo**](OrganizationApi.md#create_org_repo) | **POST** /orgs/{org}/repos | Create a repository in an organization -[**create_org_repo_deprecated**](OrganizationApi.md#create_org_repo_deprecated) | **POST** /org/{org}/repos | Create a repository in an organization -[**create_org_variable**](OrganizationApi.md#create_org_variable) | **POST** /orgs/{org}/actions/variables/{variablename} | Create a new variable in organization -[**delete_org_secret**](OrganizationApi.md#delete_org_secret) | **DELETE** /orgs/{org}/actions/secrets/{secretname} | Delete a secret in an organization -[**delete_org_variable**](OrganizationApi.md#delete_org_variable) | **DELETE** /orgs/{org}/actions/variables/{variablename} | Delete organization's variable by name -[**get_org_variable**](OrganizationApi.md#get_org_variable) | **GET** /orgs/{org}/actions/variables/{variablename} | Get organization's variable by name -[**get_org_variables_list**](OrganizationApi.md#get_org_variables_list) | **GET** /orgs/{org}/actions/variables | List variables of an organization -[**org_add_team_member**](OrganizationApi.md#org_add_team_member) | **PUT** /teams/{id}/members/{username} | Add a team member -[**org_add_team_repository**](OrganizationApi.md#org_add_team_repository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team -[**org_block_user**](OrganizationApi.md#org_block_user) | **PUT** /orgs/{org}/block/{username} | Blocks a user from the organization -[**org_check_quota**](OrganizationApi.md#org_check_quota) | **GET** /orgs/{org}/quota/check | Check if the organization is over quota for a given subject -[**org_conceal_member**](OrganizationApi.md#org_conceal_member) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership -[**org_create**](OrganizationApi.md#org_create) | **POST** /orgs | Create an organization -[**org_create_hook**](OrganizationApi.md#org_create_hook) | **POST** /orgs/{org}/hooks | Create a hook -[**org_create_label**](OrganizationApi.md#org_create_label) | **POST** /orgs/{org}/labels | Create a label for an organization -[**org_create_team**](OrganizationApi.md#org_create_team) | **POST** /orgs/{org}/teams | Create a team -[**org_delete**](OrganizationApi.md#org_delete) | **DELETE** /orgs/{org} | Delete an organization -[**org_delete_avatar**](OrganizationApi.md#org_delete_avatar) | **DELETE** /orgs/{org}/avatar | Delete an organization's avatar. It will be replaced by a default one -[**org_delete_hook**](OrganizationApi.md#org_delete_hook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook -[**org_delete_label**](OrganizationApi.md#org_delete_label) | **DELETE** /orgs/{org}/labels/{id} | Delete a label -[**org_delete_member**](OrganizationApi.md#org_delete_member) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization -[**org_delete_team**](OrganizationApi.md#org_delete_team) | **DELETE** /teams/{id} | Delete a team -[**org_edit**](OrganizationApi.md#org_edit) | **PATCH** /orgs/{org} | Edit an organization -[**org_edit_hook**](OrganizationApi.md#org_edit_hook) | **PATCH** /orgs/{org}/hooks/{id} | Update a hook -[**org_edit_label**](OrganizationApi.md#org_edit_label) | **PATCH** /orgs/{org}/labels/{id} | Update a label -[**org_edit_team**](OrganizationApi.md#org_edit_team) | **PATCH** /teams/{id} | Edit a team -[**org_get**](OrganizationApi.md#org_get) | **GET** /orgs/{org} | Get an organization -[**org_get_all**](OrganizationApi.md#org_get_all) | **GET** /orgs | List all organizations -[**org_get_hook**](OrganizationApi.md#org_get_hook) | **GET** /orgs/{org}/hooks/{id} | Get a hook -[**org_get_label**](OrganizationApi.md#org_get_label) | **GET** /orgs/{org}/labels/{id} | Get a single label -[**org_get_quota**](OrganizationApi.md#org_get_quota) | **GET** /orgs/{org}/quota | Get quota information for an organization -[**org_get_runner_registration_token**](OrganizationApi.md#org_get_runner_registration_token) | **GET** /orgs/{org}/actions/runners/registration-token | Get an organization's actions runner registration token -[**org_get_team**](OrganizationApi.md#org_get_team) | **GET** /teams/{id} | Get a team -[**org_get_user_permissions**](OrganizationApi.md#org_get_user_permissions) | **GET** /users/{username}/orgs/{org}/permissions | Get user permissions in organization -[**org_is_member**](OrganizationApi.md#org_is_member) | **GET** /orgs/{org}/members/{username} | Check if a user is a member of an organization -[**org_is_public_member**](OrganizationApi.md#org_is_public_member) | **GET** /orgs/{org}/public_members/{username} | Check if a user is a public member of an organization -[**org_list_actions_secrets**](OrganizationApi.md#org_list_actions_secrets) | **GET** /orgs/{org}/actions/secrets | List actions secrets of an organization -[**org_list_activity_feeds**](OrganizationApi.md#org_list_activity_feeds) | **GET** /orgs/{org}/activities/feeds | List an organization's activity feeds -[**org_list_blocked_users**](OrganizationApi.md#org_list_blocked_users) | **GET** /orgs/{org}/list_blocked | List the organization's blocked users -[**org_list_current_user_orgs**](OrganizationApi.md#org_list_current_user_orgs) | **GET** /user/orgs | List the current user's organizations -[**org_list_hooks**](OrganizationApi.md#org_list_hooks) | **GET** /orgs/{org}/hooks | List an organization's webhooks -[**org_list_labels**](OrganizationApi.md#org_list_labels) | **GET** /orgs/{org}/labels | List an organization's labels -[**org_list_members**](OrganizationApi.md#org_list_members) | **GET** /orgs/{org}/members | List an organization's members -[**org_list_public_members**](OrganizationApi.md#org_list_public_members) | **GET** /orgs/{org}/public_members | List an organization's public members -[**org_list_quota_artifacts**](OrganizationApi.md#org_list_quota_artifacts) | **GET** /orgs/{org}/quota/artifacts | List the artifacts affecting the organization's quota -[**org_list_quota_attachments**](OrganizationApi.md#org_list_quota_attachments) | **GET** /orgs/{org}/quota/attachments | List the attachments affecting the organization's quota -[**org_list_quota_packages**](OrganizationApi.md#org_list_quota_packages) | **GET** /orgs/{org}/quota/packages | List the packages affecting the organization's quota -[**org_list_repos**](OrganizationApi.md#org_list_repos) | **GET** /orgs/{org}/repos | List an organization's repos -[**org_list_team_activity_feeds**](OrganizationApi.md#org_list_team_activity_feeds) | **GET** /teams/{id}/activities/feeds | List a team's activity feeds -[**org_list_team_member**](OrganizationApi.md#org_list_team_member) | **GET** /teams/{id}/members/{username} | List a particular member of team -[**org_list_team_members**](OrganizationApi.md#org_list_team_members) | **GET** /teams/{id}/members | List a team's members -[**org_list_team_repo**](OrganizationApi.md#org_list_team_repo) | **GET** /teams/{id}/repos/{org}/{repo} | List a particular repo of team -[**org_list_team_repos**](OrganizationApi.md#org_list_team_repos) | **GET** /teams/{id}/repos | List a team's repos -[**org_list_teams**](OrganizationApi.md#org_list_teams) | **GET** /orgs/{org}/teams | List an organization's teams -[**org_list_user_orgs**](OrganizationApi.md#org_list_user_orgs) | **GET** /users/{username}/orgs | List a user's organizations -[**org_publicize_member**](OrganizationApi.md#org_publicize_member) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership -[**org_remove_team_member**](OrganizationApi.md#org_remove_team_member) | **DELETE** /teams/{id}/members/{username} | Remove a team member -[**org_remove_team_repository**](OrganizationApi.md#org_remove_team_repository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team -[**org_search_run_jobs**](OrganizationApi.md#org_search_run_jobs) | **GET** /orgs/{org}/actions/runners/jobs | Search for organization's action jobs according filter conditions -[**org_unblock_user**](OrganizationApi.md#org_unblock_user) | **PUT** /orgs/{org}/unblock/{username} | Unblock a user from the organization -[**org_update_avatar**](OrganizationApi.md#org_update_avatar) | **POST** /orgs/{org}/avatar | Update an organization's avatar -[**rename_org**](OrganizationApi.md#rename_org) | **POST** /orgs/{org}/rename | Rename an organization -[**team_search**](OrganizationApi.md#team_search) | **GET** /orgs/{org}/teams/search | Search for teams within an organization -[**update_org_secret**](OrganizationApi.md#update_org_secret) | **PUT** /orgs/{org}/actions/secrets/{secretname} | Create or Update a secret value in an organization -[**update_org_variable**](OrganizationApi.md#update_org_variable) | **PUT** /orgs/{org}/actions/variables/{variablename} | Update variable in organization - - - -## create_org_repo - -> models::Repository create_org_repo(org, body) -Create a repository in an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of organization | [required] | -**body** | Option<[**CreateRepoOption**](CreateRepoOption.md)> | | | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## create_org_repo_deprecated - -> models::Repository create_org_repo_deprecated(org, body) -Create a repository in an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of organization | [required] | -**body** | Option<[**CreateRepoOption**](CreateRepoOption.md)> | | | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## create_org_variable - -> create_org_variable(org, variablename, body) -Create a new variable in organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**variablename** | **String** | name of the variable | [required] | -**body** | Option<[**CreateVariableOption**](CreateVariableOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## delete_org_secret - -> delete_org_secret(org, secretname) -Delete a secret in an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of organization | [required] | -**secretname** | **String** | name of the secret | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## delete_org_variable - -> delete_org_variable(org, variablename) -Delete organization's variable by name - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**variablename** | **String** | name of the variable | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_org_variable - -> models::ActionVariable get_org_variable(org, variablename) -Get organization's variable by name - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**variablename** | **String** | name of the variable | [required] | - -### Return type - -[**models::ActionVariable**](ActionVariable.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_org_variables_list - -> Vec get_org_variables_list(org, page, limit) -List variables of an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](ActionVariable.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_add_team_member - -> org_add_team_member(id, username) -Add a team member - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team | [required] | -**username** | **String** | username of the user to add | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_add_team_repository - -> org_add_team_repository(id, org, repo) -Add a repository to a team - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team | [required] | -**org** | **String** | organization that owns the repo to add | [required] | -**repo** | **String** | name of the repo to add | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_block_user - -> org_block_user(org, username) -Blocks a user from the organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the org | [required] | -**username** | **String** | username of the user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_check_quota - -> bool org_check_quota(org, subject) -Check if the organization is over quota for a given subject - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**subject** | **String** | subject of the quota | [required] | - -### Return type - -**bool** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_conceal_member - -> org_conceal_member(org, username) -Conceal a user's membership - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**username** | **String** | username of the user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_create - -> models::Organization org_create(organization) -Create an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**organization** | [**CreateOrgOption**](CreateOrgOption.md) | | [required] | - -### Return type - -[**models::Organization**](Organization.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_create_hook - -> models::Hook org_create_hook(org, body) -Create a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**body** | [**CreateHookOption**](CreateHookOption.md) | | [required] | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_create_label - -> models::Label org_create_label(org, body) -Create a label for an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**body** | Option<[**CreateLabelOption**](CreateLabelOption.md)> | | | - -### Return type - -[**models::Label**](Label.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_create_team - -> models::Team org_create_team(org, body) -Create a team - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**body** | Option<[**CreateTeamOption**](CreateTeamOption.md)> | | | - -### Return type - -[**models::Team**](Team.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_delete - -> org_delete(org) -Delete an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | organization that is to be deleted | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_delete_avatar - -> org_delete_avatar(org) -Delete an organization's avatar. It will be replaced by a default one - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_delete_hook - -> org_delete_hook(org, id) -Delete a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**id** | **i64** | id of the hook to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_delete_label - -> org_delete_label(org, id) -Delete a label - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**id** | **i64** | id of the label to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_delete_member - -> org_delete_member(org, username) -Remove a member from an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**username** | **String** | username of the user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_delete_team - -> org_delete_team(id) -Delete a team - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_edit - -> models::Organization org_edit(org, body) -Edit an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization to edit | [required] | -**body** | [**EditOrgOption**](EditOrgOption.md) | | [required] | - -### Return type - -[**models::Organization**](Organization.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_edit_hook - -> models::Hook org_edit_hook(org, id, body) -Update a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**id** | **i64** | id of the hook to update | [required] | -**body** | Option<[**EditHookOption**](EditHookOption.md)> | | | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_edit_label - -> models::Label org_edit_label(org, id, body) -Update a label - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**id** | **i64** | id of the label to edit | [required] | -**body** | Option<[**EditLabelOption**](EditLabelOption.md)> | | | - -### Return type - -[**models::Label**](Label.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_edit_team - -> models::Team org_edit_team(id, body) -Edit a team - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team to edit | [required] | -**body** | Option<[**EditTeamOption**](EditTeamOption.md)> | | | - -### Return type - -[**models::Team**](Team.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_get - -> models::Organization org_get(org) -Get an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization to get | [required] | - -### Return type - -[**models::Organization**](Organization.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_get_all - -> Vec org_get_all(page, limit) -List all organizations - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Organization.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_get_hook - -> models::Hook org_get_hook(org, id) -Get a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**id** | **i64** | id of the hook to get | [required] | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_get_label - -> models::Label org_get_label(org, id) -Get a single label - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**id** | **i64** | id of the label to get | [required] | - -### Return type - -[**models::Label**](Label.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_get_quota - -> models::QuotaInfo org_get_quota(org) -Get quota information for an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | - -### Return type - -[**models::QuotaInfo**](QuotaInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_get_runner_registration_token - -> models::RegistrationToken org_get_runner_registration_token(org) -Get an organization's actions runner registration token - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | - -### Return type - -[**models::RegistrationToken**](RegistrationToken.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_get_team - -> models::Team org_get_team(id) -Get a team - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team to get | [required] | - -### Return type - -[**models::Team**](Team.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_get_user_permissions - -> models::OrganizationPermissions org_get_user_permissions(username, org) -Get user permissions in organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**org** | **String** | name of the organization | [required] | - -### Return type - -[**models::OrganizationPermissions**](OrganizationPermissions.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_is_member - -> org_is_member(org, username) -Check if a user is a member of an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**username** | **String** | username of the user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_is_public_member - -> org_is_public_member(org, username) -Check if a user is a public member of an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**username** | **String** | username of the user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_actions_secrets - -> Vec org_list_actions_secrets(org, page, limit) -List actions secrets of an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Secret.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_activity_feeds - -> Vec org_list_activity_feeds(org, date, page, limit) -List an organization's activity feeds - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the org | [required] | -**date** | Option<**String**> | the date of the activities to be found | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Activity.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_blocked_users - -> Vec org_list_blocked_users(org, page, limit) -List the organization's blocked users - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the org | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](BlockedUser.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_current_user_orgs - -> Vec org_list_current_user_orgs(page, limit) -List the current user's organizations - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Organization.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_hooks - -> Vec org_list_hooks(org, page, limit) -List an organization's webhooks - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_labels - -> Vec org_list_labels(org, sort, page, limit) -List an organization's labels - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**sort** | Option<**String**> | Specifies the sorting method: mostissues, leastissues, or reversealphabetically. | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Label.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_members - -> Vec org_list_members(org, page, limit) -List an organization's members - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_public_members - -> Vec org_list_public_members(org, page, limit) -List an organization's public members - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_quota_artifacts - -> Vec org_list_quota_artifacts(org, page, limit) -List the artifacts affecting the organization's quota - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](QuotaUsedArtifact.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_quota_attachments - -> Vec org_list_quota_attachments(org, page, limit) -List the attachments affecting the organization's quota - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](QuotaUsedAttachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_quota_packages - -> Vec org_list_quota_packages(org, page, limit) -List the packages affecting the organization's quota - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](QuotaUsedPackage.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_repos - -> Vec org_list_repos(org, page, limit) -List an organization's repos - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_team_activity_feeds - -> Vec org_list_team_activity_feeds(id, date, page, limit) -List a team's activity feeds - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team | [required] | -**date** | Option<**String**> | the date of the activities to be found | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Activity.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_team_member - -> models::User org_list_team_member(id, username) -List a particular member of team - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team | [required] | -**username** | **String** | username of the member to list | [required] | - -### Return type - -[**models::User**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_team_members - -> Vec org_list_team_members(id, page, limit) -List a team's members - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_team_repo - -> models::Repository org_list_team_repo(id, org, repo) -List a particular repo of team - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team | [required] | -**org** | **String** | organization that owns the repo to list | [required] | -**repo** | **String** | name of the repo to list | [required] | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_team_repos - -> Vec org_list_team_repos(id, page, limit) -List a team's repos - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_teams - -> Vec org_list_teams(org, page, limit) -List an organization's teams - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Team.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_list_user_orgs - -> Vec org_list_user_orgs(username, page, limit) -List a user's organizations - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Organization.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_publicize_member - -> org_publicize_member(org, username) -Publicize a user's membership - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**username** | **String** | username of the user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_remove_team_member - -> org_remove_team_member(id, username) -Remove a team member - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team | [required] | -**username** | **String** | username of the user to remove | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_remove_team_repository - -> org_remove_team_repository(id, org, repo) -Remove a repository from a team - -This does not delete the repository, it only removes the repository from the team. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the team | [required] | -**org** | **String** | organization that owns the repo to remove | [required] | -**repo** | **String** | name of the repo to remove | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_search_run_jobs - -> Vec org_search_run_jobs(org, labels) -Search for organization's action jobs according filter conditions - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**labels** | Option<**String**> | a comma separated list of run job labels to search for | | - -### Return type - -[**Vec**](ActionRunJob.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_unblock_user - -> org_unblock_user(org, username) -Unblock a user from the organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the org | [required] | -**username** | **String** | username of the user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## org_update_avatar - -> org_update_avatar(org, body) -Update an organization's avatar - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**body** | Option<[**UpdateUserAvatarOption**](UpdateUserAvatarOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## rename_org - -> rename_org(org, body) -Rename an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | existing org name | [required] | -**body** | [**RenameOrgOption**](RenameOrgOption.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## team_search - -> models::TeamSearchResults team_search(org, q, include_desc, page, limit) -Search for teams within an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**q** | Option<**String**> | keywords to search | | -**include_desc** | Option<**bool**> | include search within team description (defaults to true) | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**models::TeamSearchResults**](TeamSearchResults.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## update_org_secret - -> update_org_secret(org, secretname, body) -Create or Update a secret value in an organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of organization | [required] | -**secretname** | **String** | name of the secret | [required] | -**body** | Option<[**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## update_org_variable - -> update_org_variable(org, variablename, body) -Update variable in organization - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**org** | **String** | name of the organization | [required] | -**variablename** | **String** | name of the variable | [required] | -**body** | Option<[**UpdateVariableOption**](UpdateVariableOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/forgejo-openapi/docs/OrganizationPermissions.md b/forgejo-openapi/docs/OrganizationPermissions.md deleted file mode 100644 index 7a964fa..0000000 --- a/forgejo-openapi/docs/OrganizationPermissions.md +++ /dev/null @@ -1,15 +0,0 @@ -# OrganizationPermissions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**can_create_repository** | Option<**bool**> | | [optional] -**can_read** | Option<**bool**> | | [optional] -**can_write** | Option<**bool**> | | [optional] -**is_admin** | Option<**bool**> | | [optional] -**is_owner** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Package.md b/forgejo-openapi/docs/Package.md deleted file mode 100644 index 29ef457..0000000 --- a/forgejo-openapi/docs/Package.md +++ /dev/null @@ -1,19 +0,0 @@ -# Package - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | Option<**String**> | | [optional] -**creator** | Option<[**models::User**](User.md)> | | [optional] -**html_url** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**name** | Option<**String**> | | [optional] -**owner** | Option<[**models::User**](User.md)> | | [optional] -**repository** | Option<[**models::Repository**](Repository.md)> | | [optional] -**r#type** | Option<**String**> | | [optional] -**version** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PackageApi.md b/forgejo-openapi/docs/PackageApi.md deleted file mode 100644 index 39540b5..0000000 --- a/forgejo-openapi/docs/PackageApi.md +++ /dev/null @@ -1,200 +0,0 @@ -# \PackageApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**delete_package**](PackageApi.md#delete_package) | **DELETE** /packages/{owner}/{type}/{name}/{version} | Delete a package -[**get_package**](PackageApi.md#get_package) | **GET** /packages/{owner}/{type}/{name}/{version} | Gets a package -[**link_package**](PackageApi.md#link_package) | **POST** /packages/{owner}/{type}/{name}/-/link/{repo_name} | Link a package to a repository -[**list_package_files**](PackageApi.md#list_package_files) | **GET** /packages/{owner}/{type}/{name}/{version}/files | Gets all files of a package -[**list_packages**](PackageApi.md#list_packages) | **GET** /packages/{owner} | Gets all packages of an owner -[**unlink_package**](PackageApi.md#unlink_package) | **POST** /packages/{owner}/{type}/{name}/-/unlink | Unlink a package from a repository - - - -## delete_package - -> delete_package(owner, r#type, name, version) -Delete a package - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the package | [required] | -**r#type** | **String** | type of the package | [required] | -**name** | **String** | name of the package | [required] | -**version** | **String** | version of the package | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_package - -> models::Package get_package(owner, r#type, name, version) -Gets a package - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the package | [required] | -**r#type** | **String** | type of the package | [required] | -**name** | **String** | name of the package | [required] | -**version** | **String** | version of the package | [required] | - -### Return type - -[**models::Package**](Package.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## link_package - -> link_package(owner, r#type, name, repo_name) -Link a package to a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the package | [required] | -**r#type** | **String** | type of the package | [required] | -**name** | **String** | name of the package | [required] | -**repo_name** | **String** | name of the repository to link. | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## list_package_files - -> Vec list_package_files(owner, r#type, name, version) -Gets all files of a package - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the package | [required] | -**r#type** | **String** | type of the package | [required] | -**name** | **String** | name of the package | [required] | -**version** | **String** | version of the package | [required] | - -### Return type - -[**Vec**](PackageFile.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## list_packages - -> Vec list_packages(owner, page, limit, r#type, q) -Gets all packages of an owner - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the packages | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | -**r#type** | Option<**String**> | package type filter | | -**q** | Option<**String**> | name filter | | - -### Return type - -[**Vec**](Package.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## unlink_package - -> unlink_package(owner, r#type, name) -Unlink a package from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the package | [required] | -**r#type** | **String** | type of the package | [required] | -**name** | **String** | name of the package | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/forgejo-openapi/docs/PackageFile.md b/forgejo-openapi/docs/PackageFile.md deleted file mode 100644 index 772bfb0..0000000 --- a/forgejo-openapi/docs/PackageFile.md +++ /dev/null @@ -1,17 +0,0 @@ -# PackageFile - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**size** | Option<**i64**> | | [optional] -**id** | Option<**i64**> | | [optional] -**md5** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**sha1** | Option<**String**> | | [optional] -**sha256** | Option<**String**> | | [optional] -**sha512** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PayloadCommit.md b/forgejo-openapi/docs/PayloadCommit.md deleted file mode 100644 index cf9126f..0000000 --- a/forgejo-openapi/docs/PayloadCommit.md +++ /dev/null @@ -1,20 +0,0 @@ -# PayloadCommit - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**added** | Option<**Vec**> | | [optional] -**author** | Option<[**models::PayloadUser**](PayloadUser.md)> | | [optional] -**committer** | Option<[**models::PayloadUser**](PayloadUser.md)> | | [optional] -**id** | Option<**String**> | sha1 hash of the commit | [optional] -**message** | Option<**String**> | | [optional] -**modified** | Option<**Vec**> | | [optional] -**removed** | Option<**Vec**> | | [optional] -**timestamp** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] -**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PayloadCommitVerification.md b/forgejo-openapi/docs/PayloadCommitVerification.md deleted file mode 100644 index d6e7c6c..0000000 --- a/forgejo-openapi/docs/PayloadCommitVerification.md +++ /dev/null @@ -1,15 +0,0 @@ -# PayloadCommitVerification - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payload** | Option<**String**> | | [optional] -**reason** | Option<**String**> | | [optional] -**signature** | Option<**String**> | | [optional] -**signer** | Option<[**models::PayloadUser**](PayloadUser.md)> | | [optional] -**verified** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PayloadUser.md b/forgejo-openapi/docs/PayloadUser.md deleted file mode 100644 index 2a1065b..0000000 --- a/forgejo-openapi/docs/PayloadUser.md +++ /dev/null @@ -1,13 +0,0 @@ -# PayloadUser - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | Option<**String**> | | [optional] -**name** | Option<**String**> | Full name of the commit author | [optional] -**username** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Permission.md b/forgejo-openapi/docs/Permission.md deleted file mode 100644 index 88c2032..0000000 --- a/forgejo-openapi/docs/Permission.md +++ /dev/null @@ -1,13 +0,0 @@ -# Permission - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**admin** | Option<**bool**> | | [optional] -**pull** | Option<**bool**> | | [optional] -**push** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PrBranchInfo.md b/forgejo-openapi/docs/PrBranchInfo.md deleted file mode 100644 index 1cfd8a0..0000000 --- a/forgejo-openapi/docs/PrBranchInfo.md +++ /dev/null @@ -1,15 +0,0 @@ -# PrBranchInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**label** | Option<**String**> | | [optional] -**r#ref** | Option<**String**> | | [optional] -**repo** | Option<[**models::Repository**](Repository.md)> | | [optional] -**repo_id** | Option<**i64**> | | [optional] -**sha** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PublicKey.md b/forgejo-openapi/docs/PublicKey.md deleted file mode 100644 index 39ee65a..0000000 --- a/forgejo-openapi/docs/PublicKey.md +++ /dev/null @@ -1,19 +0,0 @@ -# PublicKey - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | Option<**String**> | | [optional] -**fingerprint** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**key** | Option<**String**> | | [optional] -**key_type** | Option<**String**> | | [optional] -**read_only** | Option<**bool**> | | [optional] -**title** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] -**user** | Option<[**models::User**](User.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PullRequest.md b/forgejo-openapi/docs/PullRequest.md deleted file mode 100644 index 568ba58..0000000 --- a/forgejo-openapi/docs/PullRequest.md +++ /dev/null @@ -1,48 +0,0 @@ -# PullRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additions** | Option<**i64**> | | [optional] -**allow_maintainer_edit** | Option<**bool**> | | [optional] -**assignee** | Option<[**models::User**](User.md)> | | [optional] -**assignees** | Option<[**Vec**](User.md)> | | [optional] -**base** | Option<[**models::PrBranchInfo**](PRBranchInfo.md)> | | [optional] -**body** | Option<**String**> | | [optional] -**changed_files** | Option<**i64**> | | [optional] -**closed_at** | Option<**String**> | | [optional] -**comments** | Option<**i64**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**deletions** | Option<**i64**> | | [optional] -**diff_url** | Option<**String**> | | [optional] -**draft** | Option<**bool**> | | [optional] -**due_date** | Option<**String**> | | [optional] -**flow** | Option<**i64**> | | [optional] -**head** | Option<[**models::PrBranchInfo**](PRBranchInfo.md)> | | [optional] -**html_url** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**is_locked** | Option<**bool**> | | [optional] -**labels** | Option<[**Vec**](Label.md)> | | [optional] -**merge_base** | Option<**String**> | | [optional] -**merge_commit_sha** | Option<**String**> | | [optional] -**mergeable** | Option<**bool**> | | [optional] -**merged** | Option<**bool**> | | [optional] -**merged_at** | Option<**String**> | | [optional] -**merged_by** | Option<[**models::User**](User.md)> | | [optional] -**milestone** | Option<[**models::Milestone**](Milestone.md)> | | [optional] -**number** | Option<**i64**> | | [optional] -**patch_url** | Option<**String**> | | [optional] -**pin_order** | Option<**i64**> | | [optional] -**requested_reviewers** | Option<[**Vec**](User.md)> | | [optional] -**requested_reviewers_teams** | Option<[**Vec**](Team.md)> | | [optional] -**review_comments** | Option<**i64**> | number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) | [optional] -**state** | Option<**String**> | StateType issue state type | [optional] -**title** | Option<**String**> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] -**user** | Option<[**models::User**](User.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PullRequestMeta.md b/forgejo-openapi/docs/PullRequestMeta.md deleted file mode 100644 index 9b089db..0000000 --- a/forgejo-openapi/docs/PullRequestMeta.md +++ /dev/null @@ -1,14 +0,0 @@ -# PullRequestMeta - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**draft** | Option<**bool**> | | [optional] -**html_url** | Option<**String**> | | [optional] -**merged** | Option<**bool**> | | [optional] -**merged_at** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PullReview.md b/forgejo-openapi/docs/PullReview.md deleted file mode 100644 index 006b465..0000000 --- a/forgejo-openapi/docs/PullReview.md +++ /dev/null @@ -1,24 +0,0 @@ -# PullReview - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | Option<**String**> | | [optional] -**comments_count** | Option<**i64**> | | [optional] -**commit_id** | Option<**String**> | | [optional] -**dismissed** | Option<**bool**> | | [optional] -**html_url** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**official** | Option<**bool**> | | [optional] -**pull_request_url** | Option<**String**> | | [optional] -**stale** | Option<**bool**> | | [optional] -**state** | Option<**String**> | ReviewStateType review state type | [optional] -**submitted_at** | Option<**String**> | | [optional] -**team** | Option<[**models::Team**](Team.md)> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**user** | Option<[**models::User**](User.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PullReviewComment.md b/forgejo-openapi/docs/PullReviewComment.md deleted file mode 100644 index 5aa0e29..0000000 --- a/forgejo-openapi/docs/PullReviewComment.md +++ /dev/null @@ -1,25 +0,0 @@ -# PullReviewComment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | Option<**String**> | | [optional] -**commit_id** | Option<**String**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**diff_hunk** | Option<**String**> | | [optional] -**html_url** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**original_commit_id** | Option<**String**> | | [optional] -**original_position** | Option<**i32**> | | [optional] -**path** | Option<**String**> | | [optional] -**position** | Option<**i32**> | | [optional] -**pull_request_review_id** | Option<**i64**> | | [optional] -**pull_request_url** | Option<**String**> | | [optional] -**resolver** | Option<[**models::User**](User.md)> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**user** | Option<[**models::User**](User.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PullReviewRequestOptions.md b/forgejo-openapi/docs/PullReviewRequestOptions.md deleted file mode 100644 index 8dfc1da..0000000 --- a/forgejo-openapi/docs/PullReviewRequestOptions.md +++ /dev/null @@ -1,12 +0,0 @@ -# PullReviewRequestOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reviewers** | Option<**Vec**> | | [optional] -**team_reviewers** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/PushMirror.md b/forgejo-openapi/docs/PushMirror.md deleted file mode 100644 index d824d71..0000000 --- a/forgejo-openapi/docs/PushMirror.md +++ /dev/null @@ -1,20 +0,0 @@ -# PushMirror - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**branch_filter** | Option<**String**> | | [optional] -**created** | Option<**String**> | | [optional] -**interval** | Option<**String**> | | [optional] -**last_error** | Option<**String**> | | [optional] -**last_update** | Option<**String**> | | [optional] -**public_key** | Option<**String**> | | [optional] -**remote_address** | Option<**String**> | | [optional] -**remote_name** | Option<**String**> | | [optional] -**repo_name** | Option<**String**> | | [optional] -**sync_on_commit** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaGroup.md b/forgejo-openapi/docs/QuotaGroup.md deleted file mode 100644 index c89aad6..0000000 --- a/forgejo-openapi/docs/QuotaGroup.md +++ /dev/null @@ -1,12 +0,0 @@ -# QuotaGroup - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | Option<**String**> | Name of the group | [optional] -**rules** | Option<[**Vec**](QuotaRuleInfo.md)> | Rules associated with the group | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaInfo.md b/forgejo-openapi/docs/QuotaInfo.md deleted file mode 100644 index 6ad6bc8..0000000 --- a/forgejo-openapi/docs/QuotaInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# QuotaInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**groups** | Option<[**Vec**](QuotaGroup.md)> | QuotaGroupList represents a list of quota groups | [optional] -**used** | Option<[**models::QuotaUsed**](QuotaUsed.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaRuleInfo.md b/forgejo-openapi/docs/QuotaRuleInfo.md deleted file mode 100644 index 24a9842..0000000 --- a/forgejo-openapi/docs/QuotaRuleInfo.md +++ /dev/null @@ -1,13 +0,0 @@ -# QuotaRuleInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | Option<**i64**> | The limit set by the rule | [optional] -**name** | Option<**String**> | Name of the rule (only shown to admins) | [optional] -**subjects** | Option<**Vec**> | Subjects the rule affects | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaUsed.md b/forgejo-openapi/docs/QuotaUsed.md deleted file mode 100644 index b52b9d0..0000000 --- a/forgejo-openapi/docs/QuotaUsed.md +++ /dev/null @@ -1,11 +0,0 @@ -# QuotaUsed - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**size** | Option<[**models::QuotaUsedSize**](QuotaUsedSize.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaUsedArtifact.md b/forgejo-openapi/docs/QuotaUsedArtifact.md deleted file mode 100644 index 63f9be4..0000000 --- a/forgejo-openapi/docs/QuotaUsedArtifact.md +++ /dev/null @@ -1,13 +0,0 @@ -# QuotaUsedArtifact - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**html_url** | Option<**String**> | HTML URL to the action run containing the artifact | [optional] -**name** | Option<**String**> | Name of the artifact | [optional] -**size** | Option<**i64**> | Size of the artifact (compressed) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaUsedAttachment.md b/forgejo-openapi/docs/QuotaUsedAttachment.md deleted file mode 100644 index 1ebd2ec..0000000 --- a/forgejo-openapi/docs/QuotaUsedAttachment.md +++ /dev/null @@ -1,14 +0,0 @@ -# QuotaUsedAttachment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_url** | Option<**String**> | API URL for the attachment | [optional] -**contained_in** | Option<[**models::QuotaUsedAttachmentContainedIn**](QuotaUsedAttachmentContainedIn.md)> | | [optional] -**name** | Option<**String**> | Filename of the attachment | [optional] -**size** | Option<**i64**> | Size of the attachment (in bytes) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaUsedAttachmentContainedIn.md b/forgejo-openapi/docs/QuotaUsedAttachmentContainedIn.md deleted file mode 100644 index 52b973c..0000000 --- a/forgejo-openapi/docs/QuotaUsedAttachmentContainedIn.md +++ /dev/null @@ -1,12 +0,0 @@ -# QuotaUsedAttachmentContainedIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_url** | Option<**String**> | API URL for the object that contains this attachment | [optional] -**html_url** | Option<**String**> | HTML URL for the object that contains this attachment | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaUsedPackage.md b/forgejo-openapi/docs/QuotaUsedPackage.md deleted file mode 100644 index a9c830e..0000000 --- a/forgejo-openapi/docs/QuotaUsedPackage.md +++ /dev/null @@ -1,15 +0,0 @@ -# QuotaUsedPackage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**html_url** | Option<**String**> | HTML URL to the package version | [optional] -**name** | Option<**String**> | Name of the package | [optional] -**size** | Option<**i64**> | Size of the package version | [optional] -**r#type** | Option<**String**> | Type of the package | [optional] -**version** | Option<**String**> | Version of the package | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaUsedSize.md b/forgejo-openapi/docs/QuotaUsedSize.md deleted file mode 100644 index f270b02..0000000 --- a/forgejo-openapi/docs/QuotaUsedSize.md +++ /dev/null @@ -1,13 +0,0 @@ -# QuotaUsedSize - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assets** | Option<[**models::QuotaUsedSizeAssets**](QuotaUsedSizeAssets.md)> | | [optional] -**git** | Option<[**models::QuotaUsedSizeGit**](QuotaUsedSizeGit.md)> | | [optional] -**repos** | Option<[**models::QuotaUsedSizeRepos**](QuotaUsedSizeRepos.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaUsedSizeAssets.md b/forgejo-openapi/docs/QuotaUsedSizeAssets.md deleted file mode 100644 index 775755e..0000000 --- a/forgejo-openapi/docs/QuotaUsedSizeAssets.md +++ /dev/null @@ -1,13 +0,0 @@ -# QuotaUsedSizeAssets - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**artifacts** | Option<**i64**> | Storage size used for the user's artifacts | [optional] -**attachments** | Option<[**models::QuotaUsedSizeAssetsAttachments**](QuotaUsedSizeAssetsAttachments.md)> | | [optional] -**packages** | Option<[**models::QuotaUsedSizeAssetsPackages**](QuotaUsedSizeAssetsPackages.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaUsedSizeAssetsAttachments.md b/forgejo-openapi/docs/QuotaUsedSizeAssetsAttachments.md deleted file mode 100644 index d6f4650..0000000 --- a/forgejo-openapi/docs/QuotaUsedSizeAssetsAttachments.md +++ /dev/null @@ -1,12 +0,0 @@ -# QuotaUsedSizeAssetsAttachments - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**issues** | Option<**i64**> | Storage size used for the user's issue & comment attachments | [optional] -**releases** | Option<**i64**> | Storage size used for the user's release attachments | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaUsedSizeAssetsPackages.md b/forgejo-openapi/docs/QuotaUsedSizeAssetsPackages.md deleted file mode 100644 index d9c7fe4..0000000 --- a/forgejo-openapi/docs/QuotaUsedSizeAssetsPackages.md +++ /dev/null @@ -1,11 +0,0 @@ -# QuotaUsedSizeAssetsPackages - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**all** | Option<**i64**> | Storage suze used for the user's packages | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaUsedSizeGit.md b/forgejo-openapi/docs/QuotaUsedSizeGit.md deleted file mode 100644 index fa5cae6..0000000 --- a/forgejo-openapi/docs/QuotaUsedSizeGit.md +++ /dev/null @@ -1,11 +0,0 @@ -# QuotaUsedSizeGit - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lfs** | Option<**i64**> | Storage size of the user's Git LFS objects | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/QuotaUsedSizeRepos.md b/forgejo-openapi/docs/QuotaUsedSizeRepos.md deleted file mode 100644 index 66df570..0000000 --- a/forgejo-openapi/docs/QuotaUsedSizeRepos.md +++ /dev/null @@ -1,12 +0,0 @@ -# QuotaUsedSizeRepos - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**private** | Option<**i64**> | Storage size of the user's private repositories | [optional] -**public** | Option<**i64**> | Storage size of the user's public repositories | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Reaction.md b/forgejo-openapi/docs/Reaction.md deleted file mode 100644 index df4f20a..0000000 --- a/forgejo-openapi/docs/Reaction.md +++ /dev/null @@ -1,13 +0,0 @@ -# Reaction - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | Option<**String**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**user** | Option<[**models::User**](User.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Reference.md b/forgejo-openapi/docs/Reference.md deleted file mode 100644 index 7698c9b..0000000 --- a/forgejo-openapi/docs/Reference.md +++ /dev/null @@ -1,13 +0,0 @@ -# Reference - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object** | Option<[**models::GitObject**](GitObject.md)> | | [optional] -**r#ref** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/RegistrationToken.md b/forgejo-openapi/docs/RegistrationToken.md deleted file mode 100644 index b70b020..0000000 --- a/forgejo-openapi/docs/RegistrationToken.md +++ /dev/null @@ -1,11 +0,0 @@ -# RegistrationToken - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**token** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Release.md b/forgejo-openapi/docs/Release.md deleted file mode 100644 index 8a34107..0000000 --- a/forgejo-openapi/docs/Release.md +++ /dev/null @@ -1,28 +0,0 @@ -# Release - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**archive_download_count** | Option<[**models::TagArchiveDownloadCount**](TagArchiveDownloadCount.md)> | | [optional] -**assets** | Option<[**Vec**](Attachment.md)> | | [optional] -**author** | Option<[**models::User**](User.md)> | | [optional] -**body** | Option<**String**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**draft** | Option<**bool**> | | [optional] -**hide_archive_links** | Option<**bool**> | | [optional] -**html_url** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**name** | Option<**String**> | | [optional] -**prerelease** | Option<**bool**> | | [optional] -**published_at** | Option<**String**> | | [optional] -**tag_name** | Option<**String**> | | [optional] -**tarball_url** | Option<**String**> | | [optional] -**target_commitish** | Option<**String**> | | [optional] -**upload_url** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] -**zipball_url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/RenameOrgOption.md b/forgejo-openapi/docs/RenameOrgOption.md deleted file mode 100644 index 90eadf9..0000000 --- a/forgejo-openapi/docs/RenameOrgOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# RenameOrgOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**new_name** | **String** | New username for this org. This name cannot be in use yet by any other user. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/RenameUserOption.md b/forgejo-openapi/docs/RenameUserOption.md deleted file mode 100644 index c5df112..0000000 --- a/forgejo-openapi/docs/RenameUserOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# RenameUserOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**new_username** | **String** | New username for this user. This name cannot be in use yet by any other user. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ReplaceFlagsOption.md b/forgejo-openapi/docs/ReplaceFlagsOption.md deleted file mode 100644 index 6f5f83f..0000000 --- a/forgejo-openapi/docs/ReplaceFlagsOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReplaceFlagsOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**flags** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/RepoCollaboratorPermission.md b/forgejo-openapi/docs/RepoCollaboratorPermission.md deleted file mode 100644 index d748229..0000000 --- a/forgejo-openapi/docs/RepoCollaboratorPermission.md +++ /dev/null @@ -1,13 +0,0 @@ -# RepoCollaboratorPermission - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**permission** | Option<**String**> | | [optional] -**role_name** | Option<**String**> | | [optional] -**user** | Option<[**models::User**](User.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/RepoCommit.md b/forgejo-openapi/docs/RepoCommit.md deleted file mode 100644 index e40fe3d..0000000 --- a/forgejo-openapi/docs/RepoCommit.md +++ /dev/null @@ -1,16 +0,0 @@ -# RepoCommit - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**author** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] -**committer** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] -**message** | Option<**String**> | | [optional] -**tree** | Option<[**models::CommitMeta**](CommitMeta.md)> | | [optional] -**url** | Option<**String**> | | [optional] -**verification** | Option<[**models::PayloadCommitVerification**](PayloadCommitVerification.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/RepoCreateReleaseAttachmentRequest.md b/forgejo-openapi/docs/RepoCreateReleaseAttachmentRequest.md deleted file mode 100644 index 5c331f3..0000000 --- a/forgejo-openapi/docs/RepoCreateReleaseAttachmentRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# RepoCreateReleaseAttachmentRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attachment** | Option<**std::path::PathBuf**> | attachment to upload (this parameter is incompatible with `external_url`) | [optional] -**external_url** | Option<**String**> | url to external asset (this parameter is incompatible with `attachment`) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/RepoTopicOptions.md b/forgejo-openapi/docs/RepoTopicOptions.md deleted file mode 100644 index 3811737..0000000 --- a/forgejo-openapi/docs/RepoTopicOptions.md +++ /dev/null @@ -1,11 +0,0 @@ -# RepoTopicOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**topics** | Option<**Vec**> | list of topic names | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/RepoTransfer.md b/forgejo-openapi/docs/RepoTransfer.md deleted file mode 100644 index bc5e8e0..0000000 --- a/forgejo-openapi/docs/RepoTransfer.md +++ /dev/null @@ -1,13 +0,0 @@ -# RepoTransfer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**doer** | Option<[**models::User**](User.md)> | | [optional] -**recipient** | Option<[**models::User**](User.md)> | | [optional] -**teams** | Option<[**Vec**](Team.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Repository.md b/forgejo-openapi/docs/Repository.md deleted file mode 100644 index b9f6014..0000000 --- a/forgejo-openapi/docs/Repository.md +++ /dev/null @@ -1,73 +0,0 @@ -# Repository - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allow_fast_forward_only_merge** | Option<**bool**> | | [optional] -**allow_merge_commits** | Option<**bool**> | | [optional] -**allow_rebase** | Option<**bool**> | | [optional] -**allow_rebase_explicit** | Option<**bool**> | | [optional] -**allow_rebase_update** | Option<**bool**> | | [optional] -**allow_squash_merge** | Option<**bool**> | | [optional] -**archived** | Option<**bool**> | | [optional] -**archived_at** | Option<**String**> | | [optional] -**avatar_url** | Option<**String**> | | [optional] -**clone_url** | Option<**String**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**default_allow_maintainer_edit** | Option<**bool**> | | [optional] -**default_branch** | Option<**String**> | | [optional] -**default_delete_branch_after_merge** | Option<**bool**> | | [optional] -**default_merge_style** | Option<**String**> | | [optional] -**default_update_style** | Option<**String**> | | [optional] -**description** | Option<**String**> | | [optional] -**empty** | Option<**bool**> | | [optional] -**external_tracker** | Option<[**models::ExternalTracker**](ExternalTracker.md)> | | [optional] -**external_wiki** | Option<[**models::ExternalWiki**](ExternalWiki.md)> | | [optional] -**fork** | Option<**bool**> | | [optional] -**forks_count** | Option<**i64**> | | [optional] -**full_name** | Option<**String**> | | [optional] -**globally_editable_wiki** | Option<**bool**> | | [optional] -**has_actions** | Option<**bool**> | | [optional] -**has_issues** | Option<**bool**> | | [optional] -**has_packages** | Option<**bool**> | | [optional] -**has_projects** | Option<**bool**> | | [optional] -**has_pull_requests** | Option<**bool**> | | [optional] -**has_releases** | Option<**bool**> | | [optional] -**has_wiki** | Option<**bool**> | | [optional] -**html_url** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**ignore_whitespace_conflicts** | Option<**bool**> | | [optional] -**internal** | Option<**bool**> | | [optional] -**internal_tracker** | Option<[**models::InternalTracker**](InternalTracker.md)> | | [optional] -**language** | Option<**String**> | | [optional] -**languages_url** | Option<**String**> | | [optional] -**link** | Option<**String**> | | [optional] -**mirror** | Option<**bool**> | | [optional] -**mirror_interval** | Option<**String**> | | [optional] -**mirror_updated** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**object_format_name** | Option<**ObjectFormatName**> | ObjectFormatName of the underlying git repository (enum: sha1, sha256) | [optional] -**open_issues_count** | Option<**i64**> | | [optional] -**open_pr_counter** | Option<**i64**> | | [optional] -**original_url** | Option<**String**> | | [optional] -**owner** | Option<[**models::User**](User.md)> | | [optional] -**parent** | Option<[**models::Repository**](Repository.md)> | | [optional] -**permissions** | Option<[**models::Permission**](Permission.md)> | | [optional] -**private** | Option<**bool**> | | [optional] -**release_counter** | Option<**i64**> | | [optional] -**repo_transfer** | Option<[**models::RepoTransfer**](RepoTransfer.md)> | | [optional] -**size** | Option<**i64**> | | [optional] -**ssh_url** | Option<**String**> | | [optional] -**stars_count** | Option<**i64**> | | [optional] -**template** | Option<**bool**> | | [optional] -**topics** | Option<**Vec**> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**url** | Option<**String**> | | [optional] -**watchers_count** | Option<**i64**> | | [optional] -**website** | Option<**String**> | | [optional] -**wiki_branch** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/RepositoryApi.md b/forgejo-openapi/docs/RepositoryApi.md deleted file mode 100644 index 1d96824..0000000 --- a/forgejo-openapi/docs/RepositoryApi.md +++ /dev/null @@ -1,5816 +0,0 @@ -# \RepositoryApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**accept_repo_transfer**](RepositoryApi.md#accept_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/accept | Accept a repo transfer -[**action_run**](RepositoryApi.md#action_run) | **GET** /repos/{owner}/{repo}/actions/runs/{run_id} | Get an action run -[**create_current_user_repo**](RepositoryApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository -[**create_fork**](RepositoryApi.md#create_fork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository -[**create_repo_variable**](RepositoryApi.md#create_repo_variable) | **POST** /repos/{owner}/{repo}/actions/variables/{variablename} | Create a repo-level variable -[**delete_repo_secret**](RepositoryApi.md#delete_repo_secret) | **DELETE** /repos/{owner}/{repo}/actions/secrets/{secretname} | Delete a secret in a repository -[**delete_repo_variable**](RepositoryApi.md#delete_repo_variable) | **DELETE** /repos/{owner}/{repo}/actions/variables/{variablename} | Delete a repo-level variable -[**dispatch_workflow**](RepositoryApi.md#dispatch_workflow) | **POST** /repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches | Dispatches a workflow -[**generate_repo**](RepositoryApi.md#generate_repo) | **POST** /repos/{template_owner}/{template_repo}/generate | Create a repository using a template -[**get_annotated_tag**](RepositoryApi.md#get_annotated_tag) | **GET** /repos/{owner}/{repo}/git/tags/{sha} | Gets the tag object of an annotated tag (not lightweight tags) -[**get_blob**](RepositoryApi.md#get_blob) | **GET** /repos/{owner}/{repo}/git/blobs/{sha} | Gets the blob of a repository. -[**get_blobs**](RepositoryApi.md#get_blobs) | **GET** /repos/{owner}/{repo}/git/blobs | Gets multiple blobs of a repository. -[**get_repo_variable**](RepositoryApi.md#get_repo_variable) | **GET** /repos/{owner}/{repo}/actions/variables/{variablename} | Get a repo-level variable -[**get_repo_variables_list**](RepositoryApi.md#get_repo_variables_list) | **GET** /repos/{owner}/{repo}/actions/variables | Get repo-level variables list -[**get_tree**](RepositoryApi.md#get_tree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. -[**list_action_runs**](RepositoryApi.md#list_action_runs) | **GET** /repos/{owner}/{repo}/actions/runs | List a repository's action runs -[**list_action_tasks**](RepositoryApi.md#list_action_tasks) | **GET** /repos/{owner}/{repo}/actions/tasks | List a repository's action tasks -[**list_forks**](RepositoryApi.md#list_forks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks -[**reject_repo_transfer**](RepositoryApi.md#reject_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/reject | Reject a repo transfer -[**repo_add_collaborator**](RepositoryApi.md#repo_add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add a collaborator to a repository -[**repo_add_flag**](RepositoryApi.md#repo_add_flag) | **PUT** /repos/{owner}/{repo}/flags/{flag} | Add a flag to a repository -[**repo_add_push_mirror**](RepositoryApi.md#repo_add_push_mirror) | **POST** /repos/{owner}/{repo}/push_mirrors | Set up a new push mirror in a repository -[**repo_add_team**](RepositoryApi.md#repo_add_team) | **PUT** /repos/{owner}/{repo}/teams/{team} | Add a team to a repository -[**repo_add_topic**](RepositoryApi.md#repo_add_topic) | **PUT** /repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository -[**repo_apply_diff_patch**](RepositoryApi.md#repo_apply_diff_patch) | **POST** /repos/{owner}/{repo}/diffpatch | Apply diff patch to repository -[**repo_cancel_scheduled_auto_merge**](RepositoryApi.md#repo_cancel_scheduled_auto_merge) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/merge | Cancel the scheduled auto merge for the given pull request -[**repo_change_files**](RepositoryApi.md#repo_change_files) | **POST** /repos/{owner}/{repo}/contents | Modify multiple files in a repository -[**repo_check_collaborator**](RepositoryApi.md#repo_check_collaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository -[**repo_check_flag**](RepositoryApi.md#repo_check_flag) | **GET** /repos/{owner}/{repo}/flags/{flag} | Check if a repository has a given flag -[**repo_check_team**](RepositoryApi.md#repo_check_team) | **GET** /repos/{owner}/{repo}/teams/{team} | Check if a team is assigned to a repository -[**repo_compare_diff**](RepositoryApi.md#repo_compare_diff) | **GET** /repos/{owner}/{repo}/compare/{basehead} | Get commit comparison information -[**repo_convert**](RepositoryApi.md#repo_convert) | **POST** /repos/{owner}/{repo}/convert | Convert a mirror repo to a normal repo. -[**repo_create_branch**](RepositoryApi.md#repo_create_branch) | **POST** /repos/{owner}/{repo}/branches | Create a branch -[**repo_create_branch_protection**](RepositoryApi.md#repo_create_branch_protection) | **POST** /repos/{owner}/{repo}/branch_protections | Create a branch protections for a repository -[**repo_create_file**](RepositoryApi.md#repo_create_file) | **POST** /repos/{owner}/{repo}/contents/{filepath} | Create a file in a repository -[**repo_create_hook**](RepositoryApi.md#repo_create_hook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -[**repo_create_key**](RepositoryApi.md#repo_create_key) | **POST** /repos/{owner}/{repo}/keys | Add a key to a repository -[**repo_create_pull_request**](RepositoryApi.md#repo_create_pull_request) | **POST** /repos/{owner}/{repo}/pulls | Create a pull request -[**repo_create_pull_review**](RepositoryApi.md#repo_create_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews | Create a review to an pull request -[**repo_create_pull_review_comment**](RepositoryApi.md#repo_create_pull_review_comment) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Add a new comment to a pull request review -[**repo_create_pull_review_requests**](RepositoryApi.md#repo_create_pull_review_requests) | **POST** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | Create review requests for a pull request -[**repo_create_release**](RepositoryApi.md#repo_create_release) | **POST** /repos/{owner}/{repo}/releases | Create a release -[**repo_create_release_attachment**](RepositoryApi.md#repo_create_release_attachment) | **POST** /repos/{owner}/{repo}/releases/{id}/assets | Create a release attachment -[**repo_create_status**](RepositoryApi.md#repo_create_status) | **POST** /repos/{owner}/{repo}/statuses/{sha} | Create a commit status -[**repo_create_tag**](RepositoryApi.md#repo_create_tag) | **POST** /repos/{owner}/{repo}/tags | Create a new git tag in a repository -[**repo_create_tag_protection**](RepositoryApi.md#repo_create_tag_protection) | **POST** /repos/{owner}/{repo}/tag_protections | Create a tag protections for a repository -[**repo_create_wiki_page**](RepositoryApi.md#repo_create_wiki_page) | **POST** /repos/{owner}/{repo}/wiki/new | Create a wiki page -[**repo_delete**](RepositoryApi.md#repo_delete) | **DELETE** /repos/{owner}/{repo} | Delete a repository -[**repo_delete_all_flags**](RepositoryApi.md#repo_delete_all_flags) | **DELETE** /repos/{owner}/{repo}/flags | Remove all flags from a repository -[**repo_delete_avatar**](RepositoryApi.md#repo_delete_avatar) | **DELETE** /repos/{owner}/{repo}/avatar | Delete a repository's avatar -[**repo_delete_branch**](RepositoryApi.md#repo_delete_branch) | **DELETE** /repos/{owner}/{repo}/branches/{branch} | Delete a specific branch from a repository -[**repo_delete_branch_protection**](RepositoryApi.md#repo_delete_branch_protection) | **DELETE** /repos/{owner}/{repo}/branch_protections/{name} | Delete a specific branch protection for the repository -[**repo_delete_collaborator**](RepositoryApi.md#repo_delete_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository -[**repo_delete_file**](RepositoryApi.md#repo_delete_file) | **DELETE** /repos/{owner}/{repo}/contents/{filepath} | Delete a file in a repository -[**repo_delete_flag**](RepositoryApi.md#repo_delete_flag) | **DELETE** /repos/{owner}/{repo}/flags/{flag} | Remove a flag from a repository -[**repo_delete_git_hook**](RepositoryApi.md#repo_delete_git_hook) | **DELETE** /repos/{owner}/{repo}/hooks/git/{id} | Delete a Git hook in a repository -[**repo_delete_hook**](RepositoryApi.md#repo_delete_hook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook in a repository -[**repo_delete_key**](RepositoryApi.md#repo_delete_key) | **DELETE** /repos/{owner}/{repo}/keys/{id} | Delete a key from a repository -[**repo_delete_pull_review**](RepositoryApi.md#repo_delete_pull_review) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Delete a specific review from a pull request -[**repo_delete_pull_review_comment**](RepositoryApi.md#repo_delete_pull_review_comment) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment} | Delete a pull review comment -[**repo_delete_pull_review_requests**](RepositoryApi.md#repo_delete_pull_review_requests) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | Cancel review requests for a pull request -[**repo_delete_push_mirror**](RepositoryApi.md#repo_delete_push_mirror) | **DELETE** /repos/{owner}/{repo}/push_mirrors/{name} | Remove a push mirror from a repository by remoteName -[**repo_delete_release**](RepositoryApi.md#repo_delete_release) | **DELETE** /repos/{owner}/{repo}/releases/{id} | Delete a release -[**repo_delete_release_attachment**](RepositoryApi.md#repo_delete_release_attachment) | **DELETE** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment -[**repo_delete_release_by_tag**](RepositoryApi.md#repo_delete_release_by_tag) | **DELETE** /repos/{owner}/{repo}/releases/tags/{tag} | Delete a release by tag name -[**repo_delete_tag**](RepositoryApi.md#repo_delete_tag) | **DELETE** /repos/{owner}/{repo}/tags/{tag} | Delete a repository's tag by name -[**repo_delete_tag_protection**](RepositoryApi.md#repo_delete_tag_protection) | **DELETE** /repos/{owner}/{repo}/tag_protections/{id} | Delete a specific tag protection for the repository -[**repo_delete_team**](RepositoryApi.md#repo_delete_team) | **DELETE** /repos/{owner}/{repo}/teams/{team} | Delete a team from a repository -[**repo_delete_topic**](RepositoryApi.md#repo_delete_topic) | **DELETE** /repos/{owner}/{repo}/topics/{topic} | Delete a topic from a repository -[**repo_delete_wiki_page**](RepositoryApi.md#repo_delete_wiki_page) | **DELETE** /repos/{owner}/{repo}/wiki/page/{pageName} | Delete a wiki page -[**repo_dismiss_pull_review**](RepositoryApi.md#repo_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals | Dismiss a review for a pull request -[**repo_download_commit_diff_or_patch**](RepositoryApi.md#repo_download_commit_diff_or_patch) | **GET** /repos/{owner}/{repo}/git/commits/{sha}.{diffType} | Get a commit's diff or patch -[**repo_download_pull_diff_or_patch**](RepositoryApi.md#repo_download_pull_diff_or_patch) | **GET** /repos/{owner}/{repo}/pulls/{index}.{diffType} | Get a pull request diff or patch -[**repo_edit**](RepositoryApi.md#repo_edit) | **PATCH** /repos/{owner}/{repo} | Edit a repository's properties. Only fields that are set will be changed. -[**repo_edit_branch_protection**](RepositoryApi.md#repo_edit_branch_protection) | **PATCH** /repos/{owner}/{repo}/branch_protections/{name} | Edit a branch protections for a repository. Only fields that are set will be changed -[**repo_edit_git_hook**](RepositoryApi.md#repo_edit_git_hook) | **PATCH** /repos/{owner}/{repo}/hooks/git/{id} | Edit a Git hook in a repository -[**repo_edit_hook**](RepositoryApi.md#repo_edit_hook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook in a repository -[**repo_edit_pull_request**](RepositoryApi.md#repo_edit_pull_request) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. -[**repo_edit_release**](RepositoryApi.md#repo_edit_release) | **PATCH** /repos/{owner}/{repo}/releases/{id} | Update a release -[**repo_edit_release_attachment**](RepositoryApi.md#repo_edit_release_attachment) | **PATCH** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment -[**repo_edit_tag_protection**](RepositoryApi.md#repo_edit_tag_protection) | **PATCH** /repos/{owner}/{repo}/tag_protections/{id} | Edit a tag protections for a repository. Only fields that are set will be changed -[**repo_edit_wiki_page**](RepositoryApi.md#repo_edit_wiki_page) | **PATCH** /repos/{owner}/{repo}/wiki/page/{pageName} | Edit a wiki page -[**repo_get**](RepositoryApi.md#repo_get) | **GET** /repos/{owner}/{repo} | Get a repository -[**repo_get_all_commits**](RepositoryApi.md#repo_get_all_commits) | **GET** /repos/{owner}/{repo}/commits | Get a list of all commits from a repository -[**repo_get_archive**](RepositoryApi.md#repo_get_archive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository -[**repo_get_assignees**](RepositoryApi.md#repo_get_assignees) | **GET** /repos/{owner}/{repo}/assignees | Return all users that have write access and can be assigned to issues -[**repo_get_branch**](RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository, including its effective branch protection -[**repo_get_branch_protection**](RepositoryApi.md#repo_get_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections/{name} | Get a specific branch protection for the repository -[**repo_get_by_id**](RepositoryApi.md#repo_get_by_id) | **GET** /repositories/{id} | Get a repository by id -[**repo_get_combined_status_by_ref**](RepositoryApi.md#repo_get_combined_status_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/status | Get a commit's combined status, by branch/tag/commit reference -[**repo_get_commit_pull_request**](RepositoryApi.md#repo_get_commit_pull_request) | **GET** /repos/{owner}/{repo}/commits/{sha}/pull | Get the pull request of the commit -[**repo_get_contents**](RepositoryApi.md#repo_get_contents) | **GET** /repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir -[**repo_get_contents_list**](RepositoryApi.md#repo_get_contents_list) | **GET** /repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir -[**repo_get_editor_config**](RepositoryApi.md#repo_get_editor_config) | **GET** /repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository -[**repo_get_git_hook**](RepositoryApi.md#repo_get_git_hook) | **GET** /repos/{owner}/{repo}/hooks/git/{id} | Get a Git hook -[**repo_get_hook**](RepositoryApi.md#repo_get_hook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook -[**repo_get_issue_config**](RepositoryApi.md#repo_get_issue_config) | **GET** /repos/{owner}/{repo}/issue_config | Returns the issue config for a repo -[**repo_get_issue_templates**](RepositoryApi.md#repo_get_issue_templates) | **GET** /repos/{owner}/{repo}/issue_templates | Get available issue templates for a repository -[**repo_get_key**](RepositoryApi.md#repo_get_key) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id -[**repo_get_languages**](RepositoryApi.md#repo_get_languages) | **GET** /repos/{owner}/{repo}/languages | Get languages and number of bytes of code written -[**repo_get_latest_release**](RepositoryApi.md#repo_get_latest_release) | **GET** /repos/{owner}/{repo}/releases/latest | Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at -[**repo_get_note**](RepositoryApi.md#repo_get_note) | **GET** /repos/{owner}/{repo}/git/notes/{sha} | Get a note corresponding to a single commit from a repository -[**repo_get_pull_request**](RepositoryApi.md#repo_get_pull_request) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request -[**repo_get_pull_request_by_base_head**](RepositoryApi.md#repo_get_pull_request_by_base_head) | **GET** /repos/{owner}/{repo}/pulls/{base}/{head} | Get a pull request by base and head -[**repo_get_pull_request_commits**](RepositoryApi.md#repo_get_pull_request_commits) | **GET** /repos/{owner}/{repo}/pulls/{index}/commits | Get commits for a pull request -[**repo_get_pull_request_files**](RepositoryApi.md#repo_get_pull_request_files) | **GET** /repos/{owner}/{repo}/pulls/{index}/files | Get changed files for a pull request -[**repo_get_pull_review**](RepositoryApi.md#repo_get_pull_review) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Get a specific review for a pull request -[**repo_get_pull_review_comment**](RepositoryApi.md#repo_get_pull_review_comment) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment} | Get a pull review comment -[**repo_get_pull_review_comments**](RepositoryApi.md#repo_get_pull_review_comments) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Get a specific review for a pull request -[**repo_get_push_mirror_by_remote_name**](RepositoryApi.md#repo_get_push_mirror_by_remote_name) | **GET** /repos/{owner}/{repo}/push_mirrors/{name} | Get push mirror of the repository by remoteName -[**repo_get_raw_file**](RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository -[**repo_get_raw_file_or_lfs**](RepositoryApi.md#repo_get_raw_file_or_lfs) | **GET** /repos/{owner}/{repo}/media/{filepath} | Get a file or it's LFS object from a repository -[**repo_get_release**](RepositoryApi.md#repo_get_release) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release -[**repo_get_release_attachment**](RepositoryApi.md#repo_get_release_attachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment -[**repo_get_release_by_tag**](RepositoryApi.md#repo_get_release_by_tag) | **GET** /repos/{owner}/{repo}/releases/tags/{tag} | Get a release by tag name -[**repo_get_repo_permissions**](RepositoryApi.md#repo_get_repo_permissions) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator}/permission | Get repository permissions for a user -[**repo_get_reviewers**](RepositoryApi.md#repo_get_reviewers) | **GET** /repos/{owner}/{repo}/reviewers | Return all users that can be requested to review in this repo -[**repo_get_runner_registration_token**](RepositoryApi.md#repo_get_runner_registration_token) | **GET** /repos/{owner}/{repo}/actions/runners/registration-token | Get a repository's actions runner registration token -[**repo_get_single_commit**](RepositoryApi.md#repo_get_single_commit) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository -[**repo_get_tag**](RepositoryApi.md#repo_get_tag) | **GET** /repos/{owner}/{repo}/tags/{tag} | Get the tag of a repository by tag name -[**repo_get_tag_protection**](RepositoryApi.md#repo_get_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections/{id} | Get a specific tag protection for the repository -[**repo_get_wiki_page**](RepositoryApi.md#repo_get_wiki_page) | **GET** /repos/{owner}/{repo}/wiki/page/{pageName} | Get a wiki page -[**repo_get_wiki_page_revisions**](RepositoryApi.md#repo_get_wiki_page_revisions) | **GET** /repos/{owner}/{repo}/wiki/revisions/{pageName} | Get revisions of a wiki page -[**repo_get_wiki_pages**](RepositoryApi.md#repo_get_wiki_pages) | **GET** /repos/{owner}/{repo}/wiki/pages | Get all wiki pages -[**repo_list_actions_secrets**](RepositoryApi.md#repo_list_actions_secrets) | **GET** /repos/{owner}/{repo}/actions/secrets | List an repo's actions secrets -[**repo_list_activity_feeds**](RepositoryApi.md#repo_list_activity_feeds) | **GET** /repos/{owner}/{repo}/activities/feeds | List a repository's activity feeds -[**repo_list_all_git_refs**](RepositoryApi.md#repo_list_all_git_refs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs -[**repo_list_branch_protection**](RepositoryApi.md#repo_list_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections | List branch protections for a repository -[**repo_list_branches**](RepositoryApi.md#repo_list_branches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches -[**repo_list_collaborators**](RepositoryApi.md#repo_list_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators -[**repo_list_flags**](RepositoryApi.md#repo_list_flags) | **GET** /repos/{owner}/{repo}/flags | List a repository's flags -[**repo_list_git_hooks**](RepositoryApi.md#repo_list_git_hooks) | **GET** /repos/{owner}/{repo}/hooks/git | List the Git hooks in a repository -[**repo_list_git_refs**](RepositoryApi.md#repo_list_git_refs) | **GET** /repos/{owner}/{repo}/git/refs/{ref} | Get specified ref or filtered repository's refs -[**repo_list_hooks**](RepositoryApi.md#repo_list_hooks) | **GET** /repos/{owner}/{repo}/hooks | List the hooks in a repository -[**repo_list_keys**](RepositoryApi.md#repo_list_keys) | **GET** /repos/{owner}/{repo}/keys | List a repository's keys -[**repo_list_pinned_issues**](RepositoryApi.md#repo_list_pinned_issues) | **GET** /repos/{owner}/{repo}/issues/pinned | List a repo's pinned issues -[**repo_list_pinned_pull_requests**](RepositoryApi.md#repo_list_pinned_pull_requests) | **GET** /repos/{owner}/{repo}/pulls/pinned | List a repo's pinned pull requests -[**repo_list_pull_requests**](RepositoryApi.md#repo_list_pull_requests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results. -[**repo_list_pull_reviews**](RepositoryApi.md#repo_list_pull_reviews) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews | List all reviews for a pull request -[**repo_list_push_mirrors**](RepositoryApi.md#repo_list_push_mirrors) | **GET** /repos/{owner}/{repo}/push_mirrors | Get all push mirrors of the repository -[**repo_list_release_attachments**](RepositoryApi.md#repo_list_release_attachments) | **GET** /repos/{owner}/{repo}/releases/{id}/assets | List release's attachments -[**repo_list_releases**](RepositoryApi.md#repo_list_releases) | **GET** /repos/{owner}/{repo}/releases | List a repo's releases -[**repo_list_stargazers**](RepositoryApi.md#repo_list_stargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers -[**repo_list_statuses**](RepositoryApi.md#repo_list_statuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses -[**repo_list_statuses_by_ref**](RepositoryApi.md#repo_list_statuses_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's statuses, by branch/tag/commit reference -[**repo_list_subscribers**](RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers -[**repo_list_tag_protection**](RepositoryApi.md#repo_list_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections | List tag protections for a repository -[**repo_list_tags**](RepositoryApi.md#repo_list_tags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags -[**repo_list_teams**](RepositoryApi.md#repo_list_teams) | **GET** /repos/{owner}/{repo}/teams | List a repository's teams -[**repo_list_topics**](RepositoryApi.md#repo_list_topics) | **GET** /repos/{owner}/{repo}/topics | Get list of topics that a repository has -[**repo_merge_pull_request**](RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request -[**repo_migrate**](RepositoryApi.md#repo_migrate) | **POST** /repos/migrate | Migrate a remote git repository -[**repo_mirror_sync**](RepositoryApi.md#repo_mirror_sync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository -[**repo_new_pin_allowed**](RepositoryApi.md#repo_new_pin_allowed) | **GET** /repos/{owner}/{repo}/new_pin_allowed | Returns if new Issue Pins are allowed -[**repo_pull_request_is_merged**](RepositoryApi.md#repo_pull_request_is_merged) | **GET** /repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged -[**repo_push_mirror_sync**](RepositoryApi.md#repo_push_mirror_sync) | **POST** /repos/{owner}/{repo}/push_mirrors-sync | Sync all push mirrored repository -[**repo_remove_note**](RepositoryApi.md#repo_remove_note) | **DELETE** /repos/{owner}/{repo}/git/notes/{sha} | Removes a note corresponding to a single commit from a repository -[**repo_replace_all_flags**](RepositoryApi.md#repo_replace_all_flags) | **PUT** /repos/{owner}/{repo}/flags | Replace all flags of a repository -[**repo_search**](RepositoryApi.md#repo_search) | **GET** /repos/search | Search for repositories -[**repo_search_run_jobs**](RepositoryApi.md#repo_search_run_jobs) | **GET** /repos/{owner}/{repo}/actions/runners/jobs | Search for repository's action jobs according filter conditions -[**repo_set_note**](RepositoryApi.md#repo_set_note) | **POST** /repos/{owner}/{repo}/git/notes/{sha} | Set a note corresponding to a single commit from a repository -[**repo_signing_key**](RepositoryApi.md#repo_signing_key) | **GET** /repos/{owner}/{repo}/signing-key.gpg | Get signing-key.gpg for given repository -[**repo_submit_pull_review**](RepositoryApi.md#repo_submit_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Submit a pending review to an pull request -[**repo_sync_fork_branch**](RepositoryApi.md#repo_sync_fork_branch) | **POST** /repos/{owner}/{repo}/sync_fork/{branch} | Syncs a fork branch with the base branch -[**repo_sync_fork_branch_info**](RepositoryApi.md#repo_sync_fork_branch_info) | **GET** /repos/{owner}/{repo}/sync_fork/{branch} | Gets information about syncing a fork branch with the base branch -[**repo_sync_fork_default**](RepositoryApi.md#repo_sync_fork_default) | **POST** /repos/{owner}/{repo}/sync_fork | Syncs the default branch of a fork with the base branch -[**repo_sync_fork_default_info**](RepositoryApi.md#repo_sync_fork_default_info) | **GET** /repos/{owner}/{repo}/sync_fork | Gets information about syncing the fork default branch with the base branch -[**repo_test_hook**](RepositoryApi.md#repo_test_hook) | **POST** /repos/{owner}/{repo}/hooks/{id}/tests | Test a push webhook -[**repo_tracked_times**](RepositoryApi.md#repo_tracked_times) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times -[**repo_transfer**](RepositoryApi.md#repo_transfer) | **POST** /repos/{owner}/{repo}/transfer | Transfer a repo ownership -[**repo_un_dismiss_pull_review**](RepositoryApi.md#repo_un_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals | Cancel to dismiss a review for a pull request -[**repo_update_avatar**](RepositoryApi.md#repo_update_avatar) | **POST** /repos/{owner}/{repo}/avatar | Update a repository's avatar -[**repo_update_branch**](RepositoryApi.md#repo_update_branch) | **PATCH** /repos/{owner}/{repo}/branches/{branch} | Update a branch -[**repo_update_file**](RepositoryApi.md#repo_update_file) | **PUT** /repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository -[**repo_update_pull_request**](RepositoryApi.md#repo_update_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/update | Merge PR's baseBranch into headBranch -[**repo_update_topics**](RepositoryApi.md#repo_update_topics) | **PUT** /repos/{owner}/{repo}/topics | Replace list of topics for a repository -[**repo_validate_issue_config**](RepositoryApi.md#repo_validate_issue_config) | **GET** /repos/{owner}/{repo}/issue_config/validate | Returns the validation information for a issue config -[**topic_search**](RepositoryApi.md#topic_search) | **GET** /topics/search | Search for topics by keyword -[**update_repo_secret**](RepositoryApi.md#update_repo_secret) | **PUT** /repos/{owner}/{repo}/actions/secrets/{secretname} | Create or Update a secret value in a repository -[**update_repo_variable**](RepositoryApi.md#update_repo_variable) | **PUT** /repos/{owner}/{repo}/actions/variables/{variablename} | Update a repo-level variable -[**user_current_check_subscription**](RepositoryApi.md#user_current_check_subscription) | **GET** /repos/{owner}/{repo}/subscription | Check if the current user is watching a repo -[**user_current_delete_subscription**](RepositoryApi.md#user_current_delete_subscription) | **DELETE** /repos/{owner}/{repo}/subscription | Unwatch a repo -[**user_current_put_subscription**](RepositoryApi.md#user_current_put_subscription) | **PUT** /repos/{owner}/{repo}/subscription | Watch a repo -[**user_tracked_times**](RepositoryApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo - - - -## accept_repo_transfer - -> models::Repository accept_repo_transfer(owner, repo) -Accept a repo transfer - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo to transfer | [required] | -**repo** | **String** | name of the repo to transfer | [required] | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## action_run - -> models::ActionRun action_run(owner, repo, run_id) -Get an action run - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**run_id** | **i64** | id of the action run | [required] | - -### Return type - -[**models::ActionRun**](ActionRun.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## create_current_user_repo - -> models::Repository create_current_user_repo(body) -Create a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**CreateRepoOption**](CreateRepoOption.md)> | | | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## create_fork - -> models::Repository create_fork(owner, repo, body) -Fork a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo to fork | [required] | -**repo** | **String** | name of the repo to fork | [required] | -**body** | Option<[**CreateForkOption**](CreateForkOption.md)> | | | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## create_repo_variable - -> create_repo_variable(owner, repo, variablename, body) -Create a repo-level variable - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | name of the owner | [required] | -**repo** | **String** | name of the repository | [required] | -**variablename** | **String** | name of the variable | [required] | -**body** | Option<[**CreateVariableOption**](CreateVariableOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## delete_repo_secret - -> delete_repo_secret(owner, repo, secretname) -Delete a secret in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repository | [required] | -**repo** | **String** | name of the repository | [required] | -**secretname** | **String** | name of the secret | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## delete_repo_variable - -> delete_repo_variable(owner, repo, variablename) -Delete a repo-level variable - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | name of the owner | [required] | -**repo** | **String** | name of the repository | [required] | -**variablename** | **String** | name of the variable | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## dispatch_workflow - -> models::DispatchWorkflowRun dispatch_workflow(owner, repo, workflowfilename, body) -Dispatches a workflow - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**workflowfilename** | **String** | name of the workflow | [required] | -**body** | Option<[**DispatchWorkflowOption**](DispatchWorkflowOption.md)> | | | - -### Return type - -[**models::DispatchWorkflowRun**](DispatchWorkflowRun.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## generate_repo - -> models::Repository generate_repo(template_owner, template_repo, body) -Create a repository using a template - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**template_owner** | **String** | name of the template repository owner | [required] | -**template_repo** | **String** | name of the template repository | [required] | -**body** | Option<[**GenerateRepoOption**](GenerateRepoOption.md)> | | | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_annotated_tag - -> models::AnnotatedTag get_annotated_tag(owner, repo, sha) -Gets the tag object of an annotated tag (not lightweight tags) - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | **String** | sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. | [required] | - -### Return type - -[**models::AnnotatedTag**](AnnotatedTag.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_blob - -> models::GitBlob get_blob(owner, repo, sha) -Gets the blob of a repository. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | **String** | sha of the blob to retrieve | [required] | - -### Return type - -[**models::GitBlob**](GitBlob.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_blobs - -> Vec get_blobs(owner, repo, shas) -Gets multiple blobs of a repository. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**shas** | **String** | a comma separated list of blob-sha (mind the overall URL-length limit of ~2,083 chars) | [required] | - -### Return type - -[**Vec**](GitBlob.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_repo_variable - -> models::ActionVariable get_repo_variable(owner, repo, variablename) -Get a repo-level variable - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | name of the owner | [required] | -**repo** | **String** | name of the repository | [required] | -**variablename** | **String** | name of the variable | [required] | - -### Return type - -[**models::ActionVariable**](ActionVariable.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_repo_variables_list - -> Vec get_repo_variables_list(owner, repo, page, limit) -Get repo-level variables list - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | name of the owner | [required] | -**repo** | **String** | name of the repository | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](ActionVariable.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_tree - -> models::GitTreeResponse get_tree(owner, repo, sha, recursive, page, per_page) -Gets the tree of a repository. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | **String** | sha of the commit | [required] | -**recursive** | Option<**bool**> | show all directories and files | | -**page** | Option<**i32**> | 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 | | -**per_page** | Option<**i32**> | number of items per page | | - -### Return type - -[**models::GitTreeResponse**](GitTreeResponse.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## list_action_runs - -> models::ListActionRunResponse list_action_runs(owner, repo, page, limit, event, status, run_number, head_sha) -List a repository's action runs - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results, default maximum page size is 50 | | -**event** | Option<[**Vec**](String.md)> | Returns workflow run triggered by the specified events. For example, `push`, `pull_request` or `workflow_dispatch`. | | -**status** | Option<[**Vec**](String.md)> | Returns workflow runs with the check run status or conclusion that is specified. For example, a conclusion can be success or a status can be in_progress. Only Forgejo Actions can set a status of waiting, pending, or requested. | | -**run_number** | Option<**i64**> | Returns the workflow run associated with the run number. | | -**head_sha** | Option<**String**> | Only returns workflow runs that are associated with the specified head_sha. | | - -### Return type - -[**models::ListActionRunResponse**](ListActionRunResponse.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## list_action_tasks - -> models::ActionTaskResponse list_action_tasks(owner, repo, page, limit) -List a repository's action tasks - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results, default maximum page size is 50 | | - -### Return type - -[**models::ActionTaskResponse**](ActionTaskResponse.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## list_forks - -> Vec list_forks(owner, repo, page, limit) -List a repository's forks - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## reject_repo_transfer - -> models::Repository reject_repo_transfer(owner, repo) -Reject a repo transfer - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo to transfer | [required] | -**repo** | **String** | name of the repo to transfer | [required] | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_add_collaborator - -> repo_add_collaborator(owner, repo, collaborator, body) -Add a collaborator to a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**collaborator** | **String** | username of the collaborator to add | [required] | -**body** | Option<[**AddCollaboratorOption**](AddCollaboratorOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_add_flag - -> repo_add_flag(owner, repo, flag) -Add a flag to a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**flag** | **String** | name of the flag | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_add_push_mirror - -> models::PushMirror repo_add_push_mirror(owner, repo, body) -Set up a new push mirror in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreatePushMirrorOption**](CreatePushMirrorOption.md)> | | | - -### Return type - -[**models::PushMirror**](PushMirror.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_add_team - -> repo_add_team(owner, repo, team) -Add a team to a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**team** | **String** | team name | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_add_topic - -> repo_add_topic(owner, repo, topic) -Add a topic to a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**topic** | **String** | name of the topic to add | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_apply_diff_patch - -> models::FileResponse repo_apply_diff_patch(owner, repo, body) -Apply diff patch to repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | [**UpdateFileOptions**](UpdateFileOptions.md) | | [required] | - -### Return type - -[**models::FileResponse**](FileResponse.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_cancel_scheduled_auto_merge - -> repo_cancel_scheduled_auto_merge(owner, repo, index) -Cancel the scheduled auto merge for the given pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request to merge | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_change_files - -> models::FilesResponse repo_change_files(owner, repo, body) -Modify multiple files in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | [**ChangeFilesOptions**](ChangeFilesOptions.md) | | [required] | - -### Return type - -[**models::FilesResponse**](FilesResponse.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_check_collaborator - -> repo_check_collaborator(owner, repo, collaborator) -Check if a user is a collaborator of a repository - -If the user is a collaborator, return 204. If the user is not a collaborator, return 404. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**collaborator** | **String** | username of the collaborator | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_check_flag - -> repo_check_flag(owner, repo, flag) -Check if a repository has a given flag - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**flag** | **String** | name of the flag | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_check_team - -> models::Team repo_check_team(owner, repo, team) -Check if a team is assigned to a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**team** | **String** | team name | [required] | - -### Return type - -[**models::Team**](Team.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_compare_diff - -> models::Compare repo_compare_diff(owner, repo, basehead) -Get commit comparison information - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**basehead** | **String** | compare two branches or commits | [required] | - -### Return type - -[**models::Compare**](Compare.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_convert - -> models::Repository repo_convert(owner, repo) -Convert a mirror repo to a normal repo. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo to convert | [required] | -**repo** | **String** | name of the repo to convert | [required] | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_branch - -> models::Branch repo_create_branch(owner, repo, body) -Create a branch - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreateBranchRepoOption**](CreateBranchRepoOption.md)> | | | - -### Return type - -[**models::Branch**](Branch.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_branch_protection - -> models::BranchProtection repo_create_branch_protection(owner, repo, body) -Create a branch protections for a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreateBranchProtectionOption**](CreateBranchProtectionOption.md)> | | | - -### Return type - -[**models::BranchProtection**](BranchProtection.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_file - -> models::FileResponse repo_create_file(owner, repo, filepath, body) -Create a file in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**filepath** | **String** | path of the file to create | [required] | -**body** | [**CreateFileOptions**](CreateFileOptions.md) | | [required] | - -### Return type - -[**models::FileResponse**](FileResponse.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_hook - -> models::Hook repo_create_hook(owner, repo, body) -Create a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreateHookOption**](CreateHookOption.md)> | | | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_key - -> models::DeployKey repo_create_key(owner, repo, body) -Add a key to a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreateKeyOption**](CreateKeyOption.md)> | | | - -### Return type - -[**models::DeployKey**](DeployKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_pull_request - -> models::PullRequest repo_create_pull_request(owner, repo, body) -Create a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreatePullRequestOption**](CreatePullRequestOption.md)> | | | - -### Return type - -[**models::PullRequest**](PullRequest.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_pull_review - -> models::PullReview repo_create_pull_review(owner, repo, index, body) -Create a review to an pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**body** | [**CreatePullReviewOptions**](CreatePullReviewOptions.md) | | [required] | - -### Return type - -[**models::PullReview**](PullReview.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_pull_review_comment - -> models::PullReviewComment repo_create_pull_review_comment(owner, repo, index, id, body) -Add a new comment to a pull request review - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**id** | **i64** | id of the review | [required] | -**body** | **models::CreatePullReviewComment** | | [required] | - -### Return type - -[**models::PullReviewComment**](PullReviewComment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_pull_review_requests - -> Vec repo_create_pull_review_requests(owner, repo, index, body) -Create review requests for a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**body** | [**PullReviewRequestOptions**](PullReviewRequestOptions.md) | | [required] | - -### Return type - -[**Vec**](PullReview.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_release - -> models::Release repo_create_release(owner, repo, body) -Create a release - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreateReleaseOption**](CreateReleaseOption.md)> | | | - -### Return type - -[**models::Release**](Release.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_release_attachment - -> models::Attachment repo_create_release_attachment(owner, repo, id, name, attachment, external_url) -Create a release attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the release | [required] | -**name** | Option<**String**> | name of the attachment | | -**attachment** | Option<**std::path::PathBuf**> | attachment to upload (this parameter is incompatible with `external_url`) | | -**external_url** | Option<**String**> | url to external asset (this parameter is incompatible with `attachment`) | | - -### Return type - -[**models::Attachment**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: multipart/form-data, application/octet-stream -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_status - -> models::CommitStatus repo_create_status(owner, repo, sha, body) -Create a commit status - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | **String** | sha of the commit | [required] | -**body** | Option<[**CreateStatusOption**](CreateStatusOption.md)> | | | - -### Return type - -[**models::CommitStatus**](CommitStatus.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_tag - -> models::Tag repo_create_tag(owner, repo, body) -Create a new git tag in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreateTagOption**](CreateTagOption.md)> | | | - -### Return type - -[**models::Tag**](Tag.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_tag_protection - -> models::TagProtection repo_create_tag_protection(owner, repo, body) -Create a tag protections for a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreateTagProtectionOption**](CreateTagProtectionOption.md)> | | | - -### Return type - -[**models::TagProtection**](TagProtection.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_create_wiki_page - -> models::WikiPage repo_create_wiki_page(owner, repo, body) -Create a wiki page - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**CreateWikiPageOptions**](CreateWikiPageOptions.md)> | | | - -### Return type - -[**models::WikiPage**](WikiPage.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete - -> repo_delete(owner, repo) -Delete a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo to delete | [required] | -**repo** | **String** | name of the repo to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_all_flags - -> repo_delete_all_flags(owner, repo) -Remove all flags from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_avatar - -> repo_delete_avatar(owner, repo) -Delete a repository's avatar - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_branch - -> repo_delete_branch(owner, repo, branch) -Delete a specific branch from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**branch** | **String** | branch to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_branch_protection - -> repo_delete_branch_protection(owner, repo, name) -Delete a specific branch protection for the repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**name** | **String** | name of protected branch | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_collaborator - -> repo_delete_collaborator(owner, repo, collaborator) -Delete a collaborator from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**collaborator** | **String** | username of the collaborator to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_file - -> models::FileDeleteResponse repo_delete_file(owner, repo, filepath, body) -Delete a file in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**filepath** | **String** | path of the file to delete | [required] | -**body** | [**DeleteFileOptions**](DeleteFileOptions.md) | | [required] | - -### Return type - -[**models::FileDeleteResponse**](FileDeleteResponse.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_flag - -> repo_delete_flag(owner, repo, flag) -Remove a flag from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**flag** | **String** | name of the flag | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_git_hook - -> repo_delete_git_hook(owner, repo, id) -Delete a Git hook in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **String** | id of the hook to get | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_hook - -> repo_delete_hook(owner, repo, id) -Delete a hook in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the hook to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_key - -> repo_delete_key(owner, repo, id) -Delete a key from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the key to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_pull_review - -> repo_delete_pull_review(owner, repo, index, id) -Delete a specific review from a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**id** | **i64** | id of the review | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_pull_review_comment - -> repo_delete_pull_review_comment(owner, repo, index, id, comment) -Delete a pull review comment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**id** | **i64** | id of the review | [required] | -**comment** | **i64** | id of the comment | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_pull_review_requests - -> repo_delete_pull_review_requests(owner, repo, index, body) -Cancel review requests for a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**body** | [**PullReviewRequestOptions**](PullReviewRequestOptions.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_push_mirror - -> repo_delete_push_mirror(owner, repo, name) -Remove a push mirror from a repository by remoteName - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**name** | **String** | remote name of the pushMirror | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_release - -> repo_delete_release(owner, repo, id) -Delete a release - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the release to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_release_attachment - -> repo_delete_release_attachment(owner, repo, id, attachment_id) -Delete a release attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the release | [required] | -**attachment_id** | **i64** | id of the attachment to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_release_by_tag - -> repo_delete_release_by_tag(owner, repo, tag) -Delete a release by tag name - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**tag** | **String** | tag name of the release to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_tag - -> repo_delete_tag(owner, repo, tag) -Delete a repository's tag by name - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**tag** | **String** | name of tag to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_tag_protection - -> repo_delete_tag_protection(owner, repo, id) -Delete a specific tag protection for the repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of protected tag | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_team - -> repo_delete_team(owner, repo, team) -Delete a team from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**team** | **String** | team name | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_topic - -> repo_delete_topic(owner, repo, topic) -Delete a topic from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**topic** | **String** | name of the topic to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_delete_wiki_page - -> repo_delete_wiki_page(owner, repo, page_name) -Delete a wiki page - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page_name** | **String** | name of the page | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_dismiss_pull_review - -> models::PullReview repo_dismiss_pull_review(owner, repo, index, id, body) -Dismiss a review for a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**id** | **i64** | id of the review | [required] | -**body** | [**DismissPullReviewOptions**](DismissPullReviewOptions.md) | | [required] | - -### Return type - -[**models::PullReview**](PullReview.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_download_commit_diff_or_patch - -> String repo_download_commit_diff_or_patch(owner, repo, sha, diff_type) -Get a commit's diff or patch - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | **String** | SHA of the commit to get | [required] | -**diff_type** | **String** | whether the output is diff or patch | [required] | - -### Return type - -**String** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/plain - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_download_pull_diff_or_patch - -> String repo_download_pull_diff_or_patch(owner, repo, index, diff_type, binary) -Get a pull request diff or patch - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request to get | [required] | -**diff_type** | **String** | whether the output is diff or patch | [required] | -**binary** | Option<**bool**> | whether to include binary file changes. if true, the diff is applicable with `git apply` | | - -### Return type - -**String** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/plain - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_edit - -> models::Repository repo_edit(owner, repo, body) -Edit a repository's properties. Only fields that are set will be changed. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo to edit | [required] | -**repo** | **String** | name of the repo to edit | [required] | -**body** | Option<[**EditRepoOption**](EditRepoOption.md)> | Properties of a repo that you can edit | | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_edit_branch_protection - -> models::BranchProtection repo_edit_branch_protection(owner, repo, name, body) -Edit a branch protections for a repository. Only fields that are set will be changed - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**name** | **String** | name of protected branch | [required] | -**body** | Option<[**EditBranchProtectionOption**](EditBranchProtectionOption.md)> | | | - -### Return type - -[**models::BranchProtection**](BranchProtection.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_edit_git_hook - -> models::GitHook repo_edit_git_hook(owner, repo, id, body) -Edit a Git hook in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **String** | id of the hook to get | [required] | -**body** | Option<[**EditGitHookOption**](EditGitHookOption.md)> | | | - -### Return type - -[**models::GitHook**](GitHook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_edit_hook - -> models::Hook repo_edit_hook(owner, repo, id, body) -Edit a hook in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | index of the hook | [required] | -**body** | Option<[**EditHookOption**](EditHookOption.md)> | | | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_edit_pull_request - -> models::PullRequest repo_edit_pull_request(owner, repo, index, body) -Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request to edit | [required] | -**body** | Option<[**EditPullRequestOption**](EditPullRequestOption.md)> | | | - -### Return type - -[**models::PullRequest**](PullRequest.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_edit_release - -> models::Release repo_edit_release(owner, repo, id, body) -Update a release - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the release to edit | [required] | -**body** | Option<[**EditReleaseOption**](EditReleaseOption.md)> | | | - -### Return type - -[**models::Release**](Release.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_edit_release_attachment - -> models::Attachment repo_edit_release_attachment(owner, repo, id, attachment_id, body) -Edit a release attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the release | [required] | -**attachment_id** | **i64** | id of the attachment to edit | [required] | -**body** | Option<[**EditAttachmentOptions**](EditAttachmentOptions.md)> | | | - -### Return type - -[**models::Attachment**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_edit_tag_protection - -> models::TagProtection repo_edit_tag_protection(owner, repo, id, body) -Edit a tag protections for a repository. Only fields that are set will be changed - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of protected tag | [required] | -**body** | Option<[**EditTagProtectionOption**](EditTagProtectionOption.md)> | | | - -### Return type - -[**models::TagProtection**](TagProtection.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_edit_wiki_page - -> models::WikiPage repo_edit_wiki_page(owner, repo, page_name, body) -Edit a wiki page - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page_name** | **String** | name of the page | [required] | -**body** | Option<[**CreateWikiPageOptions**](CreateWikiPageOptions.md)> | | | - -### Return type - -[**models::WikiPage**](WikiPage.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get - -> models::Repository repo_get(owner, repo) -Get a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_all_commits - -> Vec repo_get_all_commits(owner, repo, sha, path, stat, verification, files, page, limit, not) -Get a list of all commits from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | Option<**String**> | SHA or branch to start listing commits from (usually 'master') | | -**path** | Option<**String**> | filepath of a file/dir | | -**stat** | Option<**bool**> | include diff stats for every commit (disable for speedup, default 'true') | | -**verification** | Option<**bool**> | include verification for every commit (disable for speedup, default 'true') | | -**files** | Option<**bool**> | include a list of affected files for every commit (disable for speedup, default 'true') | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results (ignored if used with 'path') | | -**not** | Option<**String**> | commits that match the given specifier will not be listed. | | - -### Return type - -[**Vec**](Commit.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_archive - -> repo_get_archive(owner, repo, archive) -Get an archive of a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**archive** | **String** | the git reference for download with attached archive format (e.g. master.zip) | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/octet-stream, application/zip, application/gzip - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_assignees - -> Vec repo_get_assignees(owner, repo) -Return all users that have write access and can be assigned to issues - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_branch - -> models::Branch repo_get_branch(owner, repo, branch) -Retrieve a specific branch from a repository, including its effective branch protection - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**branch** | **String** | branch to get | [required] | - -### Return type - -[**models::Branch**](Branch.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_branch_protection - -> models::BranchProtection repo_get_branch_protection(owner, repo, name) -Get a specific branch protection for the repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**name** | **String** | name of protected branch | [required] | - -### Return type - -[**models::BranchProtection**](BranchProtection.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_by_id - -> models::Repository repo_get_by_id(id) -Get a repository by id - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the repo to get | [required] | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_combined_status_by_ref - -> models::CombinedStatus repo_get_combined_status_by_ref(owner, repo, r#ref, page, limit) -Get a commit's combined status, by branch/tag/commit reference - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**r#ref** | **String** | name of branch/tag/commit | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**models::CombinedStatus**](CombinedStatus.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_commit_pull_request - -> models::PullRequest repo_get_commit_pull_request(owner, repo, sha) -Get the pull request of the commit - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | **String** | SHA of the commit to get | [required] | - -### Return type - -[**models::PullRequest**](PullRequest.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_contents - -> models::ContentsResponse repo_get_contents(owner, repo, filepath, r#ref) -Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**filepath** | **String** | path of the dir, file, symlink or submodule in the repo | [required] | -**r#ref** | Option<**String**> | The name of the commit/branch/tag. Default the repository’s default branch (usually master) | | - -### Return type - -[**models::ContentsResponse**](ContentsResponse.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_contents_list - -> Vec repo_get_contents_list(owner, repo, r#ref) -Gets the metadata of all the entries of the root dir - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**r#ref** | Option<**String**> | The name of the commit/branch/tag. Default the repository’s default branch (usually master) | | - -### Return type - -[**Vec**](ContentsResponse.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_editor_config - -> std::collections::HashMap repo_get_editor_config(owner, repo, filepath, r#ref) -Get the EditorConfig definitions of a file in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**filepath** | **String** | filepath of file to get | [required] | -**r#ref** | Option<**String**> | The name of the commit/branch/tag. Default the repository’s default branch (usually master) | | - -### Return type - -**std::collections::HashMap** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_git_hook - -> models::GitHook repo_get_git_hook(owner, repo, id) -Get a Git hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **String** | id of the hook to get | [required] | - -### Return type - -[**models::GitHook**](GitHook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_hook - -> models::Hook repo_get_hook(owner, repo, id) -Get a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the hook to get | [required] | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_issue_config - -> models::IssueConfig repo_get_issue_config(owner, repo) -Returns the issue config for a repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**models::IssueConfig**](IssueConfig.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_issue_templates - -> Vec repo_get_issue_templates(owner, repo) -Get available issue templates for a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**Vec**](IssueTemplate.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_key - -> models::DeployKey repo_get_key(owner, repo, id) -Get a repository's key by id - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the key to get | [required] | - -### Return type - -[**models::DeployKey**](DeployKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_languages - -> std::collections::HashMap repo_get_languages(owner, repo) -Get languages and number of bytes of code written - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -**std::collections::HashMap** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_latest_release - -> models::Release repo_get_latest_release(owner, repo) -Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**models::Release**](Release.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_note - -> models::Note repo_get_note(owner, repo, sha, verification, files) -Get a note corresponding to a single commit from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | **String** | a git ref or commit sha | [required] | -**verification** | Option<**bool**> | include verification for every commit (disable for speedup, default 'true') | | -**files** | Option<**bool**> | include a list of affected files for every commit (disable for speedup, default 'true') | | - -### Return type - -[**models::Note**](Note.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_pull_request - -> models::PullRequest repo_get_pull_request(owner, repo, index) -Get a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request to get | [required] | - -### Return type - -[**models::PullRequest**](PullRequest.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_pull_request_by_base_head - -> models::PullRequest repo_get_pull_request_by_base_head(owner, repo, base, head) -Get a pull request by base and head - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**base** | **String** | base of the pull request to get | [required] | -**head** | **String** | head of the pull request to get | [required] | - -### Return type - -[**models::PullRequest**](PullRequest.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_pull_request_commits - -> Vec repo_get_pull_request_commits(owner, repo, index, page, limit, verification, files) -Get commits for a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request to get | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | -**verification** | Option<**bool**> | include verification for every commit (disable for speedup, default 'true') | | -**files** | Option<**bool**> | include a list of affected files for every commit (disable for speedup, default 'true') | | - -### Return type - -[**Vec**](Commit.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_pull_request_files - -> Vec repo_get_pull_request_files(owner, repo, index, skip_to, whitespace, page, limit) -Get changed files for a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request to get | [required] | -**skip_to** | Option<**String**> | skip to given file | | -**whitespace** | Option<**String**> | whitespace behavior | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](ChangedFile.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_pull_review - -> models::PullReview repo_get_pull_review(owner, repo, index, id) -Get a specific review for a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**id** | **i64** | id of the review | [required] | - -### Return type - -[**models::PullReview**](PullReview.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_pull_review_comment - -> models::PullReviewComment repo_get_pull_review_comment(owner, repo, index, id, comment) -Get a pull review comment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**id** | **i64** | id of the review | [required] | -**comment** | **i64** | id of the comment | [required] | - -### Return type - -[**models::PullReviewComment**](PullReviewComment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_pull_review_comments - -> Vec repo_get_pull_review_comments(owner, repo, index, id) -Get a specific review for a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**id** | **i64** | id of the review | [required] | - -### Return type - -[**Vec**](PullReviewComment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_push_mirror_by_remote_name - -> models::PushMirror repo_get_push_mirror_by_remote_name(owner, repo, name) -Get push mirror of the repository by remoteName - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**name** | **String** | remote name of push mirror | [required] | - -### Return type - -[**models::PushMirror**](PushMirror.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_raw_file - -> std::path::PathBuf repo_get_raw_file(owner, repo, filepath, r#ref) -Get a file from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**filepath** | **String** | filepath of the file to get | [required] | -**r#ref** | Option<**String**> | The name of the commit/branch/tag. Default the repository’s default branch (usually master) | | - -### Return type - -[**std::path::PathBuf**](std::path::PathBuf.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/octet-stream - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_raw_file_or_lfs - -> std::path::PathBuf repo_get_raw_file_or_lfs(owner, repo, filepath, r#ref) -Get a file or it's LFS object from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**filepath** | **String** | filepath of the file to get | [required] | -**r#ref** | Option<**String**> | The name of the commit/branch/tag. Default the repository’s default branch (usually master) | | - -### Return type - -[**std::path::PathBuf**](std::path::PathBuf.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/octet-stream - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_release - -> models::Release repo_get_release(owner, repo, id) -Get a release - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the release to get | [required] | - -### Return type - -[**models::Release**](Release.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_release_attachment - -> models::Attachment repo_get_release_attachment(owner, repo, id, attachment_id) -Get a release attachment - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the release | [required] | -**attachment_id** | **i64** | id of the attachment to get | [required] | - -### Return type - -[**models::Attachment**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_release_by_tag - -> models::Release repo_get_release_by_tag(owner, repo, tag) -Get a release by tag name - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**tag** | **String** | tag name of the release to get | [required] | - -### Return type - -[**models::Release**](Release.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_repo_permissions - -> models::RepoCollaboratorPermission repo_get_repo_permissions(owner, repo, collaborator) -Get repository permissions for a user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**collaborator** | **String** | username of the collaborator | [required] | - -### Return type - -[**models::RepoCollaboratorPermission**](RepoCollaboratorPermission.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_reviewers - -> Vec repo_get_reviewers(owner, repo) -Return all users that can be requested to review in this repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_runner_registration_token - -> models::RegistrationToken repo_get_runner_registration_token(owner, repo) -Get a repository's actions runner registration token - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**models::RegistrationToken**](RegistrationToken.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_single_commit - -> models::Commit repo_get_single_commit(owner, repo, sha, stat, verification, files) -Get a single commit from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | **String** | a git ref or commit sha | [required] | -**stat** | Option<**bool**> | include diff stats for every commit (disable for speedup, default 'true') | | -**verification** | Option<**bool**> | include verification for every commit (disable for speedup, default 'true') | | -**files** | Option<**bool**> | include a list of affected files for every commit (disable for speedup, default 'true') | | - -### Return type - -[**models::Commit**](Commit.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_tag - -> models::Tag repo_get_tag(owner, repo, tag) -Get the tag of a repository by tag name - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**tag** | **String** | name of tag | [required] | - -### Return type - -[**models::Tag**](Tag.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_tag_protection - -> models::TagProtection repo_get_tag_protection(owner, repo, id) -Get a specific tag protection for the repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the tag protect to get | [required] | - -### Return type - -[**models::TagProtection**](TagProtection.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_wiki_page - -> models::WikiPage repo_get_wiki_page(owner, repo, page_name) -Get a wiki page - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page_name** | **String** | name of the page | [required] | - -### Return type - -[**models::WikiPage**](WikiPage.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_wiki_page_revisions - -> models::WikiCommitList repo_get_wiki_page_revisions(owner, repo, page_name, page) -Get revisions of a wiki page - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page_name** | **String** | name of the page | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | - -### Return type - -[**models::WikiCommitList**](WikiCommitList.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_get_wiki_pages - -> Vec repo_get_wiki_pages(owner, repo, page, limit) -Get all wiki pages - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](WikiPageMetaData.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_actions_secrets - -> Vec repo_list_actions_secrets(owner, repo, page, limit) -List an repo's actions secrets - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repository | [required] | -**repo** | **String** | name of the repository | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Secret.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_activity_feeds - -> Vec repo_list_activity_feeds(owner, repo, date, page, limit) -List a repository's activity feeds - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**date** | Option<**String**> | the date of the activities to be found | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Activity.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_all_git_refs - -> Vec repo_list_all_git_refs(owner, repo) -Get specified ref or filtered repository's refs - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**Vec**](Reference.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_branch_protection - -> Vec repo_list_branch_protection(owner, repo) -List branch protections for a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**Vec**](BranchProtection.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_branches - -> Vec repo_list_branches(owner, repo, page, limit) -List a repository's branches - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Branch.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_collaborators - -> Vec repo_list_collaborators(owner, repo, page, limit) -List a repository's collaborators - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_flags - -> Vec repo_list_flags(owner, repo) -List a repository's flags - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -**Vec** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_git_hooks - -> Vec repo_list_git_hooks(owner, repo) -List the Git hooks in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**Vec**](GitHook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_git_refs - -> Vec repo_list_git_refs(owner, repo, r#ref) -Get specified ref or filtered repository's refs - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**r#ref** | **String** | part or full name of the ref | [required] | - -### Return type - -[**Vec**](Reference.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_hooks - -> Vec repo_list_hooks(owner, repo, page, limit) -List the hooks in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_keys - -> Vec repo_list_keys(owner, repo, key_id, fingerprint, page, limit) -List a repository's keys - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**key_id** | Option<**i32**> | the key_id to search for | | -**fingerprint** | Option<**String**> | fingerprint of the key | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](DeployKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_pinned_issues - -> Vec repo_list_pinned_issues(owner, repo) -List a repo's pinned issues - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**Vec**](Issue.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_pinned_pull_requests - -> Vec repo_list_pinned_pull_requests(owner, repo) -List a repo's pinned pull requests - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**Vec**](PullRequest.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_pull_requests - -> Vec repo_list_pull_requests(owner, repo, state, sort, milestone, labels, poster, page, limit) -List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | Owner of the repo | [required] | -**repo** | **String** | Name of the repo | [required] | -**state** | Option<**String**> | State of pull request | |[default to open] -**sort** | Option<**String**> | Type of sort | | -**milestone** | Option<**i64**> | ID of the milestone | | -**labels** | Option<[**Vec**](I64.md)> | Label IDs | | -**poster** | Option<**String**> | Filter by pull request author | | -**page** | Option<**i32**> | Page number of results to return (1-based) | |[default to 1] -**limit** | Option<**i32**> | Page size of results | | - -### Return type - -[**Vec**](PullRequest.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_pull_reviews - -> Vec repo_list_pull_reviews(owner, repo, index, page, limit) -List all reviews for a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](PullReview.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_push_mirrors - -> Vec repo_list_push_mirrors(owner, repo, page, limit) -Get all push mirrors of the repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](PushMirror.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_release_attachments - -> Vec repo_list_release_attachments(owner, repo, id) -List release's attachments - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the release | [required] | - -### Return type - -[**Vec**](Attachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_releases - -> Vec repo_list_releases(owner, repo, draft, pre_release, q, page, limit) -List a repo's releases - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**draft** | Option<**bool**> | filter (exclude / include) drafts, if you dont have repo write access none will show | | -**pre_release** | Option<**bool**> | filter (exclude / include) pre-releases | | -**q** | Option<**String**> | Search string | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Release.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_stargazers - -> Vec repo_list_stargazers(owner, repo, page, limit) -List a repo's stargazers - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_statuses - -> Vec repo_list_statuses(owner, repo, sha, sort, state, page, limit) -Get a commit's statuses - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | **String** | sha of the commit | [required] | -**sort** | Option<**String**> | type of sort | | -**state** | Option<**String**> | type of state | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](CommitStatus.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_statuses_by_ref - -> Vec repo_list_statuses_by_ref(owner, repo, r#ref, sort, state, page, limit) -Get a commit's statuses, by branch/tag/commit reference - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**r#ref** | **String** | name of branch/tag/commit | [required] | -**sort** | Option<**String**> | type of sort | | -**state** | Option<**String**> | type of state | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](CommitStatus.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_subscribers - -> Vec repo_list_subscribers(owner, repo, page, limit) -List a repo's watchers - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_tag_protection - -> Vec repo_list_tag_protection(owner, repo) -List tag protections for a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**Vec**](TagProtection.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_tags - -> Vec repo_list_tags(owner, repo, page, limit) -List a repository's tags - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results, default maximum page size is 50 | | - -### Return type - -[**Vec**](Tag.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_teams - -> Vec repo_list_teams(owner, repo) -List a repository's teams - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**Vec**](Team.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_list_topics - -> models::TopicName repo_list_topics(owner, repo, page, limit) -Get list of topics that a repository has - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**models::TopicName**](TopicName.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_merge_pull_request - -> repo_merge_pull_request(owner, repo, index, body) -Merge a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request to merge | [required] | -**body** | Option<[**MergePullRequestOption**](MergePullRequestOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_migrate - -> models::Repository repo_migrate(body) -Migrate a remote git repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**MigrateRepoOptions**](MigrateRepoOptions.md)> | | | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_mirror_sync - -> repo_mirror_sync(owner, repo) -Sync a mirrored repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo to sync | [required] | -**repo** | **String** | name of the repo to sync | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_new_pin_allowed - -> models::NewIssuePinsAllowed repo_new_pin_allowed(owner, repo) -Returns if new Issue Pins are allowed - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**models::NewIssuePinsAllowed**](NewIssuePinsAllowed.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_pull_request_is_merged - -> repo_pull_request_is_merged(owner, repo, index) -Check if a pull request has been merged - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_push_mirror_sync - -> repo_push_mirror_sync(owner, repo) -Sync all push mirrored repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo to sync | [required] | -**repo** | **String** | name of the repo to sync | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_remove_note - -> repo_remove_note(owner, repo, sha) -Removes a note corresponding to a single commit from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | **String** | a git ref or commit sha | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_replace_all_flags - -> repo_replace_all_flags(owner, repo, body) -Replace all flags of a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**ReplaceFlagsOption**](ReplaceFlagsOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_search - -> models::SearchResults repo_search(q, topic, include_desc, uid, priority_owner_id, team_id, starred_by, private, is_private, template, archived, mode, exclusive, sort, order, page, limit) -Search for repositories - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**q** | Option<**String**> | keyword | | -**topic** | Option<**bool**> | Limit search to repositories with keyword as topic | | -**include_desc** | Option<**bool**> | include search of keyword within repository description | | -**uid** | Option<**i64**> | search only for repos that the user with the given id owns or contributes to | | -**priority_owner_id** | Option<**i64**> | repo owner to prioritize in the results | | -**team_id** | Option<**i64**> | search only for repos that belong to the given team id | | -**starred_by** | Option<**i64**> | search only for repos that the user with the given id has starred | | -**private** | Option<**bool**> | include private repositories this user has access to (defaults to true) | | -**is_private** | Option<**bool**> | show only public, private or all repositories (defaults to all) | | -**template** | Option<**bool**> | include template repositories this user has access to (defaults to true) | | -**archived** | Option<**bool**> | show only archived, non-archived or all repositories (defaults to all) | | -**mode** | Option<**String**> | type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" | | -**exclusive** | Option<**bool**> | if `uid` is given, search only for repos that the user owns | | -**sort** | Option<**String**> | sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" and \"id\". Default is \"alpha\" | | -**order** | Option<**String**> | sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**models::SearchResults**](SearchResults.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_search_run_jobs - -> Vec repo_search_run_jobs(owner, repo, labels) -Search for repository's action jobs according filter conditions - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**labels** | Option<**String**> | a comma separated list of run job labels to search for | | - -### Return type - -[**Vec**](ActionRunJob.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_set_note - -> models::Note repo_set_note(owner, repo, sha, body) -Set a note corresponding to a single commit from a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**sha** | **String** | a git ref or commit sha | [required] | -**body** | Option<[**NoteOptions**](NoteOptions.md)> | | | - -### Return type - -[**models::Note**](Note.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_signing_key - -> String repo_signing_key(owner, repo) -Get signing-key.gpg for given repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -**String** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/plain - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_submit_pull_review - -> models::PullReview repo_submit_pull_review(owner, repo, index, id, body) -Submit a pending review to an pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**id** | **i64** | id of the review | [required] | -**body** | [**SubmitPullReviewOptions**](SubmitPullReviewOptions.md) | | [required] | - -### Return type - -[**models::PullReview**](PullReview.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_sync_fork_branch - -> repo_sync_fork_branch(owner, repo, branch) -Syncs a fork branch with the base branch - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**branch** | **String** | The branch | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_sync_fork_branch_info - -> models::SyncForkInfo repo_sync_fork_branch_info(owner, repo, branch) -Gets information about syncing a fork branch with the base branch - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**branch** | **String** | The branch | [required] | - -### Return type - -[**models::SyncForkInfo**](SyncForkInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_sync_fork_default - -> repo_sync_fork_default(owner, repo) -Syncs the default branch of a fork with the base branch - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_sync_fork_default_info - -> models::SyncForkInfo repo_sync_fork_default_info(owner, repo) -Gets information about syncing the fork default branch with the base branch - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**models::SyncForkInfo**](SyncForkInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_test_hook - -> repo_test_hook(owner, repo, id, r#ref) -Test a push webhook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**id** | **i64** | id of the hook to test | [required] | -**r#ref** | Option<**String**> | The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload. | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_tracked_times - -> Vec repo_tracked_times(owner, repo, user, since, before, page, limit) -List a repo's tracked times - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**user** | Option<**String**> | optional filter by user (available for issue managers) | | -**since** | Option<**String**> | Only show times updated after the given time. This is a timestamp in RFC 3339 format | | -**before** | Option<**String**> | Only show times updated before the given time. This is a timestamp in RFC 3339 format | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](TrackedTime.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_transfer - -> models::Repository repo_transfer(owner, repo, body) -Transfer a repo ownership - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo to transfer | [required] | -**repo** | **String** | name of the repo to transfer | [required] | -**body** | [**TransferRepoOption**](TransferRepoOption.md) | Transfer Options | [required] | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_un_dismiss_pull_review - -> models::PullReview repo_un_dismiss_pull_review(owner, repo, index, id) -Cancel to dismiss a review for a pull request - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request | [required] | -**id** | **i64** | id of the review | [required] | - -### Return type - -[**models::PullReview**](PullReview.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_update_avatar - -> repo_update_avatar(owner, repo, body) -Update a repository's avatar - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**UpdateRepoAvatarOption**](UpdateRepoAvatarOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_update_branch - -> repo_update_branch(owner, repo, branch, body) -Update a branch - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**branch** | **String** | name of the branch | [required] | -**body** | Option<[**UpdateBranchRepoOption**](UpdateBranchRepoOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_update_file - -> models::FileResponse repo_update_file(owner, repo, filepath, body) -Update a file in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**filepath** | **String** | path of the file to update | [required] | -**body** | [**UpdateFileOptions**](UpdateFileOptions.md) | | [required] | - -### Return type - -[**models::FileResponse**](FileResponse.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_update_pull_request - -> repo_update_pull_request(owner, repo, index, style) -Merge PR's baseBranch into headBranch - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**index** | **i64** | index of the pull request to get | [required] | -**style** | Option<**String**> | how to update pull request | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_update_topics - -> repo_update_topics(owner, repo, body) -Replace list of topics for a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**body** | Option<[**RepoTopicOptions**](RepoTopicOptions.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## repo_validate_issue_config - -> models::IssueConfigValidation repo_validate_issue_config(owner, repo) -Returns the validation information for a issue config - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**models::IssueConfigValidation**](IssueConfigValidation.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## topic_search - -> models::TopicSearchResults topic_search(q, page, limit) -Search for topics by keyword - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**q** | **String** | keyword to search for | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**models::TopicSearchResults**](TopicSearchResults.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## update_repo_secret - -> update_repo_secret(owner, repo, secretname, body) -Create or Update a secret value in a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repository | [required] | -**repo** | **String** | name of the repository | [required] | -**secretname** | **String** | name of the secret | [required] | -**body** | Option<[**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## update_repo_variable - -> update_repo_variable(owner, repo, variablename, body) -Update a repo-level variable - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | name of the owner | [required] | -**repo** | **String** | name of the repository | [required] | -**variablename** | **String** | name of the variable | [required] | -**body** | Option<[**UpdateVariableOption**](UpdateVariableOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_check_subscription - -> models::WatchInfo user_current_check_subscription(owner, repo) -Check if the current user is watching a repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**models::WatchInfo**](WatchInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_delete_subscription - -> user_current_delete_subscription(owner, repo) -Unwatch a repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_put_subscription - -> models::WatchInfo user_current_put_subscription(owner, repo) -Watch a repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - -[**models::WatchInfo**](WatchInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_tracked_times - -> Vec user_tracked_times(owner, repo, user) -List a user's tracked times in a repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | -**user** | **String** | username of user | [required] | - -### Return type - -[**Vec**](TrackedTime.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/forgejo-openapi/docs/RepositoryMeta.md b/forgejo-openapi/docs/RepositoryMeta.md deleted file mode 100644 index 58daa18..0000000 --- a/forgejo-openapi/docs/RepositoryMeta.md +++ /dev/null @@ -1,14 +0,0 @@ -# RepositoryMeta - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**full_name** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**name** | Option<**String**> | | [optional] -**owner** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/SearchResults.md b/forgejo-openapi/docs/SearchResults.md deleted file mode 100644 index 4642d2e..0000000 --- a/forgejo-openapi/docs/SearchResults.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchResults - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | Option<[**Vec**](Repository.md)> | | [optional] -**ok** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Secret.md b/forgejo-openapi/docs/Secret.md deleted file mode 100644 index b5bcf73..0000000 --- a/forgejo-openapi/docs/Secret.md +++ /dev/null @@ -1,12 +0,0 @@ -# Secret - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | Option<**String**> | | [optional] -**name** | Option<**String**> | the secret's name | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/ServerVersion.md b/forgejo-openapi/docs/ServerVersion.md deleted file mode 100644 index 96ba26f..0000000 --- a/forgejo-openapi/docs/ServerVersion.md +++ /dev/null @@ -1,11 +0,0 @@ -# ServerVersion - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/SetUserQuotaGroupsOptions.md b/forgejo-openapi/docs/SetUserQuotaGroupsOptions.md deleted file mode 100644 index c0d385c..0000000 --- a/forgejo-openapi/docs/SetUserQuotaGroupsOptions.md +++ /dev/null @@ -1,11 +0,0 @@ -# SetUserQuotaGroupsOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**groups** | **Vec** | Quota groups the user shall have | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/SettingsApi.md b/forgejo-openapi/docs/SettingsApi.md deleted file mode 100644 index ae75b02..0000000 --- a/forgejo-openapi/docs/SettingsApi.md +++ /dev/null @@ -1,112 +0,0 @@ -# \SettingsApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_general_api_settings**](SettingsApi.md#get_general_api_settings) | **GET** /settings/api | Get instance's global settings for api -[**get_general_attachment_settings**](SettingsApi.md#get_general_attachment_settings) | **GET** /settings/attachment | Get instance's global settings for Attachment -[**get_general_repository_settings**](SettingsApi.md#get_general_repository_settings) | **GET** /settings/repository | Get instance's global settings for repositories -[**get_general_ui_settings**](SettingsApi.md#get_general_ui_settings) | **GET** /settings/ui | Get instance's global settings for ui - - - -## get_general_api_settings - -> models::GeneralApiSettings get_general_api_settings() -Get instance's global settings for api - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::GeneralApiSettings**](GeneralAPISettings.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_general_attachment_settings - -> models::GeneralAttachmentSettings get_general_attachment_settings() -Get instance's global settings for Attachment - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::GeneralAttachmentSettings**](GeneralAttachmentSettings.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_general_repository_settings - -> models::GeneralRepoSettings get_general_repository_settings() -Get instance's global settings for repositories - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::GeneralRepoSettings**](GeneralRepoSettings.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_general_ui_settings - -> models::GeneralUiSettings get_general_ui_settings() -Get instance's global settings for ui - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::GeneralUiSettings**](GeneralUISettings.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/forgejo-openapi/docs/StopWatch.md b/forgejo-openapi/docs/StopWatch.md deleted file mode 100644 index fb0b10b..0000000 --- a/forgejo-openapi/docs/StopWatch.md +++ /dev/null @@ -1,17 +0,0 @@ -# StopWatch - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created** | Option<**String**> | | [optional] -**duration** | Option<**String**> | | [optional] -**issue_index** | Option<**i64**> | | [optional] -**issue_title** | Option<**String**> | | [optional] -**repo_name** | Option<**String**> | | [optional] -**repo_owner_name** | Option<**String**> | | [optional] -**seconds** | Option<**i64**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/SubmitPullReviewOptions.md b/forgejo-openapi/docs/SubmitPullReviewOptions.md deleted file mode 100644 index 2be076a..0000000 --- a/forgejo-openapi/docs/SubmitPullReviewOptions.md +++ /dev/null @@ -1,12 +0,0 @@ -# SubmitPullReviewOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**body** | Option<**String**> | | [optional] -**event** | Option<**String**> | ReviewStateType review state type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/SyncForkInfo.md b/forgejo-openapi/docs/SyncForkInfo.md deleted file mode 100644 index c98acd4..0000000 --- a/forgejo-openapi/docs/SyncForkInfo.md +++ /dev/null @@ -1,14 +0,0 @@ -# SyncForkInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allowed** | Option<**bool**> | | [optional] -**base_commit** | Option<**String**> | | [optional] -**commits_behind** | Option<**i64**> | | [optional] -**fork_commit** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Tag.md b/forgejo-openapi/docs/Tag.md deleted file mode 100644 index 2af8d24..0000000 --- a/forgejo-openapi/docs/Tag.md +++ /dev/null @@ -1,17 +0,0 @@ -# Tag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**archive_download_count** | Option<[**models::TagArchiveDownloadCount**](TagArchiveDownloadCount.md)> | | [optional] -**commit** | Option<[**models::CommitMeta**](CommitMeta.md)> | | [optional] -**id** | Option<**String**> | | [optional] -**message** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**tarball_url** | Option<**String**> | | [optional] -**zipball_url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/TagArchiveDownloadCount.md b/forgejo-openapi/docs/TagArchiveDownloadCount.md deleted file mode 100644 index 747d81e..0000000 --- a/forgejo-openapi/docs/TagArchiveDownloadCount.md +++ /dev/null @@ -1,12 +0,0 @@ -# TagArchiveDownloadCount - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tar_gz** | Option<**i64**> | | [optional] -**zip** | Option<**i64**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/TagProtection.md b/forgejo-openapi/docs/TagProtection.md deleted file mode 100644 index 338bc8d..0000000 --- a/forgejo-openapi/docs/TagProtection.md +++ /dev/null @@ -1,16 +0,0 @@ -# TagProtection - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**name_pattern** | Option<**String**> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**whitelist_teams** | Option<**Vec**> | | [optional] -**whitelist_usernames** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/Team.md b/forgejo-openapi/docs/Team.md deleted file mode 100644 index 2b58c74..0000000 --- a/forgejo-openapi/docs/Team.md +++ /dev/null @@ -1,19 +0,0 @@ -# Team - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**can_create_org_repo** | Option<**bool**> | | [optional] -**description** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**includes_all_repositories** | Option<**bool**> | | [optional] -**name** | Option<**String**> | | [optional] -**organization** | Option<[**models::Organization**](Organization.md)> | | [optional] -**permission** | Option<**Permission**> | (enum: none, read, write, admin, owner) | [optional] -**units** | Option<**Vec**> | | [optional] -**units_map** | Option<**std::collections::HashMap**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/TeamSearchResults.md b/forgejo-openapi/docs/TeamSearchResults.md deleted file mode 100644 index 13aa258..0000000 --- a/forgejo-openapi/docs/TeamSearchResults.md +++ /dev/null @@ -1,12 +0,0 @@ -# TeamSearchResults - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | Option<[**Vec**](Team.md)> | | [optional] -**ok** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/TimelineComment.md b/forgejo-openapi/docs/TimelineComment.md deleted file mode 100644 index 908d4bc..0000000 --- a/forgejo-openapi/docs/TimelineComment.md +++ /dev/null @@ -1,39 +0,0 @@ -# TimelineComment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assignee** | Option<[**models::User**](User.md)> | | [optional] -**assignee_team** | Option<[**models::Team**](Team.md)> | | [optional] -**body** | Option<**String**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**dependent_issue** | Option<[**models::Issue**](Issue.md)> | | [optional] -**html_url** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**issue_url** | Option<**String**> | | [optional] -**label** | Option<[**models::Label**](Label.md)> | | [optional] -**milestone** | Option<[**models::Milestone**](Milestone.md)> | | [optional] -**new_ref** | Option<**String**> | | [optional] -**new_title** | Option<**String**> | | [optional] -**old_milestone** | Option<[**models::Milestone**](Milestone.md)> | | [optional] -**old_project_id** | Option<**i64**> | | [optional] -**old_ref** | Option<**String**> | | [optional] -**old_title** | Option<**String**> | | [optional] -**project_id** | Option<**i64**> | | [optional] -**pull_request_url** | Option<**String**> | | [optional] -**ref_action** | Option<**String**> | | [optional] -**ref_comment** | Option<[**models::Comment**](Comment.md)> | | [optional] -**ref_commit_sha** | Option<**String**> | commit SHA where issue/PR was referenced | [optional] -**ref_issue** | Option<[**models::Issue**](Issue.md)> | | [optional] -**removed_assignee** | Option<**bool**> | whether the assignees were removed or added | [optional] -**resolve_doer** | Option<[**models::User**](User.md)> | | [optional] -**review_id** | Option<**i64**> | | [optional] -**tracked_time** | Option<[**models::TrackedTime**](TrackedTime.md)> | | [optional] -**r#type** | Option<**String**> | | [optional] -**updated_at** | Option<**String**> | | [optional] -**user** | Option<[**models::User**](User.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/TopicName.md b/forgejo-openapi/docs/TopicName.md deleted file mode 100644 index 8a07731..0000000 --- a/forgejo-openapi/docs/TopicName.md +++ /dev/null @@ -1,11 +0,0 @@ -# TopicName - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**topics** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/TopicResponse.md b/forgejo-openapi/docs/TopicResponse.md deleted file mode 100644 index e018c94..0000000 --- a/forgejo-openapi/docs/TopicResponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# TopicResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**repo_count** | Option<**i64**> | | [optional] -**topic_name** | Option<**String**> | | [optional] -**updated** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/TopicSearchResults.md b/forgejo-openapi/docs/TopicSearchResults.md deleted file mode 100644 index 9640e72..0000000 --- a/forgejo-openapi/docs/TopicSearchResults.md +++ /dev/null @@ -1,11 +0,0 @@ -# TopicSearchResults - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**topics** | Option<[**Vec**](TopicResponse.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/TrackedTime.md b/forgejo-openapi/docs/TrackedTime.md deleted file mode 100644 index 91f638d..0000000 --- a/forgejo-openapi/docs/TrackedTime.md +++ /dev/null @@ -1,17 +0,0 @@ -# TrackedTime - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**issue** | Option<[**models::Issue**](Issue.md)> | | [optional] -**issue_id** | Option<**i64**> | deprecated (only for backwards compatibility) | [optional] -**time** | Option<**i64**> | Time in seconds | [optional] -**user_id** | Option<**i64**> | deprecated (only for backwards compatibility) | [optional] -**user_name** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/TransferRepoOption.md b/forgejo-openapi/docs/TransferRepoOption.md deleted file mode 100644 index 04b5f3e..0000000 --- a/forgejo-openapi/docs/TransferRepoOption.md +++ /dev/null @@ -1,12 +0,0 @@ -# TransferRepoOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**new_owner** | **String** | | -**team_ids** | Option<**Vec**> | ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/UpdateBranchRepoOption.md b/forgejo-openapi/docs/UpdateBranchRepoOption.md deleted file mode 100644 index c1712e4..0000000 --- a/forgejo-openapi/docs/UpdateBranchRepoOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateBranchRepoOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | New branch name | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/UpdateFileOptions.md b/forgejo-openapi/docs/UpdateFileOptions.md deleted file mode 100644 index 9d5435b..0000000 --- a/forgejo-openapi/docs/UpdateFileOptions.md +++ /dev/null @@ -1,20 +0,0 @@ -# UpdateFileOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**author** | Option<[**models::Identity**](Identity.md)> | | [optional] -**branch** | Option<**String**> | branch (optional) to base this file from. if not given, the default branch is used | [optional] -**committer** | Option<[**models::Identity**](Identity.md)> | | [optional] -**content** | **String** | content must be base64 encoded | -**dates** | Option<[**models::CommitDateOptions**](CommitDateOptions.md)> | | [optional] -**from_path** | Option<**String**> | from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL | [optional] -**message** | Option<**String**> | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] -**new_branch** | Option<**String**> | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] -**sha** | **String** | sha is the SHA for the file that already exists | -**signoff** | Option<**bool**> | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/UpdateRepoAvatarOption.md b/forgejo-openapi/docs/UpdateRepoAvatarOption.md deleted file mode 100644 index 88eebc3..0000000 --- a/forgejo-openapi/docs/UpdateRepoAvatarOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateRepoAvatarOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**image** | Option<**String**> | image must be base64 encoded | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/UpdateUserAvatarOption.md b/forgejo-openapi/docs/UpdateUserAvatarOption.md deleted file mode 100644 index b0cb064..0000000 --- a/forgejo-openapi/docs/UpdateUserAvatarOption.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateUserAvatarOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**image** | Option<**String**> | image must be base64 encoded | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/UpdateVariableOption.md b/forgejo-openapi/docs/UpdateVariableOption.md deleted file mode 100644 index 4f12f4b..0000000 --- a/forgejo-openapi/docs/UpdateVariableOption.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateVariableOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | Option<**String**> | New name for the variable. If the field is empty, the variable name won't be updated. | [optional] -**value** | **String** | Value of the variable to update | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/User.md b/forgejo-openapi/docs/User.md deleted file mode 100644 index a843717..0000000 --- a/forgejo-openapi/docs/User.md +++ /dev/null @@ -1,33 +0,0 @@ -# User - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active** | Option<**bool**> | Is user active | [optional] -**avatar_url** | Option<**String**> | URL to the user's avatar | [optional] -**created** | Option<**String**> | | [optional] -**description** | Option<**String**> | the user's description | [optional] -**email** | Option<**String**> | | [optional] -**followers_count** | Option<**i64**> | user counts | [optional] -**following_count** | Option<**i64**> | | [optional] -**full_name** | Option<**String**> | the user's full name | [optional] -**html_url** | Option<**String**> | URL to the user's profile page | [optional] -**id** | Option<**i64**> | the user's id | [optional] -**is_admin** | Option<**bool**> | Is the user an administrator | [optional] -**language** | Option<**String**> | User locale | [optional] -**last_login** | Option<**String**> | | [optional] -**location** | Option<**String**> | the user's location | [optional] -**login** | Option<**String**> | the user's username | [optional] -**login_name** | Option<**String**> | the user's authentication sign-in name. | [optional][default to empty] -**prohibit_login** | Option<**bool**> | Is user login prohibited | [optional] -**pronouns** | Option<**String**> | the user's pronouns | [optional] -**restricted** | Option<**bool**> | Is user restricted | [optional] -**source_id** | Option<**i64**> | The ID of the user's Authentication Source | [optional] -**starred_repos_count** | Option<**i64**> | | [optional] -**visibility** | Option<**String**> | User visibility level option: public, limited, private | [optional] -**website** | Option<**String**> | the user's website | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/UserApi.md b/forgejo-openapi/docs/UserApi.md deleted file mode 100644 index edf07c6..0000000 --- a/forgejo-openapi/docs/UserApi.md +++ /dev/null @@ -1,2219 +0,0 @@ -# \UserApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_current_user_repo**](UserApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository -[**create_user_variable**](UserApi.md#create_user_variable) | **POST** /user/actions/variables/{variablename} | Create a user-level variable -[**delete_user_secret**](UserApi.md#delete_user_secret) | **DELETE** /user/actions/secrets/{secretname} | Delete a secret in a user scope -[**delete_user_variable**](UserApi.md#delete_user_variable) | **DELETE** /user/actions/variables/{variablename} | Delete a user-level variable which is created by current doer -[**get_user_settings**](UserApi.md#get_user_settings) | **GET** /user/settings | Get current user's account settings -[**get_user_variable**](UserApi.md#get_user_variable) | **GET** /user/actions/variables/{variablename} | Get a user-level variable which is created by current doer -[**get_user_variables_list**](UserApi.md#get_user_variables_list) | **GET** /user/actions/variables | Get the user-level list of variables which is created by current doer -[**get_verification_token**](UserApi.md#get_verification_token) | **GET** /user/gpg_key_token | Get a Token to verify -[**update_user_secret**](UserApi.md#update_user_secret) | **PUT** /user/actions/secrets/{secretname} | Create or Update a secret value in a user scope -[**update_user_settings**](UserApi.md#update_user_settings) | **PATCH** /user/settings | Update settings in current user's account -[**update_user_variable**](UserApi.md#update_user_variable) | **PUT** /user/actions/variables/{variablename} | Update a user-level variable which is created by current doer -[**user_add_email**](UserApi.md#user_add_email) | **POST** /user/emails | Add an email addresses to the current user's account -[**user_block_user**](UserApi.md#user_block_user) | **PUT** /user/block/{username} | Blocks a user from the doer -[**user_check_following**](UserApi.md#user_check_following) | **GET** /users/{username}/following/{target} | Check if one user is following another user -[**user_check_quota**](UserApi.md#user_check_quota) | **GET** /user/quota/check | Check if the authenticated user is over quota for a given subject -[**user_create_hook**](UserApi.md#user_create_hook) | **POST** /user/hooks | Create a hook -[**user_create_o_auth2_application**](UserApi.md#user_create_o_auth2_application) | **POST** /user/applications/oauth2 | Creates a new OAuth2 application -[**user_create_token**](UserApi.md#user_create_token) | **POST** /users/{username}/tokens | Generate an access token for the specified user -[**user_current_check_following**](UserApi.md#user_current_check_following) | **GET** /user/following/{username} | Check whether a user is followed by the authenticated user -[**user_current_check_starring**](UserApi.md#user_current_check_starring) | **GET** /user/starred/{owner}/{repo} | Whether the authenticated is starring the repo -[**user_current_delete_follow**](UserApi.md#user_current_delete_follow) | **DELETE** /user/following/{username} | Unfollow a user -[**user_current_delete_gpg_key**](UserApi.md#user_current_delete_gpg_key) | **DELETE** /user/gpg_keys/{id} | Remove a GPG public key from current user's account -[**user_current_delete_key**](UserApi.md#user_current_delete_key) | **DELETE** /user/keys/{id} | Delete a public key -[**user_current_delete_star**](UserApi.md#user_current_delete_star) | **DELETE** /user/starred/{owner}/{repo} | Unstar the given repo -[**user_current_get_gpg_key**](UserApi.md#user_current_get_gpg_key) | **GET** /user/gpg_keys/{id} | Get a GPG key -[**user_current_get_key**](UserApi.md#user_current_get_key) | **GET** /user/keys/{id} | Get a public key -[**user_current_list_followers**](UserApi.md#user_current_list_followers) | **GET** /user/followers | List the authenticated user's followers -[**user_current_list_following**](UserApi.md#user_current_list_following) | **GET** /user/following | List the users that the authenticated user is following -[**user_current_list_gpg_keys**](UserApi.md#user_current_list_gpg_keys) | **GET** /user/gpg_keys | List the authenticated user's GPG keys -[**user_current_list_keys**](UserApi.md#user_current_list_keys) | **GET** /user/keys | List the authenticated user's public keys -[**user_current_list_repos**](UserApi.md#user_current_list_repos) | **GET** /user/repos | List the repos that the authenticated user owns -[**user_current_list_starred**](UserApi.md#user_current_list_starred) | **GET** /user/starred | The repos that the authenticated user has starred -[**user_current_list_subscriptions**](UserApi.md#user_current_list_subscriptions) | **GET** /user/subscriptions | List repositories watched by the authenticated user -[**user_current_post_gpg_key**](UserApi.md#user_current_post_gpg_key) | **POST** /user/gpg_keys | Add a GPG public key to current user's account -[**user_current_post_key**](UserApi.md#user_current_post_key) | **POST** /user/keys | Create a public key -[**user_current_put_follow**](UserApi.md#user_current_put_follow) | **PUT** /user/following/{username} | Follow a user -[**user_current_put_star**](UserApi.md#user_current_put_star) | **PUT** /user/starred/{owner}/{repo} | Star the given repo -[**user_current_tracked_times**](UserApi.md#user_current_tracked_times) | **GET** /user/times | List the current user's tracked times -[**user_delete_access_token**](UserApi.md#user_delete_access_token) | **DELETE** /users/{username}/tokens/{token} | Delete an access token from the specified user's account -[**user_delete_avatar**](UserApi.md#user_delete_avatar) | **DELETE** /user/avatar | Delete avatar of the current user. It will be replaced by a default one -[**user_delete_email**](UserApi.md#user_delete_email) | **DELETE** /user/emails | Delete email addresses from the current user's account -[**user_delete_hook**](UserApi.md#user_delete_hook) | **DELETE** /user/hooks/{id} | Delete a hook -[**user_delete_o_auth2_application**](UserApi.md#user_delete_o_auth2_application) | **DELETE** /user/applications/oauth2/{id} | Delete an OAuth2 application -[**user_edit_hook**](UserApi.md#user_edit_hook) | **PATCH** /user/hooks/{id} | Update a hook -[**user_get**](UserApi.md#user_get) | **GET** /users/{username} | Get a user -[**user_get_current**](UserApi.md#user_get_current) | **GET** /user | Get the authenticated user -[**user_get_heatmap_data**](UserApi.md#user_get_heatmap_data) | **GET** /users/{username}/heatmap | Get a user's heatmap -[**user_get_hook**](UserApi.md#user_get_hook) | **GET** /user/hooks/{id} | Get a hook -[**user_get_o_auth2_application**](UserApi.md#user_get_o_auth2_application) | **GET** /user/applications/oauth2/{id} | Get an OAuth2 application -[**user_get_o_auth2_applications**](UserApi.md#user_get_o_auth2_applications) | **GET** /user/applications/oauth2 | List the authenticated user's oauth2 applications -[**user_get_quota**](UserApi.md#user_get_quota) | **GET** /user/quota | Get quota information for the authenticated user -[**user_get_runner_registration_token**](UserApi.md#user_get_runner_registration_token) | **GET** /user/actions/runners/registration-token | Get an user's actions runner registration token -[**user_get_stop_watches**](UserApi.md#user_get_stop_watches) | **GET** /user/stopwatches | Get list of all existing stopwatches -[**user_get_tokens**](UserApi.md#user_get_tokens) | **GET** /users/{username}/tokens | List the specified user's access tokens -[**user_list_activity_feeds**](UserApi.md#user_list_activity_feeds) | **GET** /users/{username}/activities/feeds | List a user's activity feeds -[**user_list_blocked_users**](UserApi.md#user_list_blocked_users) | **GET** /user/list_blocked | List the authenticated user's blocked users -[**user_list_emails**](UserApi.md#user_list_emails) | **GET** /user/emails | List all email addresses of the current user -[**user_list_followers**](UserApi.md#user_list_followers) | **GET** /users/{username}/followers | List the given user's followers -[**user_list_following**](UserApi.md#user_list_following) | **GET** /users/{username}/following | List the users that the given user is following -[**user_list_gpg_keys**](UserApi.md#user_list_gpg_keys) | **GET** /users/{username}/gpg_keys | List the given user's GPG keys -[**user_list_hooks**](UserApi.md#user_list_hooks) | **GET** /user/hooks | List the authenticated user's webhooks -[**user_list_keys**](UserApi.md#user_list_keys) | **GET** /users/{username}/keys | List the given user's public keys -[**user_list_quota_artifacts**](UserApi.md#user_list_quota_artifacts) | **GET** /user/quota/artifacts | List the artifacts affecting the authenticated user's quota -[**user_list_quota_attachments**](UserApi.md#user_list_quota_attachments) | **GET** /user/quota/attachments | List the attachments affecting the authenticated user's quota -[**user_list_quota_packages**](UserApi.md#user_list_quota_packages) | **GET** /user/quota/packages | List the packages affecting the authenticated user's quota -[**user_list_repos**](UserApi.md#user_list_repos) | **GET** /users/{username}/repos | List the repos owned by the given user -[**user_list_starred**](UserApi.md#user_list_starred) | **GET** /users/{username}/starred | The repos that the given user has starred -[**user_list_subscriptions**](UserApi.md#user_list_subscriptions) | **GET** /users/{username}/subscriptions | List the repositories watched by a user -[**user_list_teams**](UserApi.md#user_list_teams) | **GET** /user/teams | List all the teams a user belongs to -[**user_search**](UserApi.md#user_search) | **GET** /users/search | Search for users -[**user_search_run_jobs**](UserApi.md#user_search_run_jobs) | **GET** /user/actions/runners/jobs | Search for user's action jobs according filter conditions -[**user_unblock_user**](UserApi.md#user_unblock_user) | **PUT** /user/unblock/{username} | Unblocks a user from the doer -[**user_update_avatar**](UserApi.md#user_update_avatar) | **POST** /user/avatar | Update avatar of the current user -[**user_update_o_auth2_application**](UserApi.md#user_update_o_auth2_application) | **PATCH** /user/applications/oauth2/{id} | Update an OAuth2 application, this includes regenerating the client secret -[**user_verify_gpg_key**](UserApi.md#user_verify_gpg_key) | **POST** /user/gpg_key_verify | Verify a GPG key - - - -## create_current_user_repo - -> models::Repository create_current_user_repo(body) -Create a repository - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**CreateRepoOption**](CreateRepoOption.md)> | | | - -### Return type - -[**models::Repository**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## create_user_variable - -> create_user_variable(variablename, body) -Create a user-level variable - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**variablename** | **String** | name of the variable | [required] | -**body** | Option<[**CreateVariableOption**](CreateVariableOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## delete_user_secret - -> delete_user_secret(secretname) -Delete a secret in a user scope - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**secretname** | **String** | name of the secret | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## delete_user_variable - -> delete_user_variable(variablename) -Delete a user-level variable which is created by current doer - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**variablename** | **String** | name of the variable | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_user_settings - -> models::UserSettings get_user_settings() -Get current user's account settings - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::UserSettings**](UserSettings.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_user_variable - -> models::ActionVariable get_user_variable(variablename) -Get a user-level variable which is created by current doer - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**variablename** | **String** | name of the variable | [required] | - -### Return type - -[**models::ActionVariable**](ActionVariable.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_user_variables_list - -> Vec get_user_variables_list(page, limit) -Get the user-level list of variables which is created by current doer - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](ActionVariable.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## get_verification_token - -> String get_verification_token() -Get a Token to verify - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**String** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/plain - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## update_user_secret - -> update_user_secret(secretname, body) -Create or Update a secret value in a user scope - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**secretname** | **String** | name of the secret | [required] | -**body** | Option<[**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## update_user_settings - -> models::UserSettings update_user_settings(body) -Update settings in current user's account - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**UserSettingsOptions**](UserSettingsOptions.md)> | | | - -### Return type - -[**models::UserSettings**](UserSettings.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## update_user_variable - -> update_user_variable(variablename, body) -Update a user-level variable which is created by current doer - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**variablename** | **String** | name of the variable | [required] | -**body** | Option<[**UpdateVariableOption**](UpdateVariableOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_add_email - -> Vec user_add_email(body) -Add an email addresses to the current user's account - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**CreateEmailOption**](CreateEmailOption.md)> | | | - -### Return type - -[**Vec**](Email.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_block_user - -> user_block_user(username) -Blocks a user from the doer - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of the user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_check_following - -> user_check_following(username, target) -Check if one user is following another user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of following user | [required] | -**target** | **String** | username of followed user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_check_quota - -> bool user_check_quota(subject) -Check if the authenticated user is over quota for a given subject - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**subject** | **String** | subject of the quota | [required] | - -### Return type - -**bool** - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_create_hook - -> models::Hook user_create_hook(body) -Create a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**CreateHookOption**](CreateHookOption.md) | | [required] | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_create_o_auth2_application - -> models::OAuth2Application user_create_o_auth2_application(body) -Creates a new OAuth2 application - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**CreateOAuth2ApplicationOptions**](CreateOAuth2ApplicationOptions.md) | | [required] | - -### Return type - -[**models::OAuth2Application**](OAuth2Application.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_create_token - -> models::AccessToken user_create_token(username, body) -Generate an access token for the specified user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**body** | Option<[**CreateAccessTokenOption**](CreateAccessTokenOption.md)> | | | - -### Return type - -[**models::AccessToken**](AccessToken.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_check_following - -> user_current_check_following(username) -Check whether a user is followed by the authenticated user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of followed user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_check_starring - -> user_current_check_starring(owner, repo) -Whether the authenticated is starring the repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo | [required] | -**repo** | **String** | name of the repo | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_delete_follow - -> user_current_delete_follow(username) -Unfollow a user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user to unfollow | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_delete_gpg_key - -> user_current_delete_gpg_key(id) -Remove a GPG public key from current user's account - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of key to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_delete_key - -> user_current_delete_key(id) -Delete a public key - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of key to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_delete_star - -> user_current_delete_star(owner, repo) -Unstar the given repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo to unstar | [required] | -**repo** | **String** | name of the repo to unstar | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_get_gpg_key - -> models::GpgKey user_current_get_gpg_key(id) -Get a GPG key - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of key to get | [required] | - -### Return type - -[**models::GpgKey**](GPGKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_get_key - -> models::PublicKey user_current_get_key(id) -Get a public key - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of key to get | [required] | - -### Return type - -[**models::PublicKey**](PublicKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_list_followers - -> Vec user_current_list_followers(page, limit) -List the authenticated user's followers - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_list_following - -> Vec user_current_list_following(page, limit) -List the users that the authenticated user is following - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_list_gpg_keys - -> Vec user_current_list_gpg_keys(page, limit) -List the authenticated user's GPG keys - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](GPGKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_list_keys - -> Vec user_current_list_keys(fingerprint, page, limit) -List the authenticated user's public keys - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**fingerprint** | Option<**String**> | fingerprint of the key | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](PublicKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_list_repos - -> Vec user_current_list_repos(page, limit, order_by) -List the repos that the authenticated user owns - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | -**order_by** | Option<**String**> | order the repositories | | - -### Return type - -[**Vec**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_list_starred - -> Vec user_current_list_starred(page, limit) -The repos that the authenticated user has starred - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_list_subscriptions - -> Vec user_current_list_subscriptions(page, limit) -List repositories watched by the authenticated user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_post_gpg_key - -> models::GpgKey user_current_post_gpg_key(form) -Add a GPG public key to current user's account - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**form** | Option<[**CreateGpgKeyOption**](CreateGpgKeyOption.md)> | | | - -### Return type - -[**models::GpgKey**](GPGKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_post_key - -> models::PublicKey user_current_post_key(body) -Create a public key - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**CreateKeyOption**](CreateKeyOption.md)> | | | - -### Return type - -[**models::PublicKey**](PublicKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_put_follow - -> user_current_put_follow(username) -Follow a user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user to follow | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_put_star - -> user_current_put_star(owner, repo) -Star the given repo - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**owner** | **String** | owner of the repo to star | [required] | -**repo** | **String** | name of the repo to star | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_current_tracked_times - -> Vec user_current_tracked_times(page, limit, since, before) -List the current user's tracked times - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | -**since** | Option<**String**> | Only show times updated after the given time. This is a timestamp in RFC 3339 format | | -**before** | Option<**String**> | Only show times updated before the given time. This is a timestamp in RFC 3339 format | | - -### Return type - -[**Vec**](TrackedTime.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_delete_access_token - -> user_delete_access_token(username, token) -Delete an access token from the specified user's account - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**token** | **String** | token to be deleted, identified by ID and if not available by name | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_delete_avatar - -> user_delete_avatar() -Delete avatar of the current user. It will be replaced by a default one - -### Parameters - -This endpoint does not need any parameter. - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_delete_email - -> user_delete_email(body) -Delete email addresses from the current user's account - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**DeleteEmailOption**](DeleteEmailOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_delete_hook - -> user_delete_hook(id) -Delete a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the hook to delete | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_delete_o_auth2_application - -> user_delete_o_auth2_application(id) -Delete an OAuth2 application - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | token to be deleted | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_edit_hook - -> models::Hook user_edit_hook(id, body) -Update a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the hook to update | [required] | -**body** | Option<[**EditHookOption**](EditHookOption.md)> | | | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_get - -> models::User user_get(username) -Get a user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user to get | [required] | - -### Return type - -[**models::User**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_get_current - -> models::User user_get_current() -Get the authenticated user - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::User**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_get_heatmap_data - -> Vec user_get_heatmap_data(username) -Get a user's heatmap - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user to get | [required] | - -### Return type - -[**Vec**](UserHeatmapData.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_get_hook - -> models::Hook user_get_hook(id) -Get a hook - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | id of the hook to get | [required] | - -### Return type - -[**models::Hook**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_get_o_auth2_application - -> models::OAuth2Application user_get_o_auth2_application(id) -Get an OAuth2 application - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | Application ID to be found | [required] | - -### Return type - -[**models::OAuth2Application**](OAuth2Application.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_get_o_auth2_applications - -> Vec user_get_o_auth2_applications(page, limit) -List the authenticated user's oauth2 applications - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](OAuth2Application.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_get_quota - -> models::QuotaInfo user_get_quota() -Get quota information for the authenticated user - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::QuotaInfo**](QuotaInfo.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_get_runner_registration_token - -> models::RegistrationToken user_get_runner_registration_token() -Get an user's actions runner registration token - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::RegistrationToken**](RegistrationToken.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_get_stop_watches - -> Vec user_get_stop_watches(page, limit) -Get list of all existing stopwatches - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](StopWatch.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_get_tokens - -> Vec user_get_tokens(username, page, limit) -List the specified user's access tokens - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](AccessToken.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_activity_feeds - -> Vec user_list_activity_feeds(username, only_performed_by, date, page, limit) -List a user's activity feeds - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**only_performed_by** | Option<**bool**> | if true, only show actions performed by the requested user | | -**date** | Option<**String**> | the date of the activities to be found | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Activity.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_blocked_users - -> Vec user_list_blocked_users(page, limit) -List the authenticated user's blocked users - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](BlockedUser.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_emails - -> Vec user_list_emails() -List all email addresses of the current user - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Vec**](Email.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_followers - -> Vec user_list_followers(username, page, limit) -List the given user's followers - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_following - -> Vec user_list_following(username, page, limit) -List the users that the given user is following - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](User.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_gpg_keys - -> Vec user_list_gpg_keys(username, page, limit) -List the given user's GPG keys - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](GPGKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_hooks - -> Vec user_list_hooks(page, limit) -List the authenticated user's webhooks - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Hook.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_keys - -> Vec user_list_keys(username, fingerprint, page, limit) -List the given user's public keys - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**fingerprint** | Option<**String**> | fingerprint of the key | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](PublicKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_quota_artifacts - -> Vec user_list_quota_artifacts(page, limit) -List the artifacts affecting the authenticated user's quota - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](QuotaUsedArtifact.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_quota_attachments - -> Vec user_list_quota_attachments(page, limit) -List the attachments affecting the authenticated user's quota - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](QuotaUsedAttachment.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_quota_packages - -> Vec user_list_quota_packages(page, limit) -List the packages affecting the authenticated user's quota - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](QuotaUsedPackage.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_repos - -> Vec user_list_repos(username, page, limit) -List the repos owned by the given user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_starred - -> Vec user_list_starred(username, page, limit) -The repos that the given user has starred - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of user | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_subscriptions - -> Vec user_list_subscriptions(username, page, limit) -List the repositories watched by a user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of the user | [required] | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Repository.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_list_teams - -> Vec user_list_teams(page, limit) -List all the teams a user belongs to - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**Vec**](Team.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_search - -> models::UserSearchResults user_search(q, uid, sort, page, limit) -Search for users - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**q** | Option<**String**> | keyword | | -**uid** | Option<**i64**> | ID of the user to search for | | -**sort** | Option<**String**> | sort order of results | | -**page** | Option<**i32**> | page number of results to return (1-based) | | -**limit** | Option<**i32**> | page size of results | | - -### Return type - -[**models::UserSearchResults**](UserSearchResults.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_search_run_jobs - -> Vec user_search_run_jobs(labels) -Search for user's action jobs according filter conditions - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**labels** | Option<**String**> | a comma separated list of run job labels to search for | | - -### Return type - -[**Vec**](ActionRunJob.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_unblock_user - -> user_unblock_user(username) -Unblocks a user from the doer - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | username of the user | [required] | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_update_avatar - -> user_update_avatar(body) -Update avatar of the current user - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**UpdateUserAvatarOption**](UpdateUserAvatarOption.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_update_o_auth2_application - -> models::OAuth2Application user_update_o_auth2_application(id, body) -Update an OAuth2 application, this includes regenerating the client secret - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **i64** | application to be updated | [required] | -**body** | [**CreateOAuth2ApplicationOptions**](CreateOAuth2ApplicationOptions.md) | | [required] | - -### Return type - -[**models::OAuth2Application**](OAuth2Application.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json, text/plain -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## user_verify_gpg_key - -> models::GpgKey user_verify_gpg_key(body) -Verify a GPG key - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**VerifyGpgKeyOption**](VerifyGpgKeyOption.md)> | | | - -### Return type - -[**models::GpgKey**](GPGKey.md) - -### Authorization - -[TOTPHeader](../README.md#TOTPHeader), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [SudoHeader](../README.md#SudoHeader), [BasicAuth](../README.md#BasicAuth), [AccessToken](../README.md#AccessToken), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/forgejo-openapi/docs/UserHeatmapData.md b/forgejo-openapi/docs/UserHeatmapData.md deleted file mode 100644 index 8ad2caa..0000000 --- a/forgejo-openapi/docs/UserHeatmapData.md +++ /dev/null @@ -1,12 +0,0 @@ -# UserHeatmapData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contributions** | Option<**i64**> | | [optional] -**timestamp** | Option<**i64**> | TimeStamp defines a timestamp | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/UserSearchResults.md b/forgejo-openapi/docs/UserSearchResults.md deleted file mode 100644 index 770d3e2..0000000 --- a/forgejo-openapi/docs/UserSearchResults.md +++ /dev/null @@ -1,12 +0,0 @@ -# UserSearchResults - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | Option<[**Vec**](User.md)> | | [optional] -**ok** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/UserSettings.md b/forgejo-openapi/docs/UserSettings.md deleted file mode 100644 index ae25b01..0000000 --- a/forgejo-openapi/docs/UserSettings.md +++ /dev/null @@ -1,22 +0,0 @@ -# UserSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | | [optional] -**diff_view_style** | Option<**String**> | | [optional] -**enable_repo_unit_hints** | Option<**bool**> | | [optional] -**full_name** | Option<**String**> | | [optional] -**hide_activity** | Option<**bool**> | | [optional] -**hide_email** | Option<**bool**> | Privacy | [optional] -**hide_pronouns** | Option<**bool**> | | [optional] -**language** | Option<**String**> | | [optional] -**location** | Option<**String**> | | [optional] -**pronouns** | Option<**String**> | | [optional] -**theme** | Option<**String**> | | [optional] -**website** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/UserSettingsOptions.md b/forgejo-openapi/docs/UserSettingsOptions.md deleted file mode 100644 index 2e4a2ef..0000000 --- a/forgejo-openapi/docs/UserSettingsOptions.md +++ /dev/null @@ -1,22 +0,0 @@ -# UserSettingsOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | | [optional] -**diff_view_style** | Option<**String**> | | [optional] -**enable_repo_unit_hints** | Option<**bool**> | | [optional] -**full_name** | Option<**String**> | | [optional] -**hide_activity** | Option<**bool**> | | [optional] -**hide_email** | Option<**bool**> | Privacy | [optional] -**hide_pronouns** | Option<**bool**> | | [optional] -**language** | Option<**String**> | | [optional] -**location** | Option<**String**> | | [optional] -**pronouns** | Option<**String**> | | [optional] -**theme** | Option<**String**> | | [optional] -**website** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/VerifyGpgKeyOption.md b/forgejo-openapi/docs/VerifyGpgKeyOption.md deleted file mode 100644 index d33d33a..0000000 --- a/forgejo-openapi/docs/VerifyGpgKeyOption.md +++ /dev/null @@ -1,12 +0,0 @@ -# VerifyGpgKeyOption - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**armored_signature** | Option<**String**> | | [optional] -**key_id** | **String** | An Signature for a GPG key token | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/WatchInfo.md b/forgejo-openapi/docs/WatchInfo.md deleted file mode 100644 index 988862e..0000000 --- a/forgejo-openapi/docs/WatchInfo.md +++ /dev/null @@ -1,16 +0,0 @@ -# WatchInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | Option<**String**> | | [optional] -**ignored** | Option<**bool**> | | [optional] -**reason** | Option<**serde_json::Value**> | | [optional] -**repository_url** | Option<**String**> | | [optional] -**subscribed** | Option<**bool**> | | [optional] -**url** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/WikiCommit.md b/forgejo-openapi/docs/WikiCommit.md deleted file mode 100644 index ca978b8..0000000 --- a/forgejo-openapi/docs/WikiCommit.md +++ /dev/null @@ -1,14 +0,0 @@ -# WikiCommit - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**author** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] -**commiter** | Option<[**models::CommitUser**](CommitUser.md)> | | [optional] -**message** | Option<**String**> | | [optional] -**sha** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/WikiCommitList.md b/forgejo-openapi/docs/WikiCommitList.md deleted file mode 100644 index 409e2d9..0000000 --- a/forgejo-openapi/docs/WikiCommitList.md +++ /dev/null @@ -1,12 +0,0 @@ -# WikiCommitList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commits** | Option<[**Vec**](WikiCommit.md)> | | [optional] -**count** | Option<**i64**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/WikiPage.md b/forgejo-openapi/docs/WikiPage.md deleted file mode 100644 index 43d3296..0000000 --- a/forgejo-openapi/docs/WikiPage.md +++ /dev/null @@ -1,18 +0,0 @@ -# WikiPage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commit_count** | Option<**i64**> | | [optional] -**content_base64** | Option<**String**> | Page content, base64 encoded | [optional] -**footer** | Option<**String**> | | [optional] -**html_url** | Option<**String**> | | [optional] -**last_commit** | Option<[**models::WikiCommit**](WikiCommit.md)> | | [optional] -**sidebar** | Option<**String**> | | [optional] -**sub_url** | Option<**String**> | | [optional] -**title** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/docs/WikiPageMetaData.md b/forgejo-openapi/docs/WikiPageMetaData.md deleted file mode 100644 index 47c5806..0000000 --- a/forgejo-openapi/docs/WikiPageMetaData.md +++ /dev/null @@ -1,14 +0,0 @@ -# WikiPageMetaData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**html_url** | Option<**String**> | | [optional] -**last_commit** | Option<[**models::WikiCommit**](WikiCommit.md)> | | [optional] -**sub_url** | Option<**String**> | | [optional] -**title** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/forgejo-openapi/git_push.sh b/forgejo-openapi/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/forgejo-openapi/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/forgejo-openapi/src/apis/activitypub_api.rs b/forgejo-openapi/src/apis/activitypub_api.rs deleted file mode 100644 index 1700177..0000000 --- a/forgejo-openapi/src/apis/activitypub_api.rs +++ /dev/null @@ -1,1135 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use super::{configuration, ContentType, Error}; -use crate::{apis::ResponseContent, models}; -use reqwest; -use serde::{de::Error as _, Deserialize, Serialize}; - -/// struct for typed errors of method [`activitypub_instance_actor`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActivitypubInstanceActorError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`activitypub_instance_actor_inbox`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActivitypubInstanceActorInboxError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`activitypub_instance_actor_outbox`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActivitypubInstanceActorOutboxError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`activitypub_person`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActivitypubPersonError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`activitypub_person_activity`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActivitypubPersonActivityError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`activitypub_person_activity_note`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActivitypubPersonActivityNoteError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`activitypub_person_feed`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActivitypubPersonFeedError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`activitypub_person_inbox`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActivitypubPersonInboxError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`activitypub_repository`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActivitypubRepositoryError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`activitypub_repository_inbox`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActivitypubRepositoryInboxError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`activitypub_repository_outbox`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActivitypubRepositoryOutboxError { - UnknownValue(serde_json::Value), -} - -pub async fn activitypub_instance_actor( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/activitypub/actor", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivityPub`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivityPub`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn activitypub_instance_actor_inbox( - configuration: &configuration::Configuration, -) -> Result<(), Error> { - let uri_str = format!("{}/activitypub/actor/inbox", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn activitypub_instance_actor_outbox( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/activitypub/actor/outbox", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn activitypub_person( - configuration: &configuration::Configuration, - user_id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_user_id = user_id; - - let uri_str = format!( - "{}/activitypub/user-id/{user_id}", - configuration.base_path, - user_id = p_path_user_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivityPub`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivityPub`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn activitypub_person_activity( - configuration: &configuration::Configuration, - user_id: i32, - activity_id: i32, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_user_id = user_id; - let p_path_activity_id = activity_id; - - let uri_str = format!( - "{}/activitypub/user-id/{user_id}/activities/{activity_id}/activity", - configuration.base_path, - user_id = p_path_user_id, - activity_id = p_path_activity_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivityPub`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivityPub`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn activitypub_person_activity_note( - configuration: &configuration::Configuration, - user_id: i32, - activity_id: i32, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_user_id = user_id; - let p_path_activity_id = activity_id; - - let uri_str = format!( - "{}/activitypub/user-id/{user_id}/activities/{activity_id}", - configuration.base_path, - user_id = p_path_user_id, - activity_id = p_path_activity_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivityPub`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivityPub`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn activitypub_person_feed( - configuration: &configuration::Configuration, - user_id: i32, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_user_id = user_id; - - let uri_str = format!( - "{}/activitypub/user-id/{user_id}/outbox", - configuration.base_path, - user_id = p_path_user_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn activitypub_person_inbox( - configuration: &configuration::Configuration, - user_id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_user_id = user_id; - - let uri_str = format!( - "{}/activitypub/user-id/{user_id}/inbox", - configuration.base_path, - user_id = p_path_user_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn activitypub_repository( - configuration: &configuration::Configuration, - repository_id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_repository_id = repository_id; - - let uri_str = format!( - "{}/activitypub/repository-id/{repository_id}", - configuration.base_path, - repository_id = p_path_repository_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActivityPub`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActivityPub`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn activitypub_repository_inbox( - configuration: &configuration::Configuration, - repository_id: i64, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_repository_id = repository_id; - let p_body_body = body; - - let uri_str = format!( - "{}/activitypub/repository-id/{repository_id}/inbox", - configuration.base_path, - repository_id = p_path_repository_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn activitypub_repository_outbox( - configuration: &configuration::Configuration, - repository_id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_repository_id = repository_id; - - let uri_str = format!( - "{}/activitypub/repository-id/{repository_id}/outbox", - configuration.base_path, - repository_id = p_path_repository_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} diff --git a/forgejo-openapi/src/apis/admin_api.rs b/forgejo-openapi/src/apis/admin_api.rs deleted file mode 100644 index 30be5f2..0000000 --- a/forgejo-openapi/src/apis/admin_api.rs +++ /dev/null @@ -1,4471 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use super::{configuration, ContentType, Error}; -use crate::{apis::ResponseContent, models}; -use reqwest; -use serde::{de::Error as _, Deserialize, Serialize}; - -/// struct for typed errors of method [`admin_add_rule_to_quota_group`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminAddRuleToQuotaGroupError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status409(models::ApiError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_add_user_to_quota_group`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminAddUserToQuotaGroupError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status409(models::ApiError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_adopt_repository`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminAdoptRepositoryError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_create_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminCreateHookError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_create_org`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminCreateOrgError { - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_create_public_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminCreatePublicKeyError { - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_create_quota_group`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminCreateQuotaGroupError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status409(models::ApiError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_create_quota_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminCreateQuotaRuleError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status409(models::ApiError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_create_repo`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminCreateRepoError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status409(models::ApiError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_create_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminCreateUserError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_cron_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminCronListError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_cron_run`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminCronRunError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_delete_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminDeleteHookError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_delete_quota_group`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminDeleteQuotaGroupError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_delete_quota_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminDeleteQuotaRuleError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_delete_unadopted_repository`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminDeleteUnadoptedRepositoryError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_delete_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminDeleteUserError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_delete_user_emails`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminDeleteUserEmailsError { - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_delete_user_public_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminDeleteUserPublicKeyError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_edit_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminEditHookError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_edit_quota_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminEditQuotaRuleError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_edit_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminEditUserError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_get_all_emails`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminGetAllEmailsError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_get_all_orgs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminGetAllOrgsError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_get_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminGetHookError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_get_quota_group`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminGetQuotaGroupError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_get_quota_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminGetQuotaRuleError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_get_runner_registration_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminGetRunnerRegistrationTokenError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_get_user_quota`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminGetUserQuotaError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_list_hooks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminListHooksError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_list_quota_groups`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminListQuotaGroupsError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_list_quota_rules`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminListQuotaRulesError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_list_user_emails`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminListUserEmailsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_list_users_in_quota_group`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminListUsersInQuotaGroupError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_remove_rule_from_quota_group`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminRemoveRuleFromQuotaGroupError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_remove_user_from_quota_group`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminRemoveUserFromQuotaGroupError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_rename_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminRenameUserError { - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_search_emails`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminSearchEmailsError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_search_run_jobs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminSearchRunJobsError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_search_users`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminSearchUsersError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_set_user_quota_groups`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminSetUserQuotaGroupsError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`admin_unadopted_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AdminUnadoptedListError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -pub async fn admin_add_rule_to_quota_group( - configuration: &configuration::Configuration, - quotagroup: &str, - quotarule: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_quotagroup = quotagroup; - let p_path_quotarule = quotarule; - - let uri_str = format!( - "{}/admin/quota/groups/{quotagroup}/rules/{quotarule}", - configuration.base_path, - quotagroup = crate::apis::urlencode(p_path_quotagroup), - quotarule = crate::apis::urlencode(p_path_quotarule) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_add_user_to_quota_group( - configuration: &configuration::Configuration, - quotagroup: &str, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_quotagroup = quotagroup; - let p_path_username = username; - - let uri_str = format!( - "{}/admin/quota/groups/{quotagroup}/users/{username}", - configuration.base_path, - quotagroup = crate::apis::urlencode(p_path_quotagroup), - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_adopt_repository( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/admin/unadopted/{owner}/{repo}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_create_hook( - configuration: &configuration::Configuration, - body: models::CreateHookOption, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/admin/hooks", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_create_org( - configuration: &configuration::Configuration, - username: &str, - organization: models::CreateOrgOption, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_body_organization = organization; - - let uri_str = format!( - "{}/admin/users/{username}/orgs", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_organization); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Organization`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Organization`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_create_public_key( - configuration: &configuration::Configuration, - username: &str, - key: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_body_key = key; - - let uri_str = format!( - "{}/admin/users/{username}/keys", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_key); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PublicKey`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PublicKey`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_create_quota_group( - configuration: &configuration::Configuration, - group: models::CreateQuotaGroupOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_group = group; - - let uri_str = format!("{}/admin/quota/groups", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_group); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaGroup`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaGroup`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_create_quota_rule( - configuration: &configuration::Configuration, - rule: models::CreateQuotaRuleOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_rule = rule; - - let uri_str = format!("{}/admin/quota/rules", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_rule); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaRuleInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaRuleInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_create_repo( - configuration: &configuration::Configuration, - username: &str, - repository: models::CreateRepoOption, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_body_repository = repository; - - let uri_str = format!( - "{}/admin/users/{username}/repos", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_repository); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_create_user( - configuration: &configuration::Configuration, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/admin/users", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_cron_list( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/admin/cron", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Cron>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Cron>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_cron_run( - configuration: &configuration::Configuration, - task: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_task = task; - - let uri_str = format!( - "{}/admin/cron/{task}", - configuration.base_path, - task = crate::apis::urlencode(p_path_task) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_delete_hook( - configuration: &configuration::Configuration, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!( - "{}/admin/hooks/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_delete_quota_group( - configuration: &configuration::Configuration, - quotagroup: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_quotagroup = quotagroup; - - let uri_str = format!( - "{}/admin/quota/groups/{quotagroup}", - configuration.base_path, - quotagroup = crate::apis::urlencode(p_path_quotagroup) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_delete_quota_rule( - configuration: &configuration::Configuration, - quotarule: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_quotarule = quotarule; - - let uri_str = format!( - "{}/admin/quota/rules/{quotarule}", - configuration.base_path, - quotarule = crate::apis::urlencode(p_path_quotarule) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_delete_unadopted_repository( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/admin/unadopted/{owner}/{repo}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_delete_user( - configuration: &configuration::Configuration, - username: &str, - purge: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_query_purge = purge; - - let uri_str = format!( - "{}/admin/users/{username}", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref param_value) = p_query_purge { - req_builder = req_builder.query(&[("purge", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_delete_user_emails( - configuration: &configuration::Configuration, - username: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_body_body = body; - - let uri_str = format!( - "{}/admin/users/{username}/emails", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_delete_user_public_key( - configuration: &configuration::Configuration, - username: &str, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_path_id = id; - - let uri_str = format!( - "{}/admin/users/{username}/keys/{id}", - configuration.base_path, - username = crate::apis::urlencode(p_path_username), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_edit_hook( - configuration: &configuration::Configuration, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/admin/hooks/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_edit_quota_rule( - configuration: &configuration::Configuration, - quotarule: &str, - rule: models::EditQuotaRuleOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_quotarule = quotarule; - let p_body_rule = rule; - - let uri_str = format!( - "{}/admin/quota/rules/{quotarule}", - configuration.base_path, - quotarule = crate::apis::urlencode(p_path_quotarule) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_rule); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaRuleInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaRuleInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_edit_user( - configuration: &configuration::Configuration, - username: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_body_body = body; - - let uri_str = format!( - "{}/admin/users/{username}", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_get_all_emails( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/admin/emails", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Email>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Email>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_get_all_orgs( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/admin/orgs", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Organization>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Organization>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_get_hook( - configuration: &configuration::Configuration, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!( - "{}/admin/hooks/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_get_quota_group( - configuration: &configuration::Configuration, - quotagroup: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_quotagroup = quotagroup; - - let uri_str = format!( - "{}/admin/quota/groups/{quotagroup}", - configuration.base_path, - quotagroup = crate::apis::urlencode(p_path_quotagroup) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaGroup`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaGroup`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_get_quota_rule( - configuration: &configuration::Configuration, - quotarule: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_quotarule = quotarule; - - let uri_str = format!( - "{}/admin/quota/rules/{quotarule}", - configuration.base_path, - quotarule = crate::apis::urlencode(p_path_quotarule) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaRuleInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaRuleInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_get_runner_registration_token( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!( - "{}/admin/runners/registration-token", - configuration.base_path - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RegistrationToken`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RegistrationToken`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_get_user_quota( - configuration: &configuration::Configuration, - username: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - - let uri_str = format!( - "{}/admin/users/{username}/quota", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_list_hooks( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/admin/hooks", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Hook>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Hook>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_list_quota_groups( - configuration: &configuration::Configuration, -) -> Result, Error> { - let uri_str = format!("{}/admin/quota/groups", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaGroup>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaGroup>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_list_quota_rules( - configuration: &configuration::Configuration, -) -> Result, Error> { - let uri_str = format!("{}/admin/quota/rules", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaRuleInfo>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaRuleInfo>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_list_user_emails( - configuration: &configuration::Configuration, - username: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - - let uri_str = format!( - "{}/admin/users/{username}/emails", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Email>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Email>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_list_users_in_quota_group( - configuration: &configuration::Configuration, - quotagroup: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_quotagroup = quotagroup; - - let uri_str = format!( - "{}/admin/quota/groups/{quotagroup}/users", - configuration.base_path, - quotagroup = crate::apis::urlencode(p_path_quotagroup) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_remove_rule_from_quota_group( - configuration: &configuration::Configuration, - quotagroup: &str, - quotarule: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_quotagroup = quotagroup; - let p_path_quotarule = quotarule; - - let uri_str = format!( - "{}/admin/quota/groups/{quotagroup}/rules/{quotarule}", - configuration.base_path, - quotagroup = crate::apis::urlencode(p_path_quotagroup), - quotarule = crate::apis::urlencode(p_path_quotarule) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_remove_user_from_quota_group( - configuration: &configuration::Configuration, - quotagroup: &str, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_quotagroup = quotagroup; - let p_path_username = username; - - let uri_str = format!( - "{}/admin/quota/groups/{quotagroup}/users/{username}", - configuration.base_path, - quotagroup = crate::apis::urlencode(p_path_quotagroup), - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_rename_user( - configuration: &configuration::Configuration, - username: &str, - body: models::RenameUserOption, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_body_body = body; - - let uri_str = format!( - "{}/admin/users/{username}/rename", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_search_emails( - configuration: &configuration::Configuration, - q: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_q = q; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/admin/emails/search", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_q { - req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Email>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Email>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_search_run_jobs( - configuration: &configuration::Configuration, - labels: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_labels = labels; - - let uri_str = format!("{}/admin/runners/jobs", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_labels { - req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionRunJob>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionRunJob>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_search_users( - configuration: &configuration::Configuration, - source_id: Option, - login_name: Option<&str>, - sort: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_source_id = source_id; - let p_query_login_name = login_name; - let p_query_sort = sort; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/admin/users", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_source_id { - req_builder = req_builder.query(&[("source_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_login_name { - req_builder = req_builder.query(&[("login_name", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_sort { - req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_set_user_quota_groups( - configuration: &configuration::Configuration, - username: &str, - groups: models::SetUserQuotaGroupsOptions, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_body_groups = groups; - - let uri_str = format!( - "{}/admin/users/{username}/quota/groups", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_groups); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn admin_unadopted_list( - configuration: &configuration::Configuration, - page: Option, - limit: Option, - pattern: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - let p_query_pattern = pattern; - - let uri_str = format!("{}/admin/unadopted", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_pattern { - req_builder = req_builder.query(&[("pattern", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} diff --git a/forgejo-openapi/src/apis/configuration.rs b/forgejo-openapi/src/apis/configuration.rs deleted file mode 100644 index 442c861..0000000 --- a/forgejo-openapi/src/apis/configuration.rs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Debug, Clone)] -pub struct Configuration { - pub base_path: String, - pub user_agent: Option, - pub client: reqwest::Client, - pub basic_auth: Option, - pub oauth_access_token: Option, - pub bearer_access_token: Option, - pub api_key: Option, -} - -pub type BasicAuth = (String, Option); - -#[derive(Debug, Clone)] -pub struct ApiKey { - pub prefix: Option, - pub key: String, -} - -impl Configuration { - pub fn new() -> Configuration { - Configuration::default() - } -} - -impl Default for Configuration { - fn default() -> Self { - Configuration { - base_path: "/api/v1".to_owned(), - user_agent: Some("OpenAPI-Generator/14.0.0/rust".to_owned()), - client: reqwest::Client::new(), - basic_auth: None, - oauth_access_token: None, - bearer_access_token: None, - api_key: None, - } - } -} diff --git a/forgejo-openapi/src/apis/issue_api.rs b/forgejo-openapi/src/apis/issue_api.rs deleted file mode 100644 index debd2bc..0000000 --- a/forgejo-openapi/src/apis/issue_api.rs +++ /dev/null @@ -1,7883 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use super::{configuration, ContentType, Error}; -use crate::{apis::ResponseContent, models}; -use reqwest; -use serde::{de::Error as _, Deserialize, Serialize}; -use tokio::fs::File as TokioFile; -use tokio_util::codec::{BytesCodec, FramedRead}; - -/// struct for typed errors of method [`issue_add_label`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueAddLabelError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_add_subscription`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueAddSubscriptionError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_add_time`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueAddTimeError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_check_subscription`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueCheckSubscriptionError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_clear_labels`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueClearLabelsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_create_comment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueCreateCommentError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status423(models::ApiRepoArchivedError), - Status500(models::ApiInternalServerError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_create_issue`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueCreateIssueError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status412(models::ApiError), - Status422(models::ApiValidationError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_create_issue_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueCreateIssueAttachmentError { - Status400(models::ApiError), - Status404(models::ApiError), - Status413(), - Status422(models::ApiValidationError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_create_issue_blocking`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueCreateIssueBlockingError { - Status404(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_create_issue_comment_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueCreateIssueCommentAttachmentError { - Status400(models::ApiError), - Status404(models::ApiError), - Status413(), - Status422(models::ApiValidationError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_create_issue_dependencies`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueCreateIssueDependenciesError { - Status404(), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_create_label`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueCreateLabelError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_create_milestone`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueCreateMilestoneError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete_comment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteCommentError { - Status403(models::ApiForbiddenError), - Status500(models::ApiInternalServerError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete_comment_deprecated`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteCommentDeprecatedError { - Status403(models::ApiForbiddenError), - Status500(models::ApiInternalServerError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete_comment_reaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteCommentReactionError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete_issue_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteIssueAttachmentError { - Status404(models::ApiError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete_issue_comment_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteIssueCommentAttachmentError { - Status404(models::ApiError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete_issue_reaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteIssueReactionError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete_label`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteLabelError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete_milestone`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteMilestoneError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete_stop_watch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteStopWatchError { - Status403(), - Status404(models::ApiNotFound), - Status409(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete_subscription`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteSubscriptionError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_delete_time`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueDeleteTimeError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_edit_comment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueEditCommentError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status423(models::ApiRepoArchivedError), - Status500(models::ApiInternalServerError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_edit_comment_deprecated`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueEditCommentDeprecatedError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status500(models::ApiInternalServerError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_edit_issue`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueEditIssueError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status412(models::ApiError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_edit_issue_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueEditIssueAttachmentError { - Status404(models::ApiError), - Status413(), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_edit_issue_comment_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueEditIssueCommentAttachmentError { - Status404(models::ApiError), - Status413(), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_edit_issue_deadline`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueEditIssueDeadlineError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_edit_label`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueEditLabelError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_edit_milestone`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueEditMilestoneError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_comment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetCommentError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status500(models::ApiInternalServerError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_comment_reactions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetCommentReactionsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_comments`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetCommentsError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - Status500(models::ApiInternalServerError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_comments_and_timeline`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetCommentsAndTimelineError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - Status500(models::ApiInternalServerError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_issue`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetIssueError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_issue_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetIssueAttachmentError { - Status404(models::ApiError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_issue_comment_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetIssueCommentAttachmentError { - Status404(models::ApiError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_issue_reactions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetIssueReactionsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_label`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetLabelError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_labels`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetLabelsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_milestone`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetMilestoneError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_milestones_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetMilestonesListError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_get_repo_comments`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueGetRepoCommentsError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - Status500(models::ApiInternalServerError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_list_blocks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueListBlocksError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_list_issue_attachments`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueListIssueAttachmentsError { - Status404(models::ApiError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_list_issue_comment_attachments`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueListIssueCommentAttachmentsError { - Status404(models::ApiError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_list_issue_dependencies`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueListIssueDependenciesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_list_issues`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueListIssuesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_list_labels`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueListLabelsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_post_comment_reaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssuePostCommentReactionError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_post_issue_reaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssuePostIssueReactionError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_remove_issue_blocking`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueRemoveIssueBlockingError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_remove_issue_dependencies`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueRemoveIssueDependenciesError { - Status404(models::ApiNotFound), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_remove_label`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueRemoveLabelError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_replace_labels`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueReplaceLabelsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_reset_time`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueResetTimeError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_search_issues`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueSearchIssuesError { - Status400(models::ApiError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_start_stop_watch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueStartStopWatchError { - Status403(), - Status404(models::ApiNotFound), - Status409(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_stop_stop_watch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueStopStopWatchError { - Status403(), - Status404(models::ApiNotFound), - Status409(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_subscriptions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueSubscriptionsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`issue_tracked_times`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IssueTrackedTimesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`move_issue_pin`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum MoveIssuePinError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`pin_issue`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PinIssueError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`unpin_issue`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UnpinIssueError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -pub async fn issue_add_label( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/labels", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Label>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Label>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_add_subscription( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - user: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_user = user; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - user = crate::apis::urlencode(p_path_user) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_add_time( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/times", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TrackedTime`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TrackedTime`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_check_subscription( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/subscriptions/check", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WatchInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WatchInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_clear_labels( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/labels", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_create_comment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/comments", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Comment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Comment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_create_issue( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_create_issue_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - attachment: std::path::PathBuf, - name: Option<&str>, - updated_at: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_form_attachment = attachment; - let p_query_name = name; - let p_query_updated_at = updated_at; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/assets", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref param_value) = p_query_name { - req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_updated_at { - req_builder = req_builder.query(&[("updated_at", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - let mut multipart_form = reqwest::multipart::Form::new(); - let file = TokioFile::open(&p_form_attachment).await?; - let stream = FramedRead::new(file, BytesCodec::new()); - let file_name = p_form_attachment - .file_name() - .map(|n| n.to_string_lossy().to_string()) - .unwrap_or_default(); - let file_part = - reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)).file_name(file_name); - multipart_form = multipart_form.part("attachment", file_part); - req_builder = req_builder.multipart(multipart_form); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_create_issue_blocking( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/blocks", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_create_issue_comment_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - attachment: std::path::PathBuf, - name: Option<&str>, - updated_at: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_form_attachment = attachment; - let p_query_name = name; - let p_query_updated_at = updated_at; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments/{id}/assets", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref param_value) = p_query_name { - req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_updated_at { - req_builder = req_builder.query(&[("updated_at", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - let mut multipart_form = reqwest::multipart::Form::new(); - let file = TokioFile::open(&p_form_attachment).await?; - let stream = FramedRead::new(file, BytesCodec::new()); - let file_name = p_form_attachment - .file_name() - .map(|n| n.to_string_lossy().to_string()) - .unwrap_or_default(); - let file_part = - reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)).file_name(file_name); - multipart_form = multipart_form.part("attachment", file_part); - req_builder = req_builder.multipart(multipart_form); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_create_issue_dependencies( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/dependencies", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_create_label( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/labels", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_create_milestone( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/milestones", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Milestone`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Milestone`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_delete( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_delete_comment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -#[deprecated] -pub async fn issue_delete_comment_deprecated( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i32, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/comments/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_delete_comment_reaction( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - content: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_body_content = content; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_content); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_delete_issue_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - attachment_id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_attachment_id = attachment_id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - attachment_id = p_path_attachment_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_delete_issue_comment_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - attachment_id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_path_attachment_id = attachment_id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id, - attachment_id = p_path_attachment_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_delete_issue_reaction( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - content: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_content = content; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/reactions", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_content); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_delete_label( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/labels/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_delete_milestone( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/milestones/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_delete_stop_watch( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/stopwatch/delete", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_delete_subscription( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - user: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_user = user; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - user = crate::apis::urlencode(p_path_user) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_delete_time( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/times/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_edit_comment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Comment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Comment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -#[deprecated] -pub async fn issue_edit_comment_deprecated( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i32, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/comments/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Comment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Comment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_edit_issue( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_edit_issue_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - attachment_id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_attachment_id = attachment_id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - attachment_id = p_path_attachment_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_edit_issue_comment_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - attachment_id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_path_attachment_id = attachment_id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id, - attachment_id = p_path_attachment_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_edit_issue_deadline( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/deadline", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IssueDeadline`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IssueDeadline`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_edit_label( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/labels/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_edit_milestone( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/milestones/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Milestone`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Milestone`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_comment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Comment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Comment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_comment_reactions( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Reaction>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Reaction>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_comments( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - since: Option, - before: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_query_since = since; - let p_query_before = before; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/comments", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_since { - req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_before { - req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Comment>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Comment>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_comments_and_timeline( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - since: Option, - page: Option, - limit: Option, - before: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_query_since = since; - let p_query_page = page; - let p_query_limit = limit; - let p_query_before = before; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/timeline", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_since { - req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_before { - req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TimelineComment>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TimelineComment>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_issue( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_issue_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - attachment_id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_attachment_id = attachment_id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - attachment_id = p_path_attachment_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_issue_comment_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - attachment_id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_path_attachment_id = attachment_id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id, - attachment_id = p_path_attachment_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_issue_reactions( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/reactions", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Reaction>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Reaction>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_label( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/labels/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_labels( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/labels", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Label>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Label>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_milestone( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/milestones/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Milestone`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Milestone`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_milestones_list( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - state: Option<&str>, - name: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_state = state; - let p_query_name = name; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/milestones", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_state { - req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_name { - req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Milestone>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Milestone>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_get_repo_comments( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - since: Option, - before: Option, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_since = since; - let p_query_before = before; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_since { - req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_before { - req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Comment>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Comment>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_list_blocks( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/blocks", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Issue>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Issue>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_list_issue_attachments( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/assets", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Attachment>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Attachment>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_list_issue_comment_attachments( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments/{id}/assets", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Attachment>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Attachment>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_list_issue_dependencies( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/dependencies", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Issue>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Issue>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_list_issues( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - state: Option<&str>, - labels: Option<&str>, - q: Option<&str>, - r#type: Option<&str>, - milestones: Option<&str>, - since: Option, - before: Option, - created_by: Option<&str>, - assigned_by: Option<&str>, - mentioned_by: Option<&str>, - page: Option, - limit: Option, - sort: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_state = state; - let p_query_labels = labels; - let p_query_q = q; - let p_query_type = r#type; - let p_query_milestones = milestones; - let p_query_since = since; - let p_query_before = before; - let p_query_created_by = created_by; - let p_query_assigned_by = assigned_by; - let p_query_mentioned_by = mentioned_by; - let p_query_page = page; - let p_query_limit = limit; - let p_query_sort = sort; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_state { - req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_labels { - req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_q { - req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_type { - req_builder = req_builder.query(&[("type", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_milestones { - req_builder = req_builder.query(&[("milestones", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_since { - req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_before { - req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_created_by { - req_builder = req_builder.query(&[("created_by", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_assigned_by { - req_builder = req_builder.query(&[("assigned_by", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_mentioned_by { - req_builder = req_builder.query(&[("mentioned_by", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_sort { - req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Issue>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Issue>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_list_labels( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sort: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_sort = sort; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/labels", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_sort { - req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Label>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Label>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_post_comment_reaction( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - content: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_body_content = content; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/comments/{id}/reactions", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_content); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Reaction`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Reaction`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_post_issue_reaction( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - content: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_content = content; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/reactions", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_content); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Reaction`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Reaction`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_remove_issue_blocking( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/blocks", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_remove_issue_dependencies( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/dependencies", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Issue`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Issue`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_remove_label( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - identifier: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_identifier = identifier; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/labels/{identifier}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - identifier = crate::apis::urlencode(p_path_identifier) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_replace_labels( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/labels", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Label>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Label>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_reset_time( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/times", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_search_issues( - configuration: &configuration::Configuration, - state: Option<&str>, - labels: Option<&str>, - milestones: Option<&str>, - q: Option<&str>, - priority_repo_id: Option, - r#type: Option<&str>, - since: Option, - before: Option, - assigned: Option, - created: Option, - mentioned: Option, - review_requested: Option, - reviewed: Option, - owner: Option<&str>, - team: Option<&str>, - page: Option, - limit: Option, - sort: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_state = state; - let p_query_labels = labels; - let p_query_milestones = milestones; - let p_query_q = q; - let p_query_priority_repo_id = priority_repo_id; - let p_query_type = r#type; - let p_query_since = since; - let p_query_before = before; - let p_query_assigned = assigned; - let p_query_created = created; - let p_query_mentioned = mentioned; - let p_query_review_requested = review_requested; - let p_query_reviewed = reviewed; - let p_query_owner = owner; - let p_query_team = team; - let p_query_page = page; - let p_query_limit = limit; - let p_query_sort = sort; - - let uri_str = format!("{}/repos/issues/search", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_state { - req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_labels { - req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_milestones { - req_builder = req_builder.query(&[("milestones", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_q { - req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_priority_repo_id { - req_builder = req_builder.query(&[("priority_repo_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_type { - req_builder = req_builder.query(&[("type", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_since { - req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_before { - req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_assigned { - req_builder = req_builder.query(&[("assigned", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_created { - req_builder = req_builder.query(&[("created", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_mentioned { - req_builder = req_builder.query(&[("mentioned", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_review_requested { - req_builder = req_builder.query(&[("review_requested", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_reviewed { - req_builder = req_builder.query(&[("reviewed", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_owner { - req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_team { - req_builder = req_builder.query(&[("team", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_sort { - req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Issue>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Issue>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_start_stop_watch( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/stopwatch/start", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_stop_stop_watch( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/stopwatch/stop", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_subscriptions( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/subscriptions", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn issue_tracked_times( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - user: Option<&str>, - since: Option, - before: Option, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_query_user = user; - let p_query_since = since; - let p_query_before = before; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/times", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_user { - req_builder = req_builder.query(&[("user", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_since { - req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_before { - req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TrackedTime>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TrackedTime>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn move_issue_pin( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - position: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_position = position; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/pin/{position}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - position = p_path_position - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn pin_issue( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/pin", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn unpin_issue( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/{index}/pin", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} diff --git a/forgejo-openapi/src/apis/miscellaneous_api.rs b/forgejo-openapi/src/apis/miscellaneous_api.rs deleted file mode 100644 index 9b34ecc..0000000 --- a/forgejo-openapi/src/apis/miscellaneous_api.rs +++ /dev/null @@ -1,1327 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use super::{configuration, ContentType, Error}; -use crate::{apis::ResponseContent, models}; -use reqwest; -use serde::{de::Error as _, Deserialize, Serialize}; - -/// struct for typed errors of method [`get_gitignore_template_info`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGitignoreTemplateInfoError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_label_template_info`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetLabelTemplateInfoError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_license_template_info`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetLicenseTemplateInfoError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_node_info`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetNodeInfoError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_signing_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetSigningKeyError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_ssh_signing_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetSshSigningKeyError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_version`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetVersionError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`list_gitignores_templates`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGitignoresTemplatesError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`list_label_templates`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListLabelTemplatesError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`list_license_templates`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListLicenseTemplatesError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`render_markdown`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RenderMarkdownError { - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`render_markdown_raw`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RenderMarkdownRawError { - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`render_markup`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RenderMarkupError { - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -pub async fn get_gitignore_template_info( - configuration: &configuration::Configuration, - name: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_name = name; - - let uri_str = format!( - "{}/gitignore/templates/{name}", - configuration.base_path, - name = crate::apis::urlencode(p_path_name) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GitignoreTemplateInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GitignoreTemplateInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_label_template_info( - configuration: &configuration::Configuration, - name: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_name = name; - - let uri_str = format!( - "{}/label/templates/{name}", - configuration.base_path, - name = crate::apis::urlencode(p_path_name) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::LabelTemplate>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::LabelTemplate>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_license_template_info( - configuration: &configuration::Configuration, - name: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_name = name; - - let uri_str = format!( - "{}/licenses/{name}", - configuration.base_path, - name = crate::apis::urlencode(p_path_name) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::LicenseTemplateInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::LicenseTemplateInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_node_info( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/nodeinfo", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NodeInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NodeInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_signing_key( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/signing-key.gpg", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Ok(content), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_ssh_signing_key( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/signing-key.ssh", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Ok(content), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_version( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/version", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServerVersion`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServerVersion`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn list_gitignores_templates( - configuration: &configuration::Configuration, -) -> Result, Error> { - let uri_str = format!("{}/gitignore/templates", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn list_label_templates( - configuration: &configuration::Configuration, -) -> Result, Error> { - let uri_str = format!("{}/label/templates", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn list_license_templates( - configuration: &configuration::Configuration, -) -> Result, Error> { - let uri_str = format!("{}/licenses", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::LicensesTemplateListEntry>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::LicensesTemplateListEntry>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn render_markdown( - configuration: &configuration::Configuration, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/markdown", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `String`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn render_markdown_raw( - configuration: &configuration::Configuration, - body: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/markdown/raw", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `String`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn render_markup( - configuration: &configuration::Configuration, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/markup", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `String`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} diff --git a/forgejo-openapi/src/apis/mod.rs b/forgejo-openapi/src/apis/mod.rs deleted file mode 100644 index 447fc60..0000000 --- a/forgejo-openapi/src/apis/mod.rs +++ /dev/null @@ -1,127 +0,0 @@ -use std::error; -use std::fmt; - -#[derive(Debug, Clone)] -pub struct ResponseContent { - pub status: reqwest::StatusCode, - pub content: String, - pub entity: Option, -} - -#[derive(Debug)] -pub enum Error { - Reqwest(reqwest::Error), - Serde(serde_json::Error), - Io(std::io::Error), - ResponseError(ResponseContent), -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let (module, e) = match self { - Error::Reqwest(e) => ("reqwest", e.to_string()), - Error::Serde(e) => ("serde", e.to_string()), - Error::Io(e) => ("IO", e.to_string()), - Error::ResponseError(e) => ("response", format!("status code {}", e.status)), - }; - write!(f, "error in {}: {}", module, e) - } -} - -impl error::Error for Error { - fn source(&self) -> Option<&(dyn error::Error + 'static)> { - Some(match self { - Error::Reqwest(e) => e, - Error::Serde(e) => e, - Error::Io(e) => e, - Error::ResponseError(_) => return None, - }) - } -} - -impl From for Error { - fn from(e: reqwest::Error) -> Self { - Error::Reqwest(e) - } -} - -impl From for Error { - fn from(e: serde_json::Error) -> Self { - Error::Serde(e) - } -} - -impl From for Error { - fn from(e: std::io::Error) -> Self { - Error::Io(e) - } -} - -pub fn urlencode>(s: T) -> String { - ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() -} - -pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { - if let serde_json::Value::Object(object) = value { - let mut params = vec![]; - - for (key, value) in object { - match value { - serde_json::Value::Object(_) => params.append(&mut parse_deep_object( - &format!("{}[{}]", prefix, key), - value, - )), - serde_json::Value::Array(array) => { - for (i, value) in array.iter().enumerate() { - params.append(&mut parse_deep_object( - &format!("{}[{}][{}]", prefix, key, i), - value, - )); - } - } - serde_json::Value::String(s) => { - params.push((format!("{}[{}]", prefix, key), s.clone())) - } - _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), - } - } - - return params; - } - - unimplemented!("Only objects are supported with style=deepObject") -} - -/// Internal use only -/// A content type supported by this client. -#[allow(dead_code)] -enum ContentType { - Json, - Text, - Unsupported(String), -} - -impl From<&str> for ContentType { - fn from(content_type: &str) -> Self { - if content_type.starts_with("application") && content_type.contains("json") { - return Self::Json; - } else if content_type.starts_with("text/plain") { - return Self::Text; - } else { - return Self::Unsupported(content_type.to_string()); - } - } -} - -pub mod activitypub_api; -pub mod admin_api; -pub mod issue_api; -pub mod miscellaneous_api; -pub mod notification_api; -pub mod organization_api; -pub mod package_api; -pub mod repository_api; -pub mod settings_api; -pub mod user_api; - -pub mod configuration; diff --git a/forgejo-openapi/src/apis/notification_api.rs b/forgejo-openapi/src/apis/notification_api.rs deleted file mode 100644 index b1652cd..0000000 --- a/forgejo-openapi/src/apis/notification_api.rs +++ /dev/null @@ -1,952 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use super::{configuration, ContentType, Error}; -use crate::{apis::ResponseContent, models}; -use reqwest; -use serde::{de::Error as _, Deserialize, Serialize}; - -/// struct for typed errors of method [`notify_get_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum NotifyGetListError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`notify_get_repo_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum NotifyGetRepoListError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`notify_get_thread`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum NotifyGetThreadError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`notify_new_available`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum NotifyNewAvailableError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`notify_read_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum NotifyReadListError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`notify_read_repo_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum NotifyReadRepoListError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`notify_read_thread`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum NotifyReadThreadError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -pub async fn notify_get_list( - configuration: &configuration::Configuration, - all: Option, - status_types: Option>, - subject_type: Option>, - since: Option, - before: Option, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_all = all; - let p_query_status_types = status_types; - let p_query_subject_type = subject_type; - let p_query_since = since; - let p_query_before = before; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/notifications", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_all { - req_builder = req_builder.query(&[("all", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_status_types { - req_builder = match "multi" { - "multi" => req_builder.query( - ¶m_value - .into_iter() - .map(|p| ("status-types".to_owned(), p.to_string())) - .collect::>(), - ), - _ => req_builder.query(&[( - "status-types", - ¶m_value - .into_iter() - .map(|p| p.to_string()) - .collect::>() - .join(",") - .to_string(), - )]), - }; - } - if let Some(ref param_value) = p_query_subject_type { - req_builder = match "multi" { - "multi" => req_builder.query( - ¶m_value - .into_iter() - .map(|p| ("subject-type".to_owned(), p.to_string())) - .collect::>(), - ), - _ => req_builder.query(&[( - "subject-type", - ¶m_value - .into_iter() - .map(|p| p.to_string()) - .collect::>() - .join(",") - .to_string(), - )]), - }; - } - if let Some(ref param_value) = p_query_since { - req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_before { - req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::NotificationThread>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::NotificationThread>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn notify_get_repo_list( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - all: Option, - status_types: Option>, - subject_type: Option>, - since: Option, - before: Option, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_all = all; - let p_query_status_types = status_types; - let p_query_subject_type = subject_type; - let p_query_since = since; - let p_query_before = before; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/notifications", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_all { - req_builder = req_builder.query(&[("all", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_status_types { - req_builder = match "multi" { - "multi" => req_builder.query( - ¶m_value - .into_iter() - .map(|p| ("status-types".to_owned(), p.to_string())) - .collect::>(), - ), - _ => req_builder.query(&[( - "status-types", - ¶m_value - .into_iter() - .map(|p| p.to_string()) - .collect::>() - .join(",") - .to_string(), - )]), - }; - } - if let Some(ref param_value) = p_query_subject_type { - req_builder = match "multi" { - "multi" => req_builder.query( - ¶m_value - .into_iter() - .map(|p| ("subject-type".to_owned(), p.to_string())) - .collect::>(), - ), - _ => req_builder.query(&[( - "subject-type", - ¶m_value - .into_iter() - .map(|p| p.to_string()) - .collect::>() - .join(",") - .to_string(), - )]), - }; - } - if let Some(ref param_value) = p_query_since { - req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_before { - req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::NotificationThread>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::NotificationThread>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn notify_get_thread( - configuration: &configuration::Configuration, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!( - "{}/notifications/threads/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NotificationThread`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NotificationThread`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn notify_new_available( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/notifications/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NotificationCount`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NotificationCount`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn notify_read_list( - configuration: &configuration::Configuration, - last_read_at: Option, - all: Option, - status_types: Option>, - to_status: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_last_read_at = last_read_at; - let p_query_all = all; - let p_query_status_types = status_types; - let p_query_to_status = to_status; - - let uri_str = format!("{}/notifications", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref param_value) = p_query_last_read_at { - req_builder = req_builder.query(&[("last_read_at", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_all { - req_builder = req_builder.query(&[("all", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_status_types { - req_builder = match "multi" { - "multi" => req_builder.query( - ¶m_value - .into_iter() - .map(|p| ("status-types".to_owned(), p.to_string())) - .collect::>(), - ), - _ => req_builder.query(&[( - "status-types", - ¶m_value - .into_iter() - .map(|p| p.to_string()) - .collect::>() - .join(",") - .to_string(), - )]), - }; - } - if let Some(ref param_value) = p_query_to_status { - req_builder = req_builder.query(&[("to-status", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::NotificationThread>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::NotificationThread>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn notify_read_repo_list( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - all: Option, - status_types: Option>, - to_status: Option<&str>, - last_read_at: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_all = all; - let p_query_status_types = status_types; - let p_query_to_status = to_status; - let p_query_last_read_at = last_read_at; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/notifications", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref param_value) = p_query_all { - req_builder = req_builder.query(&[("all", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_status_types { - req_builder = match "multi" { - "multi" => req_builder.query( - ¶m_value - .into_iter() - .map(|p| ("status-types".to_owned(), p.to_string())) - .collect::>(), - ), - _ => req_builder.query(&[( - "status-types", - ¶m_value - .into_iter() - .map(|p| p.to_string()) - .collect::>() - .join(",") - .to_string(), - )]), - }; - } - if let Some(ref param_value) = p_query_to_status { - req_builder = req_builder.query(&[("to-status", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_last_read_at { - req_builder = req_builder.query(&[("last_read_at", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::NotificationThread>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::NotificationThread>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn notify_read_thread( - configuration: &configuration::Configuration, - id: i64, - to_status: Option<&str>, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_query_to_status = to_status; - - let uri_str = format!( - "{}/notifications/threads/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref param_value) = p_query_to_status { - req_builder = req_builder.query(&[("to-status", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NotificationThread`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NotificationThread`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} diff --git a/forgejo-openapi/src/apis/organization_api.rs b/forgejo-openapi/src/apis/organization_api.rs deleted file mode 100644 index e988c0b..0000000 --- a/forgejo-openapi/src/apis/organization_api.rs +++ /dev/null @@ -1,7066 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use super::{configuration, ContentType, Error}; -use crate::{apis::ResponseContent, models}; -use reqwest; -use serde::{de::Error as _, Deserialize, Serialize}; - -/// struct for typed errors of method [`create_org_repo`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateOrgRepoError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`create_org_repo_deprecated`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateOrgRepoDeprecatedError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`create_org_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateOrgVariableError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`delete_org_secret`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteOrgSecretError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`delete_org_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteOrgVariableError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_org_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetOrgVariableError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_org_variables_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetOrgVariablesListError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_add_team_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgAddTeamMemberError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_add_team_repository`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgAddTeamRepositoryError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_block_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgBlockUserError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_check_quota`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgCheckQuotaError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_conceal_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgConcealMemberError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_create`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgCreateError { - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_create_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgCreateHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_create_label`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgCreateLabelError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_create_team`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgCreateTeamError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_delete`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgDeleteError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_delete_avatar`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgDeleteAvatarError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_delete_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgDeleteHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_delete_label`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgDeleteLabelError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_delete_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgDeleteMemberError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_delete_team`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgDeleteTeamError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_edit`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgEditError { - Status404(models::ApiNotFound), - Status422(models::ApiError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_edit_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgEditHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_edit_label`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgEditLabelError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_edit_team`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgEditTeamError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgGetError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_get_all`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgGetAllError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_get_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgGetHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_get_label`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgGetLabelError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_get_quota`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgGetQuotaError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_get_runner_registration_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgGetRunnerRegistrationTokenError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_get_team`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgGetTeamError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_get_user_permissions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgGetUserPermissionsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_is_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgIsMemberError { - Status404(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_is_public_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgIsPublicMemberError { - Status404(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_actions_secrets`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListActionsSecretsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_activity_feeds`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListActivityFeedsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_blocked_users`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListBlockedUsersError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_current_user_orgs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListCurrentUserOrgsError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_hooks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListHooksError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_labels`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListLabelsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_members`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListMembersError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_public_members`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListPublicMembersError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_quota_artifacts`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListQuotaArtifactsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_quota_attachments`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListQuotaAttachmentsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_quota_packages`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListQuotaPackagesError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_repos`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListReposError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_team_activity_feeds`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListTeamActivityFeedsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_team_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListTeamMemberError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_team_members`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListTeamMembersError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_team_repo`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListTeamRepoError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_team_repos`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListTeamReposError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_teams`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListTeamsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_list_user_orgs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgListUserOrgsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_publicize_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgPublicizeMemberError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_remove_team_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgRemoveTeamMemberError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_remove_team_repository`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgRemoveTeamRepositoryError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_search_run_jobs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgSearchRunJobsError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_unblock_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgUnblockUserError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`org_update_avatar`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrgUpdateAvatarError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`rename_org`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RenameOrgError { - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`team_search`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum TeamSearchError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`update_org_secret`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateOrgSecretError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`update_org_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateOrgVariableError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -pub async fn create_org_repo( - configuration: &configuration::Configuration, - org: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}/repos", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -#[deprecated] -pub async fn create_org_repo_deprecated( - configuration: &configuration::Configuration, - org: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_body_body = body; - - let uri_str = format!( - "{}/org/{org}/repos", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn create_org_variable( - configuration: &configuration::Configuration, - org: &str, - variablename: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_variablename = variablename; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}/actions/variables/{variablename}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn delete_org_secret( - configuration: &configuration::Configuration, - org: &str, - secretname: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_secretname = secretname; - - let uri_str = format!( - "{}/orgs/{org}/actions/secrets/{secretname}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - secretname = crate::apis::urlencode(p_path_secretname) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn delete_org_variable( - configuration: &configuration::Configuration, - org: &str, - variablename: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_variablename = variablename; - - let uri_str = format!( - "{}/orgs/{org}/actions/variables/{variablename}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_org_variable( - configuration: &configuration::Configuration, - org: &str, - variablename: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_variablename = variablename; - - let uri_str = format!( - "{}/orgs/{org}/actions/variables/{variablename}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActionVariable`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActionVariable`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_org_variables_list( - configuration: &configuration::Configuration, - org: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/actions/variables", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionVariable>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionVariable>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_add_team_member( - configuration: &configuration::Configuration, - id: i64, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_path_username = username; - - let uri_str = format!( - "{}/teams/{id}/members/{username}", - configuration.base_path, - id = p_path_id, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_add_team_repository( - configuration: &configuration::Configuration, - id: i64, - org: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_path_org = org; - let p_path_repo = repo; - - let uri_str = format!( - "{}/teams/{id}/repos/{org}/{repo}", - configuration.base_path, - id = p_path_id, - org = crate::apis::urlencode(p_path_org), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_block_user( - configuration: &configuration::Configuration, - org: &str, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_username = username; - - let uri_str = format!( - "{}/orgs/{org}/block/{username}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_check_quota( - configuration: &configuration::Configuration, - org: &str, - subject: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_subject = subject; - - let uri_str = format!( - "{}/orgs/{org}/quota/check", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - req_builder = req_builder.query(&[("subject", &p_query_subject.to_string())]); - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `bool`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `bool`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_conceal_member( - configuration: &configuration::Configuration, - org: &str, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_username = username; - - let uri_str = format!( - "{}/orgs/{org}/public_members/{username}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_create( - configuration: &configuration::Configuration, - organization: models::CreateOrgOption, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_organization = organization; - - let uri_str = format!("{}/orgs", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_organization); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Organization`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Organization`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_create_hook( - configuration: &configuration::Configuration, - org: &str, - body: models::CreateHookOption, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}/hooks", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_create_label( - configuration: &configuration::Configuration, - org: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}/labels", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_create_team( - configuration: &configuration::Configuration, - org: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}/teams", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Team`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Team`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_delete( - configuration: &configuration::Configuration, - org: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - - let uri_str = format!( - "{}/orgs/{org}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_delete_avatar( - configuration: &configuration::Configuration, - org: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - - let uri_str = format!( - "{}/orgs/{org}/avatar", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_delete_hook( - configuration: &configuration::Configuration, - org: &str, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_id = id; - - let uri_str = format!( - "{}/orgs/{org}/hooks/{id}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_delete_label( - configuration: &configuration::Configuration, - org: &str, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_id = id; - - let uri_str = format!( - "{}/orgs/{org}/labels/{id}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_delete_member( - configuration: &configuration::Configuration, - org: &str, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_username = username; - - let uri_str = format!( - "{}/orgs/{org}/members/{username}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_delete_team( - configuration: &configuration::Configuration, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!("{}/teams/{id}", configuration.base_path, id = p_path_id); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_edit( - configuration: &configuration::Configuration, - org: &str, - body: models::EditOrgOption, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Organization`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Organization`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_edit_hook( - configuration: &configuration::Configuration, - org: &str, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}/hooks/{id}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_edit_label( - configuration: &configuration::Configuration, - org: &str, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}/labels/{id}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_edit_team( - configuration: &configuration::Configuration, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!("{}/teams/{id}", configuration.base_path, id = p_path_id); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Team`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Team`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_get( - configuration: &configuration::Configuration, - org: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - - let uri_str = format!( - "{}/orgs/{org}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Organization`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Organization`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_get_all( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/orgs", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Organization>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Organization>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_get_hook( - configuration: &configuration::Configuration, - org: &str, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_id = id; - - let uri_str = format!( - "{}/orgs/{org}/hooks/{id}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_get_label( - configuration: &configuration::Configuration, - org: &str, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_id = id; - - let uri_str = format!( - "{}/orgs/{org}/labels/{id}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Label`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Label`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_get_quota( - configuration: &configuration::Configuration, - org: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - - let uri_str = format!( - "{}/orgs/{org}/quota", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_get_runner_registration_token( - configuration: &configuration::Configuration, - org: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - - let uri_str = format!( - "{}/orgs/{org}/actions/runners/registration-token", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RegistrationToken`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RegistrationToken`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_get_team( - configuration: &configuration::Configuration, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!("{}/teams/{id}", configuration.base_path, id = p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Team`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Team`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_get_user_permissions( - configuration: &configuration::Configuration, - username: &str, - org: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_path_org = org; - - let uri_str = format!( - "{}/users/{username}/orgs/{org}/permissions", - configuration.base_path, - username = crate::apis::urlencode(p_path_username), - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationPermissions`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationPermissions`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_is_member( - configuration: &configuration::Configuration, - org: &str, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_username = username; - - let uri_str = format!( - "{}/orgs/{org}/members/{username}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_is_public_member( - configuration: &configuration::Configuration, - org: &str, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_username = username; - - let uri_str = format!( - "{}/orgs/{org}/public_members/{username}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_actions_secrets( - configuration: &configuration::Configuration, - org: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/actions/secrets", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Secret>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Secret>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_activity_feeds( - configuration: &configuration::Configuration, - org: &str, - date: Option, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_date = date; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/activities/feeds", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_date { - req_builder = req_builder.query(&[("date", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Activity>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Activity>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_blocked_users( - configuration: &configuration::Configuration, - org: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/list_blocked", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::BlockedUser>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::BlockedUser>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_current_user_orgs( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/orgs", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Organization>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Organization>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_hooks( - configuration: &configuration::Configuration, - org: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/hooks", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Hook>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Hook>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_labels( - configuration: &configuration::Configuration, - org: &str, - sort: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_sort = sort; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/labels", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_sort { - req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Label>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Label>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_members( - configuration: &configuration::Configuration, - org: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/members", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_public_members( - configuration: &configuration::Configuration, - org: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/public_members", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_quota_artifacts( - configuration: &configuration::Configuration, - org: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/quota/artifacts", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedArtifact>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedArtifact>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_quota_attachments( - configuration: &configuration::Configuration, - org: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/quota/attachments", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedAttachment>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedAttachment>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_quota_packages( - configuration: &configuration::Configuration, - org: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/quota/packages", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedPackage>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedPackage>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_repos( - configuration: &configuration::Configuration, - org: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/repos", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_team_activity_feeds( - configuration: &configuration::Configuration, - id: i64, - date: Option, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_query_date = date; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/teams/{id}/activities/feeds", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_date { - req_builder = req_builder.query(&[("date", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Activity>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Activity>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_team_member( - configuration: &configuration::Configuration, - id: i64, - username: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_path_username = username; - - let uri_str = format!( - "{}/teams/{id}/members/{username}", - configuration.base_path, - id = p_path_id, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_team_members( - configuration: &configuration::Configuration, - id: i64, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/teams/{id}/members", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_team_repo( - configuration: &configuration::Configuration, - id: i64, - org: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_path_org = org; - let p_path_repo = repo; - - let uri_str = format!( - "{}/teams/{id}/repos/{org}/{repo}", - configuration.base_path, - id = p_path_id, - org = crate::apis::urlencode(p_path_org), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_team_repos( - configuration: &configuration::Configuration, - id: i64, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/teams/{id}/repos", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_teams( - configuration: &configuration::Configuration, - org: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/teams", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Team>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Team>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_list_user_orgs( - configuration: &configuration::Configuration, - username: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/users/{username}/orgs", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Organization>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Organization>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_publicize_member( - configuration: &configuration::Configuration, - org: &str, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_username = username; - - let uri_str = format!( - "{}/orgs/{org}/public_members/{username}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_remove_team_member( - configuration: &configuration::Configuration, - id: i64, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_path_username = username; - - let uri_str = format!( - "{}/teams/{id}/members/{username}", - configuration.base_path, - id = p_path_id, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -/// This does not delete the repository, it only removes the repository from the team. -pub async fn org_remove_team_repository( - configuration: &configuration::Configuration, - id: i64, - org: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_path_org = org; - let p_path_repo = repo; - - let uri_str = format!( - "{}/teams/{id}/repos/{org}/{repo}", - configuration.base_path, - id = p_path_id, - org = crate::apis::urlencode(p_path_org), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_search_run_jobs( - configuration: &configuration::Configuration, - org: &str, - labels: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_labels = labels; - - let uri_str = format!( - "{}/orgs/{org}/actions/runners/jobs", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_labels { - req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionRunJob>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionRunJob>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_unblock_user( - configuration: &configuration::Configuration, - org: &str, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_username = username; - - let uri_str = format!( - "{}/orgs/{org}/unblock/{username}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn org_update_avatar( - configuration: &configuration::Configuration, - org: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}/avatar", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn rename_org( - configuration: &configuration::Configuration, - org: &str, - body: models::RenameOrgOption, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}/rename", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn team_search( - configuration: &configuration::Configuration, - org: &str, - q: Option<&str>, - include_desc: Option, - page: Option, - limit: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_query_q = q; - let p_query_include_desc = include_desc; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/orgs/{org}/teams/search", - configuration.base_path, - org = crate::apis::urlencode(p_path_org) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_q { - req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_include_desc { - req_builder = req_builder.query(&[("include_desc", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TeamSearchResults`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TeamSearchResults`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn update_org_secret( - configuration: &configuration::Configuration, - org: &str, - secretname: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_secretname = secretname; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}/actions/secrets/{secretname}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - secretname = crate::apis::urlencode(p_path_secretname) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn update_org_variable( - configuration: &configuration::Configuration, - org: &str, - variablename: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_org = org; - let p_path_variablename = variablename; - let p_body_body = body; - - let uri_str = format!( - "{}/orgs/{org}/actions/variables/{variablename}", - configuration.base_path, - org = crate::apis::urlencode(p_path_org), - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} diff --git a/forgejo-openapi/src/apis/package_api.rs b/forgejo-openapi/src/apis/package_api.rs deleted file mode 100644 index 143d0a9..0000000 --- a/forgejo-openapi/src/apis/package_api.rs +++ /dev/null @@ -1,651 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use super::{configuration, ContentType, Error}; -use crate::{apis::ResponseContent, models}; -use reqwest; -use serde::{de::Error as _, Deserialize, Serialize}; - -/// struct for typed errors of method [`delete_package`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeletePackageError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_package`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetPackageError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`link_package`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum LinkPackageError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`list_package_files`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListPackageFilesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`list_packages`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListPackagesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`unlink_package`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UnlinkPackageError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -pub async fn delete_package( - configuration: &configuration::Configuration, - owner: &str, - r#type: &str, - name: &str, - version: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_type = r#type; - let p_path_name = name; - let p_path_version = version; - - let uri_str = format!("{}/packages/{owner}/{type}/{name}/{version}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name), version=crate::apis::urlencode(p_path_version)); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_package( - configuration: &configuration::Configuration, - owner: &str, - r#type: &str, - name: &str, - version: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_type = r#type; - let p_path_name = name; - let p_path_version = version; - - let uri_str = format!("{}/packages/{owner}/{type}/{name}/{version}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name), version=crate::apis::urlencode(p_path_version)); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Package`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Package`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn link_package( - configuration: &configuration::Configuration, - owner: &str, - r#type: &str, - name: &str, - repo_name: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_type = r#type; - let p_path_name = name; - let p_path_repo_name = repo_name; - - let uri_str = format!("{}/packages/{owner}/{type}/{name}/-/link/{repo_name}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name), repo_name=crate::apis::urlencode(p_path_repo_name)); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn list_package_files( - configuration: &configuration::Configuration, - owner: &str, - r#type: &str, - name: &str, - version: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_type = r#type; - let p_path_name = name; - let p_path_version = version; - - let uri_str = format!("{}/packages/{owner}/{type}/{name}/{version}/files", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name), version=crate::apis::urlencode(p_path_version)); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PackageFile>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PackageFile>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn list_packages( - configuration: &configuration::Configuration, - owner: &str, - page: Option, - limit: Option, - r#type: Option<&str>, - q: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_query_page = page; - let p_query_limit = limit; - let p_query_type = r#type; - let p_query_q = q; - - let uri_str = format!( - "{}/packages/{owner}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_type { - req_builder = req_builder.query(&[("type", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_q { - req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Package>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Package>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn unlink_package( - configuration: &configuration::Configuration, - owner: &str, - r#type: &str, - name: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_type = r#type; - let p_path_name = name; - - let uri_str = format!("{}/packages/{owner}/{type}/{name}/-/unlink", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), type=crate::apis::urlencode(p_path_type), name=crate::apis::urlencode(p_path_name)); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} diff --git a/forgejo-openapi/src/apis/repository_api.rs b/forgejo-openapi/src/apis/repository_api.rs deleted file mode 100644 index 41ff658..0000000 --- a/forgejo-openapi/src/apis/repository_api.rs +++ /dev/null @@ -1,20995 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use super::{configuration, ContentType, Error}; -use crate::{apis::ResponseContent, models}; -use reqwest; -use serde::{de::Error as _, Deserialize, Serialize}; -use tokio::fs::File as TokioFile; -use tokio_util::codec::{BytesCodec, FramedRead}; - -/// struct for typed errors of method [`accept_repo_transfer`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AcceptRepoTransferError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status413(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`action_run`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ActionRunError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`create_current_user_repo`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateCurrentUserRepoError { - Status400(models::ApiError), - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status409(), - Status413(), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`create_fork`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateForkError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status409(), - Status413(), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`create_repo_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateRepoVariableError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`delete_repo_secret`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteRepoSecretError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`delete_repo_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteRepoVariableError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`dispatch_workflow`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DispatchWorkflowError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`generate_repo`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GenerateRepoError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status409(), - Status413(), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_annotated_tag`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetAnnotatedTagError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_blob`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetBlobError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_blobs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetBlobsError { - Status400(models::ApiError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_repo_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetRepoVariableError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_repo_variables_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetRepoVariablesListError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_tree`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetTreeError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`list_action_runs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListActionRunsError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`list_action_tasks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListActionTasksError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status409(), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`list_forks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListForksError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`reject_repo_transfer`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RejectRepoTransferError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_add_collaborator`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoAddCollaboratorError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_add_flag`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoAddFlagError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_add_push_mirror`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoAddPushMirrorError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status413(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_add_team`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoAddTeamError { - Status404(models::ApiNotFound), - Status405(models::ApiError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_add_topic`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoAddTopicError { - Status404(models::ApiNotFound), - Status422(models::ApiInvalidTopicsError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_apply_diff_patch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoApplyDiffPatchError { - Status404(models::ApiNotFound), - Status413(), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_cancel_scheduled_auto_merge`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCancelScheduledAutoMergeError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_change_files`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoChangeFilesError { - Status403(models::ApiError), - Status404(models::ApiNotFound), - Status409(), - Status413(), - Status422(models::ApiError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_check_collaborator`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCheckCollaboratorError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_check_flag`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCheckFlagError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_check_team`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCheckTeamError { - Status404(models::ApiNotFound), - Status405(models::ApiError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_compare_diff`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCompareDiffError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_convert`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoConvertError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_branch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreateBranchError { - Status403(), - Status404(), - Status409(), - Status413(), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_branch_protection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreateBranchProtectionError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_file`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreateFileError { - Status403(models::ApiError), - Status404(models::ApiNotFound), - Status409(), - Status413(), - Status422(models::ApiError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreateHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreateKeyError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_pull_request`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreatePullRequestError { - Status404(models::ApiNotFound), - Status409(models::ApiError), - Status413(), - Status422(models::ApiValidationError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_pull_review`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreatePullReviewError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_pull_review_comment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreatePullReviewCommentError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_pull_review_requests`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreatePullReviewRequestsError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_release`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreateReleaseError { - Status404(models::ApiNotFound), - Status409(models::ApiError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_release_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreateReleaseAttachmentError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - Status413(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_status`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreateStatusError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_tag`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreateTagError { - Status404(models::ApiNotFound), - Status405(), - Status409(), - Status413(), - Status422(models::ApiValidationError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_tag_protection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreateTagProtectionError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_create_wiki_page`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoCreateWikiPageError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status413(), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_all_flags`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteAllFlagsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_avatar`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteAvatarError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_branch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteBranchError { - Status403(models::ApiError), - Status404(models::ApiNotFound), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_branch_protection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteBranchProtectionError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_collaborator`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteCollaboratorError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_file`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteFileError { - Status400(models::ApiError), - Status403(models::ApiError), - Status404(models::ApiError), - Status413(), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_flag`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteFlagError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_git_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteGitHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteKeyError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_pull_review`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeletePullReviewError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_pull_review_comment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeletePullReviewCommentError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_pull_review_requests`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeletePullReviewRequestsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_push_mirror`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeletePushMirrorError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_release`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteReleaseError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_release_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteReleaseAttachmentError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_release_by_tag`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteReleaseByTagError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_tag`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteTagError { - Status404(models::ApiNotFound), - Status405(), - Status409(), - Status422(models::ApiValidationError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_tag_protection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteTagProtectionError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_team`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteTeamError { - Status404(models::ApiNotFound), - Status405(models::ApiError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_topic`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteTopicError { - Status404(models::ApiNotFound), - Status422(models::ApiInvalidTopicsError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_delete_wiki_page`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDeleteWikiPageError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_dismiss_pull_review`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDismissPullReviewError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_download_commit_diff_or_patch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDownloadCommitDiffOrPatchError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_download_pull_diff_or_patch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoDownloadPullDiffOrPatchError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_edit`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoEditError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_edit_branch_protection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoEditBranchProtectionError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_edit_git_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoEditGitHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_edit_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoEditHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_edit_pull_request`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoEditPullRequestError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status409(models::ApiError), - Status412(models::ApiError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_edit_release`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoEditReleaseError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_edit_release_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoEditReleaseAttachmentError { - Status404(models::ApiNotFound), - Status413(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_edit_tag_protection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoEditTagProtectionError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_edit_wiki_page`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoEditWikiPageError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status413(), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_all_commits`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetAllCommitsError { - Status404(models::ApiNotFound), - Status409(models::ApiError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_archive`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetArchiveError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_assignees`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetAssigneesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_branch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetBranchError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_branch_protection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetBranchProtectionError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_by_id`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetByIdError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_combined_status_by_ref`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetCombinedStatusByRefError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_commit_pull_request`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetCommitPullRequestError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_contents`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetContentsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_contents_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetContentsListError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_editor_config`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetEditorConfigError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_git_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetGitHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_issue_config`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetIssueConfigError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_issue_templates`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetIssueTemplatesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetKeyError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_languages`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetLanguagesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_latest_release`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetLatestReleaseError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_note`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetNoteError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_pull_request`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetPullRequestError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_pull_request_by_base_head`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetPullRequestByBaseHeadError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_pull_request_commits`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetPullRequestCommitsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_pull_request_files`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetPullRequestFilesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_pull_review`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetPullReviewError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_pull_review_comment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetPullReviewCommentError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_pull_review_comments`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetPullReviewCommentsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_push_mirror_by_remote_name`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetPushMirrorByRemoteNameError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_raw_file`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetRawFileError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_raw_file_or_lfs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetRawFileOrLfsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_release`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetReleaseError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_release_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetReleaseAttachmentError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_release_by_tag`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetReleaseByTagError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_repo_permissions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetRepoPermissionsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_reviewers`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetReviewersError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_runner_registration_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetRunnerRegistrationTokenError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_single_commit`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetSingleCommitError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_tag`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetTagError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_tag_protection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetTagProtectionError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_wiki_page`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetWikiPageError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_wiki_page_revisions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetWikiPageRevisionsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_get_wiki_pages`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoGetWikiPagesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_actions_secrets`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListActionsSecretsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_activity_feeds`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListActivityFeedsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_all_git_refs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListAllGitRefsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_branch_protection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListBranchProtectionError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_branches`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListBranchesError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_collaborators`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListCollaboratorsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_flags`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListFlagsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_git_hooks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListGitHooksError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_git_refs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListGitRefsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_hooks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListHooksError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_keys`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListKeysError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_pinned_issues`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListPinnedIssuesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_pinned_pull_requests`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListPinnedPullRequestsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_pull_requests`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListPullRequestsError { - Status404(models::ApiNotFound), - Status500(models::ApiError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_pull_reviews`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListPullReviewsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_push_mirrors`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListPushMirrorsError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_release_attachments`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListReleaseAttachmentsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_releases`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListReleasesError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_stargazers`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListStargazersError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_statuses`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListStatusesError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_statuses_by_ref`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListStatusesByRefError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_subscribers`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListSubscribersError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_tag_protection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListTagProtectionError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_tags`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListTagsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_teams`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListTeamsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_list_topics`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoListTopicsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_merge_pull_request`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoMergePullRequestError { - Status404(models::ApiNotFound), - Status405(), - Status409(models::ApiError), - Status413(), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_migrate`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoMigrateError { - Status403(models::ApiForbiddenError), - Status409(), - Status413(), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_mirror_sync`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoMirrorSyncError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status413(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_new_pin_allowed`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoNewPinAllowedError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_pull_request_is_merged`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoPullRequestIsMergedError { - Status404(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_push_mirror_sync`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoPushMirrorSyncError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status413(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_remove_note`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoRemoveNoteError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_replace_all_flags`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoReplaceAllFlagsError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_search`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoSearchError { - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_search_run_jobs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoSearchRunJobsError { - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_set_note`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoSetNoteError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_signing_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoSigningKeyError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_submit_pull_review`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoSubmitPullReviewError { - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_sync_fork_branch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoSyncForkBranchError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_sync_fork_branch_info`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoSyncForkBranchInfoError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_sync_fork_default`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoSyncForkDefaultError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_sync_fork_default_info`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoSyncForkDefaultInfoError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_test_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoTestHookError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_tracked_times`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoTrackedTimesError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_transfer`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoTransferError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status413(), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_un_dismiss_pull_review`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoUnDismissPullReviewError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_update_avatar`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoUpdateAvatarError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_update_branch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoUpdateBranchError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_update_file`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoUpdateFileError { - Status403(models::ApiError), - Status404(models::ApiNotFound), - Status409(), - Status413(), - Status422(models::ApiError), - Status423(models::ApiRepoArchivedError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_update_pull_request`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoUpdatePullRequestError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status409(models::ApiError), - Status413(), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_update_topics`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoUpdateTopicsError { - Status404(models::ApiNotFound), - Status422(models::ApiInvalidTopicsError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`repo_validate_issue_config`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RepoValidateIssueConfigError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`topic_search`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum TopicSearchError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`update_repo_secret`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateRepoSecretError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`update_repo_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateRepoVariableError { - Status400(models::ApiError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_check_subscription`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentCheckSubscriptionError { - Status404(), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_delete_subscription`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentDeleteSubscriptionError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_put_subscription`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentPutSubscriptionError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_tracked_times`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserTrackedTimesError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -pub async fn accept_repo_transfer( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/transfer/accept", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn action_run( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - run_id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_run_id = run_id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/runs/{run_id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - run_id = p_path_run_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActionRun`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActionRun`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn create_current_user_repo( - configuration: &configuration::Configuration, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/user/repos", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn create_fork( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/forks", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn create_repo_variable( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - variablename: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_variablename = variablename; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/variables/{variablename}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn delete_repo_secret( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - secretname: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_secretname = secretname; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/secrets/{secretname}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - secretname = crate::apis::urlencode(p_path_secretname) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn delete_repo_variable( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - variablename: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_variablename = variablename; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/variables/{variablename}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn dispatch_workflow( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - workflowfilename: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_workflowfilename = workflowfilename; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - workflowfilename = crate::apis::urlencode(p_path_workflowfilename) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DispatchWorkflowRun`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DispatchWorkflowRun`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn generate_repo( - configuration: &configuration::Configuration, - template_owner: &str, - template_repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_template_owner = template_owner; - let p_path_template_repo = template_repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{template_owner}/{template_repo}/generate", - configuration.base_path, - template_owner = crate::apis::urlencode(p_path_template_owner), - template_repo = crate::apis::urlencode(p_path_template_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_annotated_tag( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_sha = sha; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/git/tags/{sha}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - sha = crate::apis::urlencode(p_path_sha) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AnnotatedTag`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AnnotatedTag`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_blob( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_sha = sha; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/git/blobs/{sha}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - sha = crate::apis::urlencode(p_path_sha) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GitBlob`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GitBlob`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_blobs( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - shas: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_shas = shas; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/git/blobs", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - req_builder = req_builder.query(&[("shas", &p_query_shas.to_string())]); - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::GitBlob>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::GitBlob>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_repo_variable( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - variablename: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_variablename = variablename; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/variables/{variablename}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActionVariable`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActionVariable`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_repo_variables_list( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/variables", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionVariable>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionVariable>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_tree( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: &str, - recursive: Option, - page: Option, - per_page: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_sha = sha; - let p_query_recursive = recursive; - let p_query_page = page; - let p_query_per_page = per_page; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/git/trees/{sha}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - sha = crate::apis::urlencode(p_path_sha) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_recursive { - req_builder = req_builder.query(&[("recursive", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_per_page { - req_builder = req_builder.query(&[("per_page", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GitTreeResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GitTreeResponse`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn list_action_runs( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, - event: Option>, - status: Option>, - run_number: Option, - head_sha: Option<&str>, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - let p_query_event = event; - let p_query_status = status; - let p_query_run_number = run_number; - let p_query_head_sha = head_sha; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/runs", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_event { - req_builder = match "csv" { - "multi" => req_builder.query( - ¶m_value - .into_iter() - .map(|p| ("event".to_owned(), p.to_string())) - .collect::>(), - ), - _ => req_builder.query(&[( - "event", - ¶m_value - .into_iter() - .map(|p| p.to_string()) - .collect::>() - .join(",") - .to_string(), - )]), - }; - } - if let Some(ref param_value) = p_query_status { - req_builder = match "csv" { - "multi" => req_builder.query( - ¶m_value - .into_iter() - .map(|p| ("status".to_owned(), p.to_string())) - .collect::>(), - ), - _ => req_builder.query(&[( - "status", - ¶m_value - .into_iter() - .map(|p| p.to_string()) - .collect::>() - .join(",") - .to_string(), - )]), - }; - } - if let Some(ref param_value) = p_query_run_number { - req_builder = req_builder.query(&[("run_number", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_head_sha { - req_builder = req_builder.query(&[("head_sha", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ListActionRunResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ListActionRunResponse`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn list_action_tasks( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/tasks", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActionTaskResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActionTaskResponse`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn list_forks( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/forks", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn reject_repo_transfer( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/transfer/reject", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_add_collaborator( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - collaborator: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_collaborator = collaborator; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/collaborators/{collaborator}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - collaborator = crate::apis::urlencode(p_path_collaborator) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_add_flag( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - flag: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_flag = flag; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/flags/{flag}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - flag = crate::apis::urlencode(p_path_flag) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_add_push_mirror( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/push_mirrors", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PushMirror`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PushMirror`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_add_team( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - team: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_team = team; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/teams/{team}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - team = crate::apis::urlencode(p_path_team) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_add_topic( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - topic: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_topic = topic; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/topics/{topic}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - topic = crate::apis::urlencode(p_path_topic) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_apply_diff_patch( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: models::UpdateFileOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/diffpatch", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FileResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FileResponse`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_cancel_scheduled_auto_merge( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/merge", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_change_files( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: models::ChangeFilesOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/contents", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FilesResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FilesResponse`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -/// If the user is a collaborator, return 204. If the user is not a collaborator, return 404. -pub async fn repo_check_collaborator( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - collaborator: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_collaborator = collaborator; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/collaborators/{collaborator}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - collaborator = crate::apis::urlencode(p_path_collaborator) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_check_flag( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - flag: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_flag = flag; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/flags/{flag}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - flag = crate::apis::urlencode(p_path_flag) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_check_team( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - team: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_team = team; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/teams/{team}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - team = crate::apis::urlencode(p_path_team) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Team`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Team`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_compare_diff( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - basehead: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_basehead = basehead; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/compare/{basehead}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - basehead = crate::apis::urlencode(p_path_basehead) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Compare`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Compare`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_convert( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/convert", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_branch( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/branches", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Branch`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Branch`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_branch_protection( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/branch_protections", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BranchProtection`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BranchProtection`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_file( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - filepath: &str, - body: models::CreateFileOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_filepath = filepath; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/contents/{filepath}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - filepath = crate::apis::urlencode(p_path_filepath) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FileResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FileResponse`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_hook( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/hooks", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_key( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/keys", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeployKey`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeployKey`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_pull_request( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullRequest`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullRequest`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_pull_review( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: models::CreatePullReviewOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/reviews", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReview`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReview`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_pull_review_comment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - id: i64, - body: models::CreatePullReviewComment, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReviewComment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReviewComment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_pull_review_requests( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: models::PullReviewRequestOptions, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/requested_reviewers", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PullReview>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PullReview>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_release( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Release`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Release`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_release_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - name: Option<&str>, - attachment: Option, - external_url: Option<&str>, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_query_name = name; - let p_form_attachment = attachment; - let p_form_external_url = external_url; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases/{id}/assets", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref param_value) = p_query_name { - req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - let mut multipart_form = reqwest::multipart::Form::new(); - if let Some(ref param_value) = p_form_attachment { - let file = TokioFile::open(param_value).await?; - let stream = FramedRead::new(file, BytesCodec::new()); - let file_name = param_value - .file_name() - .map(|n| n.to_string_lossy().to_string()) - .unwrap_or_default(); - let file_part = reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)) - .file_name(file_name); - multipart_form = multipart_form.part("attachment", file_part); - } - if let Some(param_value) = p_form_external_url { - multipart_form = multipart_form.text("external_url", param_value.to_string()); - } - req_builder = req_builder.multipart(multipart_form); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_status( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_sha = sha; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/statuses/{sha}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - sha = crate::apis::urlencode(p_path_sha) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CommitStatus`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CommitStatus`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_tag( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/tags", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Tag`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Tag`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_tag_protection( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/tag_protections", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TagProtection`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TagProtection`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_create_wiki_page( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/wiki/new", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WikiPage`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WikiPage`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_all_flags( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/flags", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_avatar( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/avatar", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_branch( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - branch: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_branch = branch; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/branches/{branch}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - branch = crate::apis::urlencode(p_path_branch) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_branch_protection( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - name: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_name = name; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/branch_protections/{name}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - name = crate::apis::urlencode(p_path_name) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_collaborator( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - collaborator: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_collaborator = collaborator; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/collaborators/{collaborator}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - collaborator = crate::apis::urlencode(p_path_collaborator) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_file( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - filepath: &str, - body: models::DeleteFileOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_filepath = filepath; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/contents/{filepath}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - filepath = crate::apis::urlencode(p_path_filepath) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FileDeleteResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FileDeleteResponse`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_flag( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - flag: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_flag = flag; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/flags/{flag}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - flag = crate::apis::urlencode(p_path_flag) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_git_hook( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/hooks/git/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = crate::apis::urlencode(p_path_id) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_hook( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/hooks/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_key( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/keys/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_pull_review( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_pull_review_comment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - id: i64, - comment: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - let p_path_comment = comment; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id, - comment = p_path_comment - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_pull_review_requests( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: models::PullReviewRequestOptions, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/requested_reviewers", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_push_mirror( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - name: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_name = name; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/push_mirrors/{name}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - name = crate::apis::urlencode(p_path_name) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_release( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_release_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - attachment_id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_path_attachment_id = attachment_id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id, - attachment_id = p_path_attachment_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_release_by_tag( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - tag: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_tag = tag; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases/tags/{tag}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - tag = crate::apis::urlencode(p_path_tag) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_tag( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - tag: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_tag = tag; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/tags/{tag}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - tag = crate::apis::urlencode(p_path_tag) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_tag_protection( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/tag_protections/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_team( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - team: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_team = team; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/teams/{team}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - team = crate::apis::urlencode(p_path_team) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_topic( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - topic: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_topic = topic; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/topics/{topic}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - topic = crate::apis::urlencode(p_path_topic) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_delete_wiki_page( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page_name: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_page_name = page_name; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/wiki/page/{pageName}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - pageName = crate::apis::urlencode(p_path_page_name) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_dismiss_pull_review( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - id: i64, - body: models::DismissPullReviewOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReview`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReview`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_download_commit_diff_or_patch( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: &str, - diff_type: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_sha = sha; - let p_path_diff_type = diff_type; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/git/commits/{sha}.{diffType}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - sha = crate::apis::urlencode(p_path_sha), - diffType = crate::apis::urlencode(p_path_diff_type) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Ok(content), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_download_pull_diff_or_patch( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - diff_type: &str, - binary: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_diff_type = diff_type; - let p_query_binary = binary; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}.{diffType}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - diffType = crate::apis::urlencode(p_path_diff_type) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_binary { - req_builder = req_builder.query(&[("binary", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Ok(content), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_edit( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_edit_branch_protection( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - name: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_name = name; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/branch_protections/{name}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - name = crate::apis::urlencode(p_path_name) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BranchProtection`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BranchProtection`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_edit_git_hook( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/hooks/git/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = crate::apis::urlencode(p_path_id) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GitHook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GitHook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_edit_hook( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/hooks/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_edit_pull_request( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullRequest`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullRequest`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_edit_release( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Release`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Release`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_edit_release_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - attachment_id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_path_attachment_id = attachment_id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id, - attachment_id = p_path_attachment_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_edit_tag_protection( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/tag_protections/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TagProtection`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TagProtection`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_edit_wiki_page( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page_name: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_page_name = page_name; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/wiki/page/{pageName}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - pageName = crate::apis::urlencode(p_path_page_name) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WikiPage`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WikiPage`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_all_commits( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: Option<&str>, - path: Option<&str>, - stat: Option, - verification: Option, - files: Option, - page: Option, - limit: Option, - not: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_sha = sha; - let p_query_path = path; - let p_query_stat = stat; - let p_query_verification = verification; - let p_query_files = files; - let p_query_page = page; - let p_query_limit = limit; - let p_query_not = not; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/commits", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_sha { - req_builder = req_builder.query(&[("sha", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_path { - req_builder = req_builder.query(&[("path", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_stat { - req_builder = req_builder.query(&[("stat", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_verification { - req_builder = req_builder.query(&[("verification", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_files { - req_builder = req_builder.query(&[("files", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_not { - req_builder = req_builder.query(&[("not", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Commit>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Commit>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_archive( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - archive: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_archive = archive; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/archive/{archive}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - archive = crate::apis::urlencode(p_path_archive) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_assignees( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/assignees", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_branch( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - branch: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_branch = branch; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/branches/{branch}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - branch = crate::apis::urlencode(p_path_branch) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Branch`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Branch`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_branch_protection( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - name: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_name = name; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/branch_protections/{name}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - name = crate::apis::urlencode(p_path_name) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BranchProtection`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BranchProtection`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_by_id( - configuration: &configuration::Configuration, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!( - "{}/repositories/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_combined_status_by_ref( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - r#ref: &str, - page: Option, - limit: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_ref = r#ref; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/repos/{owner}/{repo}/commits/{ref}/status", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), ref=crate::apis::urlencode(p_path_ref)); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CombinedStatus`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CombinedStatus`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_commit_pull_request( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_sha = sha; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/commits/{sha}/pull", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - sha = crate::apis::urlencode(p_path_sha) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullRequest`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullRequest`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_contents( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - filepath: &str, - r#ref: Option<&str>, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_filepath = filepath; - let p_query_ref = r#ref; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/contents/{filepath}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - filepath = crate::apis::urlencode(p_path_filepath) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_ref { - req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ContentsResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ContentsResponse`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_contents_list( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - r#ref: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_ref = r#ref; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/contents", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_ref { - req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ContentsResponse>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ContentsResponse>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_editor_config( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - filepath: &str, - r#ref: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_filepath = filepath; - let p_query_ref = r#ref; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/editorconfig/{filepath}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - filepath = crate::apis::urlencode(p_path_filepath) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_ref { - req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, String>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, String>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_git_hook( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/hooks/git/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = crate::apis::urlencode(p_path_id) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GitHook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GitHook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_hook( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/hooks/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_issue_config( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issue_config", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IssueConfig`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IssueConfig`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_issue_templates( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issue_templates", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::IssueTemplate>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::IssueTemplate>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_key( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/keys/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeployKey`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeployKey`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_languages( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/languages", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, i64>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, i64>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_latest_release( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases/latest", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Release`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Release`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_note( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: &str, - verification: Option, - files: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_sha = sha; - let p_query_verification = verification; - let p_query_files = files; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/git/notes/{sha}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - sha = crate::apis::urlencode(p_path_sha) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_verification { - req_builder = req_builder.query(&[("verification", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_files { - req_builder = req_builder.query(&[("files", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Note`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Note`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_pull_request( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullRequest`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullRequest`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_pull_request_by_base_head( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - base: &str, - head: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_base = base; - let p_path_head = head; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{base}/{head}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - base = crate::apis::urlencode(p_path_base), - head = crate::apis::urlencode(p_path_head) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullRequest`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullRequest`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_pull_request_commits( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - page: Option, - limit: Option, - verification: Option, - files: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_query_page = page; - let p_query_limit = limit; - let p_query_verification = verification; - let p_query_files = files; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/commits", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_verification { - req_builder = req_builder.query(&[("verification", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_files { - req_builder = req_builder.query(&[("files", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Commit>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Commit>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_pull_request_files( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - skip_to: Option<&str>, - whitespace: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_query_skip_to = skip_to; - let p_query_whitespace = whitespace; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/files", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_skip_to { - req_builder = req_builder.query(&[("skip-to", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_whitespace { - req_builder = req_builder.query(&[("whitespace", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ChangedFile>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ChangedFile>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_pull_review( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReview`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReview`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_pull_review_comment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - id: i64, - comment: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - let p_path_comment = comment; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id, - comment = p_path_comment - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReviewComment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReviewComment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_pull_review_comments( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - id: i64, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PullReviewComment>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PullReviewComment>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_push_mirror_by_remote_name( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - name: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_name = name; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/push_mirrors/{name}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - name = crate::apis::urlencode(p_path_name) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PushMirror`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PushMirror`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_raw_file( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - filepath: &str, - r#ref: Option<&str>, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_filepath = filepath; - let p_query_ref = r#ref; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/raw/{filepath}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - filepath = crate::apis::urlencode(p_path_filepath) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_ref { - req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(resp) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_raw_file_or_lfs( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - filepath: &str, - r#ref: Option<&str>, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_filepath = filepath; - let p_query_ref = r#ref; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/media/{filepath}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - filepath = crate::apis::urlencode(p_path_filepath) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_ref { - req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(resp) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_release( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Release`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Release`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_release_attachment( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - attachment_id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_path_attachment_id = attachment_id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id, - attachment_id = p_path_attachment_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Attachment`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Attachment`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_release_by_tag( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - tag: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_tag = tag; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases/tags/{tag}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - tag = crate::apis::urlencode(p_path_tag) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Release`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Release`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_repo_permissions( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - collaborator: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_collaborator = collaborator; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/collaborators/{collaborator}/permission", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - collaborator = crate::apis::urlencode(p_path_collaborator) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RepoCollaboratorPermission`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RepoCollaboratorPermission`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_reviewers( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/reviewers", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_runner_registration_token( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/runners/registration-token", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RegistrationToken`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RegistrationToken`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_single_commit( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: &str, - stat: Option, - verification: Option, - files: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_sha = sha; - let p_query_stat = stat; - let p_query_verification = verification; - let p_query_files = files; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/git/commits/{sha}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - sha = crate::apis::urlencode(p_path_sha) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_stat { - req_builder = req_builder.query(&[("stat", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_verification { - req_builder = req_builder.query(&[("verification", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_files { - req_builder = req_builder.query(&[("files", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Commit`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Commit`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_tag( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - tag: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_tag = tag; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/tags/{tag}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - tag = crate::apis::urlencode(p_path_tag) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Tag`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Tag`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_tag_protection( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/tag_protections/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TagProtection`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TagProtection`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_wiki_page( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page_name: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_page_name = page_name; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/wiki/page/{pageName}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - pageName = crate::apis::urlencode(p_path_page_name) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WikiPage`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WikiPage`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_wiki_page_revisions( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page_name: &str, - page: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_page_name = page_name; - let p_query_page = page; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/wiki/revisions/{pageName}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - pageName = crate::apis::urlencode(p_path_page_name) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WikiCommitList`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WikiCommitList`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_get_wiki_pages( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/wiki/pages", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::WikiPageMetaData>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::WikiPageMetaData>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_actions_secrets( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/secrets", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Secret>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Secret>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_activity_feeds( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - date: Option, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_date = date; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/activities/feeds", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_date { - req_builder = req_builder.query(&[("date", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Activity>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Activity>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_all_git_refs( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/git/refs", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Reference>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Reference>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_branch_protection( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/branch_protections", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::BranchProtection>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::BranchProtection>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_branches( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/branches", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Branch>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Branch>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_collaborators( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/collaborators", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_flags( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/flags", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_git_hooks( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/hooks/git", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::GitHook>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::GitHook>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_git_refs( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - r#ref: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_ref = r#ref; - - let uri_str = format!("{}/repos/{owner}/{repo}/git/refs/{ref}", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), ref=crate::apis::urlencode(p_path_ref)); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Reference>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Reference>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_hooks( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/hooks", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Hook>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Hook>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_keys( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - key_id: Option, - fingerprint: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_key_id = key_id; - let p_query_fingerprint = fingerprint; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/keys", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_key_id { - req_builder = req_builder.query(&[("key_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_fingerprint { - req_builder = req_builder.query(&[("fingerprint", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::DeployKey>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::DeployKey>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_pinned_issues( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issues/pinned", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Issue>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Issue>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_pinned_pull_requests( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/pinned", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PullRequest>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PullRequest>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_pull_requests( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - state: Option<&str>, - sort: Option<&str>, - milestone: Option, - labels: Option>, - poster: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_state = state; - let p_query_sort = sort; - let p_query_milestone = milestone; - let p_query_labels = labels; - let p_query_poster = poster; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_state { - req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_sort { - req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_milestone { - req_builder = req_builder.query(&[("milestone", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_labels { - req_builder = match "multi" { - "multi" => req_builder.query( - ¶m_value - .into_iter() - .map(|p| ("labels".to_owned(), p.to_string())) - .collect::>(), - ), - _ => req_builder.query(&[( - "labels", - ¶m_value - .into_iter() - .map(|p| p.to_string()) - .collect::>() - .join(",") - .to_string(), - )]), - }; - } - if let Some(ref param_value) = p_query_poster { - req_builder = req_builder.query(&[("poster", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PullRequest>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PullRequest>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_pull_reviews( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/reviews", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PullReview>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PullReview>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_push_mirrors( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/push_mirrors", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PushMirror>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PushMirror>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_release_attachments( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases/{id}/assets", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Attachment>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Attachment>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_releases( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - draft: Option, - pre_release: Option, - q: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_draft = draft; - let p_query_pre_release = pre_release; - let p_query_q = q; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/releases", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_draft { - req_builder = req_builder.query(&[("draft", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_pre_release { - req_builder = req_builder.query(&[("pre-release", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_q { - req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Release>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Release>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_stargazers( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/stargazers", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_statuses( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: &str, - sort: Option<&str>, - state: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_sha = sha; - let p_query_sort = sort; - let p_query_state = state; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/statuses/{sha}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - sha = crate::apis::urlencode(p_path_sha) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_sort { - req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_state { - req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::CommitStatus>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::CommitStatus>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_statuses_by_ref( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - r#ref: &str, - sort: Option<&str>, - state: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_ref = r#ref; - let p_query_sort = sort; - let p_query_state = state; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/repos/{owner}/{repo}/commits/{ref}/statuses", configuration.base_path, owner=crate::apis::urlencode(p_path_owner), repo=crate::apis::urlencode(p_path_repo), ref=crate::apis::urlencode(p_path_ref)); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_sort { - req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_state { - req_builder = req_builder.query(&[("state", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::CommitStatus>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::CommitStatus>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_subscribers( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/subscribers", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_tag_protection( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/tag_protections", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TagProtection>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TagProtection>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_tags( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/tags", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Tag>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Tag>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_teams( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/teams", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Team>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Team>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_list_topics( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - page: Option, - limit: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/topics", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TopicName`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TopicName`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_merge_pull_request( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/merge", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_migrate( - configuration: &configuration::Configuration, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/repos/migrate", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_mirror_sync( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/mirror-sync", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_new_pin_allowed( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/new_pin_allowed", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NewIssuePinsAllowed`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NewIssuePinsAllowed`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_pull_request_is_merged( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/merge", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_push_mirror_sync( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/push_mirrors-sync", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_remove_note( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_sha = sha; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/git/notes/{sha}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - sha = crate::apis::urlencode(p_path_sha) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_replace_all_flags( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/flags", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_search( - configuration: &configuration::Configuration, - q: Option<&str>, - topic: Option, - include_desc: Option, - uid: Option, - priority_owner_id: Option, - team_id: Option, - starred_by: Option, - private: Option, - is_private: Option, - template: Option, - archived: Option, - mode: Option<&str>, - exclusive: Option, - sort: Option<&str>, - order: Option<&str>, - page: Option, - limit: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_q = q; - let p_query_topic = topic; - let p_query_include_desc = include_desc; - let p_query_uid = uid; - let p_query_priority_owner_id = priority_owner_id; - let p_query_team_id = team_id; - let p_query_starred_by = starred_by; - let p_query_private = private; - let p_query_is_private = is_private; - let p_query_template = template; - let p_query_archived = archived; - let p_query_mode = mode; - let p_query_exclusive = exclusive; - let p_query_sort = sort; - let p_query_order = order; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/repos/search", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_q { - req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_topic { - req_builder = req_builder.query(&[("topic", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_include_desc { - req_builder = req_builder.query(&[("includeDesc", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_uid { - req_builder = req_builder.query(&[("uid", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_priority_owner_id { - req_builder = req_builder.query(&[("priority_owner_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_team_id { - req_builder = req_builder.query(&[("team_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_starred_by { - req_builder = req_builder.query(&[("starredBy", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_private { - req_builder = req_builder.query(&[("private", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_is_private { - req_builder = req_builder.query(&[("is_private", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_template { - req_builder = req_builder.query(&[("template", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_archived { - req_builder = req_builder.query(&[("archived", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_mode { - req_builder = req_builder.query(&[("mode", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_exclusive { - req_builder = req_builder.query(&[("exclusive", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_sort { - req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_order { - req_builder = req_builder.query(&[("order", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SearchResults`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SearchResults`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_search_run_jobs( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - labels: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_labels = labels; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/runners/jobs", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_labels { - req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionRunJob>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionRunJob>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_set_note( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - sha: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_sha = sha; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/git/notes/{sha}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - sha = crate::apis::urlencode(p_path_sha) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Note`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Note`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_signing_key( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/signing-key.gpg", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Ok(content), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_submit_pull_review( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - id: i64, - body: models::SubmitPullReviewOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReview`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReview`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_sync_fork_branch( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - branch: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_branch = branch; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/sync_fork/{branch}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - branch = crate::apis::urlencode(p_path_branch) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_sync_fork_branch_info( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - branch: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_branch = branch; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/sync_fork/{branch}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - branch = crate::apis::urlencode(p_path_branch) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SyncForkInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SyncForkInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_sync_fork_default( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/sync_fork", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_sync_fork_default_info( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/sync_fork", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SyncForkInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SyncForkInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_test_hook( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - id: i64, - r#ref: Option<&str>, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_id = id; - let p_query_ref = r#ref; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/hooks/{id}/tests", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref param_value) = p_query_ref { - req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_tracked_times( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - user: Option<&str>, - since: Option, - before: Option, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_query_user = user; - let p_query_since = since; - let p_query_before = before; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/times", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_user { - req_builder = req_builder.query(&[("user", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_since { - req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_before { - req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TrackedTime>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TrackedTime>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_transfer( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: models::TransferRepoOption, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/transfer", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_un_dismiss_pull_review( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_path_id = id; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PullReview`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PullReview`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_update_avatar( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/avatar", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_update_branch( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - branch: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_branch = branch; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/branches/{branch}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - branch = crate::apis::urlencode(p_path_branch) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_update_file( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - filepath: &str, - body: models::UpdateFileOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_filepath = filepath; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/contents/{filepath}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - filepath = crate::apis::urlencode(p_path_filepath) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FileResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FileResponse`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_update_pull_request( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - index: i64, - style: Option<&str>, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_index = index; - let p_query_style = style; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/pulls/{index}/update", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - index = p_path_index - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref param_value) = p_query_style { - req_builder = req_builder.query(&[("style", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_update_topics( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/topics", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn repo_validate_issue_config( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/issue_config/validate", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IssueConfigValidation`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IssueConfigValidation`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn topic_search( - configuration: &configuration::Configuration, - q: &str, - page: Option, - limit: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_q = q; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/topics/search", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - req_builder = req_builder.query(&[("q", &p_query_q.to_string())]); - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TopicSearchResults`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TopicSearchResults`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn update_repo_secret( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - secretname: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_secretname = secretname; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/secrets/{secretname}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - secretname = crate::apis::urlencode(p_path_secretname) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn update_repo_variable( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - variablename: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_variablename = variablename; - let p_body_body = body; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/actions/variables/{variablename}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_check_subscription( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/subscription", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WatchInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WatchInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_delete_subscription( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/subscription", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_put_subscription( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/subscription", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WatchInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WatchInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -#[deprecated] -pub async fn user_tracked_times( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, - user: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - let p_path_user = user; - - let uri_str = format!( - "{}/repos/{owner}/{repo}/times/{user}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo), - user = crate::apis::urlencode(p_path_user) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TrackedTime>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TrackedTime>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} diff --git a/forgejo-openapi/src/apis/settings_api.rs b/forgejo-openapi/src/apis/settings_api.rs deleted file mode 100644 index 96bb2f7..0000000 --- a/forgejo-openapi/src/apis/settings_api.rs +++ /dev/null @@ -1,402 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use super::{configuration, ContentType, Error}; -use crate::{apis::ResponseContent, models}; -use reqwest; -use serde::{de::Error as _, Deserialize, Serialize}; - -/// struct for typed errors of method [`get_general_api_settings`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGeneralApiSettingsError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_general_attachment_settings`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGeneralAttachmentSettingsError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_general_repository_settings`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGeneralRepositorySettingsError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_general_ui_settings`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGeneralUiSettingsError { - UnknownValue(serde_json::Value), -} - -pub async fn get_general_api_settings( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/settings/api", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GeneralApiSettings`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GeneralApiSettings`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_general_attachment_settings( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/settings/attachment", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GeneralAttachmentSettings`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GeneralAttachmentSettings`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_general_repository_settings( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/settings/repository", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GeneralRepoSettings`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GeneralRepoSettings`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_general_ui_settings( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/settings/ui", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GeneralUiSettings`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GeneralUiSettings`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} diff --git a/forgejo-openapi/src/apis/user_api.rs b/forgejo-openapi/src/apis/user_api.rs deleted file mode 100644 index 1b2e7a2..0000000 --- a/forgejo-openapi/src/apis/user_api.rs +++ /dev/null @@ -1,8031 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use super::{configuration, ContentType, Error}; -use crate::{apis::ResponseContent, models}; -use reqwest; -use serde::{de::Error as _, Deserialize, Serialize}; - -/// struct for typed errors of method [`create_current_user_repo`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateCurrentUserRepoError { - Status400(models::ApiError), - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status409(), - Status413(), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`create_user_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateUserVariableError { - Status400(models::ApiError), - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`delete_user_secret`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteUserSecretError { - Status400(models::ApiError), - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`delete_user_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteUserVariableError { - Status400(models::ApiError), - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_user_settings`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetUserSettingsError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_user_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetUserVariableError { - Status400(models::ApiError), - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_user_variables_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetUserVariablesListError { - Status400(models::ApiError), - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_verification_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetVerificationTokenError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`update_user_secret`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateUserSecretError { - Status400(models::ApiError), - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`update_user_settings`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateUserSettingsError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`update_user_variable`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateUserVariableError { - Status400(models::ApiError), - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_add_email`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserAddEmailError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_block_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserBlockUserError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_check_following`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCheckFollowingError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_check_quota`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCheckQuotaError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_create_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCreateHookError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_create_o_auth2_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCreateOAuth2ApplicationError { - Status400(models::ApiError), - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_create_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCreateTokenError { - Status400(models::ApiError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_check_following`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentCheckFollowingError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_check_starring`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentCheckStarringError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_delete_follow`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentDeleteFollowError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_delete_gpg_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentDeleteGpgKeyError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_delete_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentDeleteKeyError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_delete_star`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentDeleteStarError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_get_gpg_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentGetGpgKeyError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_get_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentGetKeyError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_list_followers`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentListFollowersError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_list_following`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentListFollowingError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_list_gpg_keys`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentListGpgKeysError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_list_keys`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentListKeysError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_list_repos`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentListReposError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_list_starred`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentListStarredError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_list_subscriptions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentListSubscriptionsError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_post_gpg_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentPostGpgKeyError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_post_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentPostKeyError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_put_follow`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentPutFollowError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_put_star`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentPutStarError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_current_tracked_times`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserCurrentTrackedTimesError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_delete_access_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserDeleteAccessTokenError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_delete_avatar`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserDeleteAvatarError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_delete_email`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserDeleteEmailError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_delete_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserDeleteHookError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_delete_o_auth2_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserDeleteOAuth2ApplicationError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_edit_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserEditHookError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserGetError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_get_current`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserGetCurrentError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_get_heatmap_data`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserGetHeatmapDataError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_get_hook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserGetHookError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_get_o_auth2_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserGetOAuth2ApplicationError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_get_o_auth2_applications`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserGetOAuth2ApplicationsError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_get_quota`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserGetQuotaError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_get_runner_registration_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserGetRunnerRegistrationTokenError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_get_stop_watches`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserGetStopWatchesError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_get_tokens`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserGetTokensError { - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_activity_feeds`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListActivityFeedsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_blocked_users`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListBlockedUsersError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_emails`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListEmailsError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_followers`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListFollowersError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_following`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListFollowingError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_gpg_keys`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListGpgKeysError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_hooks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListHooksError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_keys`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListKeysError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_quota_artifacts`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListQuotaArtifactsError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_quota_attachments`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListQuotaAttachmentsError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_quota_packages`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListQuotaPackagesError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_repos`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListReposError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_starred`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListStarredError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_subscriptions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListSubscriptionsError { - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_list_teams`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserListTeamsError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_search`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserSearchError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_search_run_jobs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserSearchRunJobsError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_unblock_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserUnblockUserError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_update_avatar`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserUpdateAvatarError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_update_o_auth2_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserUpdateOAuth2ApplicationError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`user_verify_gpg_key`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserVerifyGpgKeyError { - Status401(models::ApiUnauthorizedError), - Status403(models::ApiForbiddenError), - Status404(models::ApiNotFound), - Status422(models::ApiValidationError), - UnknownValue(serde_json::Value), -} - -pub async fn create_current_user_repo( - configuration: &configuration::Configuration, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/user/repos", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Repository`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Repository`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn create_user_variable( - configuration: &configuration::Configuration, - variablename: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_variablename = variablename; - let p_body_body = body; - - let uri_str = format!( - "{}/user/actions/variables/{variablename}", - configuration.base_path, - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn delete_user_secret( - configuration: &configuration::Configuration, - secretname: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_secretname = secretname; - - let uri_str = format!( - "{}/user/actions/secrets/{secretname}", - configuration.base_path, - secretname = crate::apis::urlencode(p_path_secretname) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn delete_user_variable( - configuration: &configuration::Configuration, - variablename: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_variablename = variablename; - - let uri_str = format!( - "{}/user/actions/variables/{variablename}", - configuration.base_path, - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_user_settings( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/user/settings", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserSettings`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserSettings`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_user_variable( - configuration: &configuration::Configuration, - variablename: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_variablename = variablename; - - let uri_str = format!( - "{}/user/actions/variables/{variablename}", - configuration.base_path, - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ActionVariable`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ActionVariable`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_user_variables_list( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/actions/variables", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionVariable>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionVariable>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_verification_token( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/user/gpg_key_token", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Ok(content), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn update_user_secret( - configuration: &configuration::Configuration, - secretname: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_secretname = secretname; - let p_body_body = body; - - let uri_str = format!( - "{}/user/actions/secrets/{secretname}", - configuration.base_path, - secretname = crate::apis::urlencode(p_path_secretname) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn update_user_settings( - configuration: &configuration::Configuration, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/user/settings", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserSettings`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserSettings`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn update_user_variable( - configuration: &configuration::Configuration, - variablename: &str, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_variablename = variablename; - let p_body_body = body; - - let uri_str = format!( - "{}/user/actions/variables/{variablename}", - configuration.base_path, - variablename = crate::apis::urlencode(p_path_variablename) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_add_email( - configuration: &configuration::Configuration, - body: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/user/emails", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Email>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Email>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_block_user( - configuration: &configuration::Configuration, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - - let uri_str = format!( - "{}/user/block/{username}", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_check_following( - configuration: &configuration::Configuration, - username: &str, - target: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_path_target = target; - - let uri_str = format!( - "{}/users/{username}/following/{target}", - configuration.base_path, - username = crate::apis::urlencode(p_path_username), - target = crate::apis::urlencode(p_path_target) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_check_quota( - configuration: &configuration::Configuration, - subject: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_subject = subject; - - let uri_str = format!("{}/user/quota/check", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - req_builder = req_builder.query(&[("subject", &p_query_subject.to_string())]); - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `bool`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `bool`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_create_hook( - configuration: &configuration::Configuration, - body: models::CreateHookOption, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/user/hooks", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_create_o_auth2_application( - configuration: &configuration::Configuration, - body: models::CreateOAuth2ApplicationOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/user/applications/oauth2", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OAuth2Application`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OAuth2Application`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_create_token( - configuration: &configuration::Configuration, - username: &str, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_body_body = body; - - let uri_str = format!( - "{}/users/{username}/tokens", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AccessToken`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AccessToken`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_check_following( - configuration: &configuration::Configuration, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - - let uri_str = format!( - "{}/user/following/{username}", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_check_starring( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/user/starred/{owner}/{repo}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_delete_follow( - configuration: &configuration::Configuration, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - - let uri_str = format!( - "{}/user/following/{username}", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_delete_gpg_key( - configuration: &configuration::Configuration, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!( - "{}/user/gpg_keys/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_delete_key( - configuration: &configuration::Configuration, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!("{}/user/keys/{id}", configuration.base_path, id = p_path_id); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_delete_star( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/user/starred/{owner}/{repo}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_get_gpg_key( - configuration: &configuration::Configuration, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!( - "{}/user/gpg_keys/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GpgKey`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GpgKey`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_get_key( - configuration: &configuration::Configuration, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!("{}/user/keys/{id}", configuration.base_path, id = p_path_id); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PublicKey`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PublicKey`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_list_followers( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/followers", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_list_following( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/following", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_list_gpg_keys( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/gpg_keys", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::GpgKey>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::GpgKey>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_list_keys( - configuration: &configuration::Configuration, - fingerprint: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_fingerprint = fingerprint; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/keys", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_fingerprint { - req_builder = req_builder.query(&[("fingerprint", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PublicKey>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PublicKey>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_list_repos( - configuration: &configuration::Configuration, - page: Option, - limit: Option, - order_by: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - let p_query_order_by = order_by; - - let uri_str = format!("{}/user/repos", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_order_by { - req_builder = req_builder.query(&[("order_by", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_list_starred( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/starred", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_list_subscriptions( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/subscriptions", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_post_gpg_key( - configuration: &configuration::Configuration, - form: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_form = form; - - let uri_str = format!("{}/user/gpg_keys", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_form); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GpgKey`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GpgKey`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_post_key( - configuration: &configuration::Configuration, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/user/keys", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PublicKey`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PublicKey`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_put_follow( - configuration: &configuration::Configuration, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - - let uri_str = format!( - "{}/user/following/{username}", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_put_star( - configuration: &configuration::Configuration, - owner: &str, - repo: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_owner = owner; - let p_path_repo = repo; - - let uri_str = format!( - "{}/user/starred/{owner}/{repo}", - configuration.base_path, - owner = crate::apis::urlencode(p_path_owner), - repo = crate::apis::urlencode(p_path_repo) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_current_tracked_times( - configuration: &configuration::Configuration, - page: Option, - limit: Option, - since: Option, - before: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - let p_query_since = since; - let p_query_before = before; - - let uri_str = format!("{}/user/times", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_since { - req_builder = req_builder.query(&[("since", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_before { - req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TrackedTime>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TrackedTime>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_delete_access_token( - configuration: &configuration::Configuration, - username: &str, - token: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_path_token = token; - - let uri_str = format!( - "{}/users/{username}/tokens/{token}", - configuration.base_path, - username = crate::apis::urlencode(p_path_username), - token = crate::apis::urlencode(p_path_token) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_delete_avatar( - configuration: &configuration::Configuration, -) -> Result<(), Error> { - let uri_str = format!("{}/user/avatar", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_delete_email( - configuration: &configuration::Configuration, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/user/emails", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_delete_hook( - configuration: &configuration::Configuration, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!( - "{}/user/hooks/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_delete_o_auth2_application( - configuration: &configuration::Configuration, - id: i64, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!( - "{}/user/applications/oauth2/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_edit_hook( - configuration: &configuration::Configuration, - id: i64, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/user/hooks/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_get( - configuration: &configuration::Configuration, - username: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - - let uri_str = format!( - "{}/users/{username}", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_get_current( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/user", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_get_heatmap_data( - configuration: &configuration::Configuration, - username: &str, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - - let uri_str = format!( - "{}/users/{username}/heatmap", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::UserHeatmapData>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::UserHeatmapData>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_get_hook( - configuration: &configuration::Configuration, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!( - "{}/user/hooks/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Hook`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Hook`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_get_o_auth2_application( - configuration: &configuration::Configuration, - id: i64, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - - let uri_str = format!( - "{}/user/applications/oauth2/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OAuth2Application`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OAuth2Application`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_get_o_auth2_applications( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/applications/oauth2", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::OAuth2Application>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::OAuth2Application>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_get_quota( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/user/quota", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::QuotaInfo`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::QuotaInfo`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_get_runner_registration_token( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!( - "{}/user/actions/runners/registration-token", - configuration.base_path - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RegistrationToken`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RegistrationToken`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_get_stop_watches( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/stopwatches", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::StopWatch>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::StopWatch>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_get_tokens( - configuration: &configuration::Configuration, - username: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/users/{username}/tokens", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::AccessToken>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::AccessToken>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_activity_feeds( - configuration: &configuration::Configuration, - username: &str, - only_performed_by: Option, - date: Option, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_query_only_performed_by = only_performed_by; - let p_query_date = date; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/users/{username}/activities/feeds", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_only_performed_by { - req_builder = req_builder.query(&[("only-performed-by", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_date { - req_builder = req_builder.query(&[("date", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Activity>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Activity>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_blocked_users( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/list_blocked", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::BlockedUser>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::BlockedUser>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_emails( - configuration: &configuration::Configuration, -) -> Result, Error> { - let uri_str = format!("{}/user/emails", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Email>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Email>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_followers( - configuration: &configuration::Configuration, - username: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/users/{username}/followers", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_following( - configuration: &configuration::Configuration, - username: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/users/{username}/following", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_gpg_keys( - configuration: &configuration::Configuration, - username: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/users/{username}/gpg_keys", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::GpgKey>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::GpgKey>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_hooks( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/hooks", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Hook>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Hook>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_keys( - configuration: &configuration::Configuration, - username: &str, - fingerprint: Option<&str>, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_query_fingerprint = fingerprint; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/users/{username}/keys", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_fingerprint { - req_builder = req_builder.query(&[("fingerprint", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PublicKey>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PublicKey>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_quota_artifacts( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/quota/artifacts", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedArtifact>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedArtifact>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_quota_attachments( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/quota/attachments", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedAttachment>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedAttachment>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_quota_packages( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/quota/packages", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::QuotaUsedPackage>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::QuotaUsedPackage>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_repos( - configuration: &configuration::Configuration, - username: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/users/{username}/repos", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_starred( - configuration: &configuration::Configuration, - username: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/users/{username}/starred", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_subscriptions( - configuration: &configuration::Configuration, - username: &str, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!( - "{}/users/{username}/subscriptions", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Repository>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Repository>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_list_teams( - configuration: &configuration::Configuration, - page: Option, - limit: Option, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/user/teams", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Team>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Team>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_search( - configuration: &configuration::Configuration, - q: Option<&str>, - uid: Option, - sort: Option<&str>, - page: Option, - limit: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_q = q; - let p_query_uid = uid; - let p_query_sort = sort; - let p_query_page = page; - let p_query_limit = limit; - - let uri_str = format!("{}/users/search", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_q { - req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_uid { - req_builder = req_builder.query(&[("uid", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_sort { - req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_page { - req_builder = req_builder.query(&[("page", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_query_limit { - req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserSearchResults`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserSearchResults`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_search_run_jobs( - configuration: &configuration::Configuration, - labels: Option<&str>, -) -> Result, Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_query_labels = labels; - - let uri_str = format!("{}/user/actions/runners/jobs", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_query_labels { - req_builder = req_builder.query(&[("labels", ¶m_value.to_string())]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ActionRunJob>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ActionRunJob>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_unblock_user( - configuration: &configuration::Configuration, - username: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_username = username; - - let uri_str = format!( - "{}/user/unblock/{username}", - configuration.base_path, - username = crate::apis::urlencode(p_path_username) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_update_avatar( - configuration: &configuration::Configuration, - body: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/user/avatar", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_update_o_auth2_application( - configuration: &configuration::Configuration, - id: i64, - body: models::CreateOAuth2ApplicationOptions, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_id = id; - let p_body_body = body; - - let uri_str = format!( - "{}/user/applications/oauth2/{id}", - configuration.base_path, - id = p_path_id - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OAuth2Application`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OAuth2Application`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn user_verify_gpg_key( - configuration: &configuration::Configuration, - body: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_body = body; - - let uri_str = format!("{}/user/gpg_key_verify", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("access_token", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("sudo", value)]); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.query(&[("token", value)]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-FORGEJO-OTP", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", value); - }; - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Sudo", value); - }; - if let Some(ref auth_conf) = configuration.basic_auth { - req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned()); - }; - req_builder = req_builder.json(&p_body_body); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GpgKey`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GpgKey`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} diff --git a/forgejo-openapi/src/lib.rs b/forgejo-openapi/src/lib.rs deleted file mode 100644 index 9556a0a..0000000 --- a/forgejo-openapi/src/lib.rs +++ /dev/null @@ -1,11 +0,0 @@ -#![allow(unused_imports)] -#![allow(clippy::too_many_arguments)] - -extern crate reqwest; -extern crate serde; -extern crate serde_json; -extern crate serde_repr; -extern crate url; - -pub mod apis; -pub mod models; diff --git a/forgejo-openapi/src/models/access_token.rs b/forgejo-openapi/src/models/access_token.rs deleted file mode 100644 index 31ba41e..0000000 --- a/forgejo-openapi/src/models/access_token.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccessToken { - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")] - pub scopes: Option>, - #[serde(rename = "sha1", skip_serializing_if = "Option::is_none")] - pub sha1: Option, - #[serde(rename = "token_last_eight", skip_serializing_if = "Option::is_none")] - pub token_last_eight: Option, -} - -impl AccessToken { - pub fn new() -> AccessToken { - AccessToken { - id: None, - name: None, - scopes: None, - sha1: None, - token_last_eight: None, - } - } -} diff --git a/forgejo-openapi/src/models/action_run.rs b/forgejo-openapi/src/models/action_run.rs deleted file mode 100644 index c31cc9b..0000000 --- a/forgejo-openapi/src/models/action_run.rs +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ActionRun : ActionRun represents an action run -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ActionRun { - /// the cron id for the schedule trigger - #[serde(rename = "ScheduleID", skip_serializing_if = "Option::is_none")] - pub schedule_id: Option, - /// who approved this action run - #[serde(rename = "approved_by", skip_serializing_if = "Option::is_none")] - pub approved_by: Option, - /// the commit sha the action run ran on - #[serde(rename = "commit_sha", skip_serializing_if = "Option::is_none")] - pub commit_sha: Option, - /// when the action run was created - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - /// A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years. - #[serde(rename = "duration", skip_serializing_if = "Option::is_none")] - pub duration: Option, - /// the webhook event that causes the workflow to run - #[serde(rename = "event", skip_serializing_if = "Option::is_none")] - pub event: Option, - /// the payload of the webhook event that causes the workflow to run - #[serde(rename = "event_payload", skip_serializing_if = "Option::is_none")] - pub event_payload: Option, - /// the url of this action run - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - /// the action run id - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// a unique number for each run of a repository - #[serde(rename = "index_in_repo", skip_serializing_if = "Option::is_none")] - pub index_in_repo: Option, - /// If this is triggered by a PR from a forked repository or an untrusted user, we need to check if it is approved and limit permissions when running the workflow. - #[serde( - rename = "is_fork_pull_request", - skip_serializing_if = "Option::is_none" - )] - pub is_fork_pull_request: Option, - /// has the commit/tag/… the action run ran on been deleted - #[serde(rename = "is_ref_deleted", skip_serializing_if = "Option::is_none")] - pub is_ref_deleted: Option, - /// may need approval if it's a fork pull request - #[serde(rename = "need_approval", skip_serializing_if = "Option::is_none")] - pub need_approval: Option, - /// the commit/tag/… the action run ran on - #[serde(rename = "prettyref", skip_serializing_if = "Option::is_none")] - pub prettyref: Option, - #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] - pub repository: Option>, - /// when the action run was started - #[serde(rename = "started", skip_serializing_if = "Option::is_none")] - pub started: Option, - /// the current status of this run - #[serde(rename = "status", skip_serializing_if = "Option::is_none")] - pub status: Option, - /// when the action run was stopped - #[serde(rename = "stopped", skip_serializing_if = "Option::is_none")] - pub stopped: Option, - /// the action run's title - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, - /// the trigger event defined in the `on` configuration of the triggered workflow - #[serde(rename = "trigger_event", skip_serializing_if = "Option::is_none")] - pub trigger_event: Option, - #[serde(rename = "trigger_user", skip_serializing_if = "Option::is_none")] - pub trigger_user: Option>, - /// when the action run was last updated - #[serde(rename = "updated", skip_serializing_if = "Option::is_none")] - pub updated: Option, - /// the name of workflow file - #[serde(rename = "workflow_id", skip_serializing_if = "Option::is_none")] - pub workflow_id: Option, -} - -impl ActionRun { - /// ActionRun represents an action run - pub fn new() -> ActionRun { - ActionRun { - schedule_id: None, - approved_by: None, - commit_sha: None, - created: None, - duration: None, - event: None, - event_payload: None, - html_url: None, - id: None, - index_in_repo: None, - is_fork_pull_request: None, - is_ref_deleted: None, - need_approval: None, - prettyref: None, - repository: None, - started: None, - status: None, - stopped: None, - title: None, - trigger_event: None, - trigger_user: None, - updated: None, - workflow_id: None, - } - } -} diff --git a/forgejo-openapi/src/models/action_run_job.rs b/forgejo-openapi/src/models/action_run_job.rs deleted file mode 100644 index 958ecc2..0000000 --- a/forgejo-openapi/src/models/action_run_job.rs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ActionRunJob : ActionRunJob represents a job of a run -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ActionRunJob { - /// the action run job id - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// the action run job name - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// the action run job needed ids - #[serde(rename = "needs", skip_serializing_if = "Option::is_none")] - pub needs: Option>, - /// the owner id - #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")] - pub owner_id: Option, - /// the repository id - #[serde(rename = "repo_id", skip_serializing_if = "Option::is_none")] - pub repo_id: Option, - /// the action run job labels to run on - #[serde(rename = "runs_on", skip_serializing_if = "Option::is_none")] - pub runs_on: Option>, - /// the action run job status - #[serde(rename = "status", skip_serializing_if = "Option::is_none")] - pub status: Option, - /// the action run job latest task id - #[serde(rename = "task_id", skip_serializing_if = "Option::is_none")] - pub task_id: Option, -} - -impl ActionRunJob { - /// ActionRunJob represents a job of a run - pub fn new() -> ActionRunJob { - ActionRunJob { - id: None, - name: None, - needs: None, - owner_id: None, - repo_id: None, - runs_on: None, - status: None, - task_id: None, - } - } -} diff --git a/forgejo-openapi/src/models/action_task.rs b/forgejo-openapi/src/models/action_task.rs deleted file mode 100644 index eebdf41..0000000 --- a/forgejo-openapi/src/models/action_task.rs +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ActionTask : ActionTask represents a ActionTask -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ActionTask { - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "display_title", skip_serializing_if = "Option::is_none")] - pub display_title: Option, - #[serde(rename = "event", skip_serializing_if = "Option::is_none")] - pub event: Option, - #[serde(rename = "head_branch", skip_serializing_if = "Option::is_none")] - pub head_branch: Option, - #[serde(rename = "head_sha", skip_serializing_if = "Option::is_none")] - pub head_sha: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "run_number", skip_serializing_if = "Option::is_none")] - pub run_number: Option, - #[serde(rename = "run_started_at", skip_serializing_if = "Option::is_none")] - pub run_started_at: Option, - #[serde(rename = "status", skip_serializing_if = "Option::is_none")] - pub status: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, - #[serde(rename = "workflow_id", skip_serializing_if = "Option::is_none")] - pub workflow_id: Option, -} - -impl ActionTask { - /// ActionTask represents a ActionTask - pub fn new() -> ActionTask { - ActionTask { - created_at: None, - display_title: None, - event: None, - head_branch: None, - head_sha: None, - id: None, - name: None, - run_number: None, - run_started_at: None, - status: None, - updated_at: None, - url: None, - workflow_id: None, - } - } -} diff --git a/forgejo-openapi/src/models/action_task_response.rs b/forgejo-openapi/src/models/action_task_response.rs deleted file mode 100644 index 26a8d94..0000000 --- a/forgejo-openapi/src/models/action_task_response.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ActionTaskResponse : ActionTaskResponse returns a ActionTask -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ActionTaskResponse { - #[serde(rename = "total_count", skip_serializing_if = "Option::is_none")] - pub total_count: Option, - #[serde(rename = "workflow_runs", skip_serializing_if = "Option::is_none")] - pub workflow_runs: Option>, -} - -impl ActionTaskResponse { - /// ActionTaskResponse returns a ActionTask - pub fn new() -> ActionTaskResponse { - ActionTaskResponse { - total_count: None, - workflow_runs: None, - } - } -} diff --git a/forgejo-openapi/src/models/action_variable.rs b/forgejo-openapi/src/models/action_variable.rs deleted file mode 100644 index f548234..0000000 --- a/forgejo-openapi/src/models/action_variable.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ActionVariable : ActionVariable return value of the query API -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ActionVariable { - /// the value of the variable - #[serde(rename = "data", skip_serializing_if = "Option::is_none")] - pub data: Option, - /// the name of the variable - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// the owner to which the variable belongs - #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")] - pub owner_id: Option, - /// the repository to which the variable belongs - #[serde(rename = "repo_id", skip_serializing_if = "Option::is_none")] - pub repo_id: Option, -} - -impl ActionVariable { - /// ActionVariable return value of the query API - pub fn new() -> ActionVariable { - ActionVariable { - data: None, - name: None, - owner_id: None, - repo_id: None, - } - } -} diff --git a/forgejo-openapi/src/models/activity.rs b/forgejo-openapi/src/models/activity.rs deleted file mode 100644 index 3f9ae56..0000000 --- a/forgejo-openapi/src/models/activity.rs +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Activity { - #[serde(rename = "act_user", skip_serializing_if = "Option::is_none")] - pub act_user: Option>, - #[serde(rename = "act_user_id", skip_serializing_if = "Option::is_none")] - pub act_user_id: Option, - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option>, - #[serde(rename = "comment_id", skip_serializing_if = "Option::is_none")] - pub comment_id: Option, - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option, - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "is_private", skip_serializing_if = "Option::is_none")] - pub is_private: Option, - /// the type of action - #[serde(rename = "op_type", skip_serializing_if = "Option::is_none")] - pub op_type: Option, - #[serde(rename = "ref_name", skip_serializing_if = "Option::is_none")] - pub ref_name: Option, - #[serde(rename = "repo", skip_serializing_if = "Option::is_none")] - pub repo: Option>, - #[serde(rename = "repo_id", skip_serializing_if = "Option::is_none")] - pub repo_id: Option, - #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")] - pub user_id: Option, -} - -impl Activity { - pub fn new() -> Activity { - Activity { - act_user: None, - act_user_id: None, - comment: None, - comment_id: None, - content: None, - created: None, - id: None, - is_private: None, - op_type: None, - ref_name: None, - repo: None, - repo_id: None, - user_id: None, - } - } -} -/// the type of action -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum OpType { - #[serde(rename = "create_repo")] - CreateRepo, - #[serde(rename = "rename_repo")] - RenameRepo, - #[serde(rename = "star_repo")] - StarRepo, - #[serde(rename = "watch_repo")] - WatchRepo, - #[serde(rename = "commit_repo")] - CommitRepo, - #[serde(rename = "create_issue")] - CreateIssue, - #[serde(rename = "create_pull_request")] - CreatePullRequest, - #[serde(rename = "transfer_repo")] - TransferRepo, - #[serde(rename = "push_tag")] - PushTag, - #[serde(rename = "comment_issue")] - CommentIssue, - #[serde(rename = "merge_pull_request")] - MergePullRequest, - #[serde(rename = "close_issue")] - CloseIssue, - #[serde(rename = "reopen_issue")] - ReopenIssue, - #[serde(rename = "close_pull_request")] - ClosePullRequest, - #[serde(rename = "reopen_pull_request")] - ReopenPullRequest, - #[serde(rename = "delete_tag")] - DeleteTag, - #[serde(rename = "delete_branch")] - DeleteBranch, - #[serde(rename = "mirror_sync_push")] - MirrorSyncPush, - #[serde(rename = "mirror_sync_create")] - MirrorSyncCreate, - #[serde(rename = "mirror_sync_delete")] - MirrorSyncDelete, - #[serde(rename = "approve_pull_request")] - ApprovePullRequest, - #[serde(rename = "reject_pull_request")] - RejectPullRequest, - #[serde(rename = "comment_pull")] - CommentPull, - #[serde(rename = "publish_release")] - PublishRelease, - #[serde(rename = "pull_review_dismissed")] - PullReviewDismissed, - #[serde(rename = "pull_request_ready_for_review")] - PullRequestReadyForReview, - #[serde(rename = "auto_merge_pull_request")] - AutoMergePullRequest, -} - -impl Default for OpType { - fn default() -> OpType { - Self::CreateRepo - } -} diff --git a/forgejo-openapi/src/models/activity_pub.rs b/forgejo-openapi/src/models/activity_pub.rs deleted file mode 100644 index 5c64fdd..0000000 --- a/forgejo-openapi/src/models/activity_pub.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ActivityPub : ActivityPub type -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ActivityPub { - #[serde(rename = "@context", skip_serializing_if = "Option::is_none")] - pub at_context: Option, -} - -impl ActivityPub { - /// ActivityPub type - pub fn new() -> ActivityPub { - ActivityPub { at_context: None } - } -} diff --git a/forgejo-openapi/src/models/add_collaborator_option.rs b/forgejo-openapi/src/models/add_collaborator_option.rs deleted file mode 100644 index ad484fa..0000000 --- a/forgejo-openapi/src/models/add_collaborator_option.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// AddCollaboratorOption : AddCollaboratorOption options when adding a user as a collaborator of a repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AddCollaboratorOption { - #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] - pub permission: Option, -} - -impl AddCollaboratorOption { - /// AddCollaboratorOption options when adding a user as a collaborator of a repository - pub fn new() -> AddCollaboratorOption { - AddCollaboratorOption { permission: None } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Permission { - #[serde(rename = "read")] - Read, - #[serde(rename = "write")] - Write, - #[serde(rename = "admin")] - Admin, -} - -impl Default for Permission { - fn default() -> Permission { - Self::Read - } -} diff --git a/forgejo-openapi/src/models/add_time_option.rs b/forgejo-openapi/src/models/add_time_option.rs deleted file mode 100644 index 85c785e..0000000 --- a/forgejo-openapi/src/models/add_time_option.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// AddTimeOption : AddTimeOption options for adding time to an issue -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AddTimeOption { - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - /// time in seconds - #[serde(rename = "time")] - pub time: i64, - /// User who spent the time (optional) - #[serde(rename = "user_name", skip_serializing_if = "Option::is_none")] - pub user_name: Option, -} - -impl AddTimeOption { - /// AddTimeOption options for adding time to an issue - pub fn new(time: i64) -> AddTimeOption { - AddTimeOption { - created: None, - time, - user_name: None, - } - } -} diff --git a/forgejo-openapi/src/models/annotated_tag.rs b/forgejo-openapi/src/models/annotated_tag.rs deleted file mode 100644 index 2f41ab0..0000000 --- a/forgejo-openapi/src/models/annotated_tag.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// AnnotatedTag : AnnotatedTag represents an annotated tag -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AnnotatedTag { - #[serde( - rename = "archive_download_count", - skip_serializing_if = "Option::is_none" - )] - pub archive_download_count: Option>, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "object", skip_serializing_if = "Option::is_none")] - pub object: Option>, - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, - #[serde(rename = "tag", skip_serializing_if = "Option::is_none")] - pub tag: Option, - #[serde(rename = "tagger", skip_serializing_if = "Option::is_none")] - pub tagger: Option>, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, -} - -impl AnnotatedTag { - /// AnnotatedTag represents an annotated tag - pub fn new() -> AnnotatedTag { - AnnotatedTag { - archive_download_count: None, - message: None, - object: None, - sha: None, - tag: None, - tagger: None, - url: None, - verification: None, - } - } -} diff --git a/forgejo-openapi/src/models/annotated_tag_object.rs b/forgejo-openapi/src/models/annotated_tag_object.rs deleted file mode 100644 index d8a4809..0000000 --- a/forgejo-openapi/src/models/annotated_tag_object.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// AnnotatedTagObject : AnnotatedTagObject contains meta information of the tag object -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AnnotatedTagObject { - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl AnnotatedTagObject { - /// AnnotatedTagObject contains meta information of the tag object - pub fn new() -> AnnotatedTagObject { - AnnotatedTagObject { - sha: None, - r#type: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/api_error.rs b/forgejo-openapi/src/models/api_error.rs deleted file mode 100644 index 57c5fe5..0000000 --- a/forgejo-openapi/src/models/api_error.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ApiError : APIError is an api error with a message -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ApiError { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl ApiError { - /// APIError is an api error with a message - pub fn new() -> ApiError { - ApiError { - message: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/api_forbidden_error.rs b/forgejo-openapi/src/models/api_forbidden_error.rs deleted file mode 100644 index 67ee3bd..0000000 --- a/forgejo-openapi/src/models/api_forbidden_error.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ApiForbiddenError { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl ApiForbiddenError { - pub fn new() -> ApiForbiddenError { - ApiForbiddenError { - message: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/api_internal_server_error.rs b/forgejo-openapi/src/models/api_internal_server_error.rs deleted file mode 100644 index 2bbb45a..0000000 --- a/forgejo-openapi/src/models/api_internal_server_error.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ApiInternalServerError { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl ApiInternalServerError { - pub fn new() -> ApiInternalServerError { - ApiInternalServerError { - message: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/api_invalid_topics_error.rs b/forgejo-openapi/src/models/api_invalid_topics_error.rs deleted file mode 100644 index f7c3ab3..0000000 --- a/forgejo-openapi/src/models/api_invalid_topics_error.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ApiInvalidTopicsError { - #[serde(rename = "invalidTopics", skip_serializing_if = "Option::is_none")] - pub invalid_topics: Option>, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, -} - -impl ApiInvalidTopicsError { - pub fn new() -> ApiInvalidTopicsError { - ApiInvalidTopicsError { - invalid_topics: None, - message: None, - } - } -} diff --git a/forgejo-openapi/src/models/api_not_found.rs b/forgejo-openapi/src/models/api_not_found.rs deleted file mode 100644 index 6db8953..0000000 --- a/forgejo-openapi/src/models/api_not_found.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ApiNotFound { - #[serde(rename = "errors", skip_serializing_if = "Option::is_none")] - pub errors: Option>, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl ApiNotFound { - pub fn new() -> ApiNotFound { - ApiNotFound { - errors: None, - message: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/api_repo_archived_error.rs b/forgejo-openapi/src/models/api_repo_archived_error.rs deleted file mode 100644 index 8019d55..0000000 --- a/forgejo-openapi/src/models/api_repo_archived_error.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ApiRepoArchivedError { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl ApiRepoArchivedError { - pub fn new() -> ApiRepoArchivedError { - ApiRepoArchivedError { - message: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/api_unauthorized_error.rs b/forgejo-openapi/src/models/api_unauthorized_error.rs deleted file mode 100644 index 94e7b8f..0000000 --- a/forgejo-openapi/src/models/api_unauthorized_error.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ApiUnauthorizedError { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl ApiUnauthorizedError { - pub fn new() -> ApiUnauthorizedError { - ApiUnauthorizedError { - message: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/api_validation_error.rs b/forgejo-openapi/src/models/api_validation_error.rs deleted file mode 100644 index 0ce3319..0000000 --- a/forgejo-openapi/src/models/api_validation_error.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ApiValidationError { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl ApiValidationError { - pub fn new() -> ApiValidationError { - ApiValidationError { - message: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/attachment.rs b/forgejo-openapi/src/models/attachment.rs deleted file mode 100644 index 5cf5ee4..0000000 --- a/forgejo-openapi/src/models/attachment.rs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Attachment : Attachment a generic attachment -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Attachment { - #[serde( - rename = "browser_download_url", - skip_serializing_if = "Option::is_none" - )] - pub browser_download_url: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "download_count", skip_serializing_if = "Option::is_none")] - pub download_count: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")] - pub uuid: Option, -} - -impl Attachment { - /// Attachment a generic attachment - pub fn new() -> Attachment { - Attachment { - browser_download_url: None, - created_at: None, - download_count: None, - id: None, - name: None, - size: None, - r#type: None, - uuid: None, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "attachment")] - Attachment, - #[serde(rename = "external")] - External, -} - -impl Default for Type { - fn default() -> Type { - Self::Attachment - } -} diff --git a/forgejo-openapi/src/models/blocked_user.rs b/forgejo-openapi/src/models/blocked_user.rs deleted file mode 100644 index 8d74764..0000000 --- a/forgejo-openapi/src/models/blocked_user.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BlockedUser { - #[serde(rename = "block_id", skip_serializing_if = "Option::is_none")] - pub block_id: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, -} - -impl BlockedUser { - pub fn new() -> BlockedUser { - BlockedUser { - block_id: None, - created_at: None, - } - } -} diff --git a/forgejo-openapi/src/models/branch.rs b/forgejo-openapi/src/models/branch.rs deleted file mode 100644 index d12e9ed..0000000 --- a/forgejo-openapi/src/models/branch.rs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Branch : Branch represents a repository branch -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Branch { - #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] - pub commit: Option>, - #[serde( - rename = "effective_branch_protection_name", - skip_serializing_if = "Option::is_none" - )] - pub effective_branch_protection_name: Option, - #[serde( - rename = "enable_status_check", - skip_serializing_if = "Option::is_none" - )] - pub enable_status_check: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "protected", skip_serializing_if = "Option::is_none")] - pub protected: Option, - #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] - pub required_approvals: Option, - #[serde( - rename = "status_check_contexts", - skip_serializing_if = "Option::is_none" - )] - pub status_check_contexts: Option>, - #[serde(rename = "user_can_merge", skip_serializing_if = "Option::is_none")] - pub user_can_merge: Option, - #[serde(rename = "user_can_push", skip_serializing_if = "Option::is_none")] - pub user_can_push: Option, -} - -impl Branch { - /// Branch represents a repository branch - pub fn new() -> Branch { - Branch { - commit: None, - effective_branch_protection_name: None, - enable_status_check: None, - name: None, - protected: None, - required_approvals: None, - status_check_contexts: None, - user_can_merge: None, - user_can_push: None, - } - } -} diff --git a/forgejo-openapi/src/models/branch_protection.rs b/forgejo-openapi/src/models/branch_protection.rs deleted file mode 100644 index b7a2d58..0000000 --- a/forgejo-openapi/src/models/branch_protection.rs +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// BranchProtection : BranchProtection represents a branch protection for a repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BranchProtection { - #[serde(rename = "apply_to_admins", skip_serializing_if = "Option::is_none")] - pub apply_to_admins: Option, - #[serde( - rename = "approvals_whitelist_teams", - skip_serializing_if = "Option::is_none" - )] - pub approvals_whitelist_teams: Option>, - #[serde( - rename = "approvals_whitelist_username", - skip_serializing_if = "Option::is_none" - )] - pub approvals_whitelist_username: Option>, - #[serde( - rename = "block_on_official_review_requests", - skip_serializing_if = "Option::is_none" - )] - pub block_on_official_review_requests: Option, - #[serde( - rename = "block_on_outdated_branch", - skip_serializing_if = "Option::is_none" - )] - pub block_on_outdated_branch: Option, - #[serde( - rename = "block_on_rejected_reviews", - skip_serializing_if = "Option::is_none" - )] - pub block_on_rejected_reviews: Option, - /// Deprecated: true - #[serde(rename = "branch_name", skip_serializing_if = "Option::is_none")] - pub branch_name: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde( - rename = "dismiss_stale_approvals", - skip_serializing_if = "Option::is_none" - )] - pub dismiss_stale_approvals: Option, - #[serde( - rename = "enable_approvals_whitelist", - skip_serializing_if = "Option::is_none" - )] - pub enable_approvals_whitelist: Option, - #[serde( - rename = "enable_merge_whitelist", - skip_serializing_if = "Option::is_none" - )] - pub enable_merge_whitelist: Option, - #[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")] - pub enable_push: Option, - #[serde( - rename = "enable_push_whitelist", - skip_serializing_if = "Option::is_none" - )] - pub enable_push_whitelist: Option, - #[serde( - rename = "enable_status_check", - skip_serializing_if = "Option::is_none" - )] - pub enable_status_check: Option, - #[serde( - rename = "ignore_stale_approvals", - skip_serializing_if = "Option::is_none" - )] - pub ignore_stale_approvals: Option, - #[serde( - rename = "merge_whitelist_teams", - skip_serializing_if = "Option::is_none" - )] - pub merge_whitelist_teams: Option>, - #[serde( - rename = "merge_whitelist_usernames", - skip_serializing_if = "Option::is_none" - )] - pub merge_whitelist_usernames: Option>, - #[serde( - rename = "protected_file_patterns", - skip_serializing_if = "Option::is_none" - )] - pub protected_file_patterns: Option, - #[serde( - rename = "push_whitelist_deploy_keys", - skip_serializing_if = "Option::is_none" - )] - pub push_whitelist_deploy_keys: Option, - #[serde( - rename = "push_whitelist_teams", - skip_serializing_if = "Option::is_none" - )] - pub push_whitelist_teams: Option>, - #[serde( - rename = "push_whitelist_usernames", - skip_serializing_if = "Option::is_none" - )] - pub push_whitelist_usernames: Option>, - #[serde( - rename = "require_signed_commits", - skip_serializing_if = "Option::is_none" - )] - pub require_signed_commits: Option, - #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] - pub required_approvals: Option, - #[serde(rename = "rule_name", skip_serializing_if = "Option::is_none")] - pub rule_name: Option, - #[serde( - rename = "status_check_contexts", - skip_serializing_if = "Option::is_none" - )] - pub status_check_contexts: Option>, - #[serde( - rename = "unprotected_file_patterns", - skip_serializing_if = "Option::is_none" - )] - pub unprotected_file_patterns: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, -} - -impl BranchProtection { - /// BranchProtection represents a branch protection for a repository - pub fn new() -> BranchProtection { - BranchProtection { - apply_to_admins: None, - approvals_whitelist_teams: None, - approvals_whitelist_username: None, - block_on_official_review_requests: None, - block_on_outdated_branch: None, - block_on_rejected_reviews: None, - branch_name: None, - created_at: None, - dismiss_stale_approvals: None, - enable_approvals_whitelist: None, - enable_merge_whitelist: None, - enable_push: None, - enable_push_whitelist: None, - enable_status_check: None, - ignore_stale_approvals: None, - merge_whitelist_teams: None, - merge_whitelist_usernames: None, - protected_file_patterns: None, - push_whitelist_deploy_keys: None, - push_whitelist_teams: None, - push_whitelist_usernames: None, - require_signed_commits: None, - required_approvals: None, - rule_name: None, - status_check_contexts: None, - unprotected_file_patterns: None, - updated_at: None, - } - } -} diff --git a/forgejo-openapi/src/models/change_file_operation.rs b/forgejo-openapi/src/models/change_file_operation.rs deleted file mode 100644 index b9f1d9c..0000000 --- a/forgejo-openapi/src/models/change_file_operation.rs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ChangeFileOperation : ChangeFileOperation for creating, updating or deleting a file -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ChangeFileOperation { - /// new or updated file content, must be base64 encoded - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option, - /// old path of the file to move - #[serde(rename = "from_path", skip_serializing_if = "Option::is_none")] - pub from_path: Option, - /// indicates what to do with the file - #[serde(rename = "operation")] - pub operation: Operation, - /// path to the existing or new file - #[serde(rename = "path")] - pub path: String, - /// sha is the SHA for the file that already exists, required for update or delete - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, -} - -impl ChangeFileOperation { - /// ChangeFileOperation for creating, updating or deleting a file - pub fn new(operation: Operation, path: String) -> ChangeFileOperation { - ChangeFileOperation { - content: None, - from_path: None, - operation, - path, - sha: None, - } - } -} -/// indicates what to do with the file -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Operation { - #[serde(rename = "create")] - Create, - #[serde(rename = "update")] - Update, - #[serde(rename = "delete")] - Delete, -} - -impl Default for Operation { - fn default() -> Operation { - Self::Create - } -} diff --git a/forgejo-openapi/src/models/change_files_options.rs b/forgejo-openapi/src/models/change_files_options.rs deleted file mode 100644 index abdfdd3..0000000 --- a/forgejo-openapi/src/models/change_files_options.rs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ChangeFilesOptions : ChangeFilesOptions options for creating, updating or deleting multiple files 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) -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ChangeFilesOptions { - #[serde(rename = "author", skip_serializing_if = "Option::is_none")] - pub author: Option>, - /// branch (optional) to base this file from. if not given, the default branch is used - #[serde(rename = "branch", skip_serializing_if = "Option::is_none")] - pub branch: Option, - #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] - pub committer: Option>, - #[serde(rename = "dates", skip_serializing_if = "Option::is_none")] - pub dates: Option>, - /// list of file operations - #[serde(rename = "files")] - pub files: Vec, - /// message (optional) for the commit of this file. if not supplied, a default message will be used - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - /// new_branch (optional) will make a new branch from `branch` before creating the file - #[serde(rename = "new_branch", skip_serializing_if = "Option::is_none")] - pub new_branch: Option, - /// Add a Signed-off-by trailer by the committer at the end of the commit log message. - #[serde(rename = "signoff", skip_serializing_if = "Option::is_none")] - pub signoff: Option, -} - -impl ChangeFilesOptions { - /// ChangeFilesOptions options for creating, updating or deleting multiple files 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) - pub fn new(files: Vec) -> ChangeFilesOptions { - ChangeFilesOptions { - author: None, - branch: None, - committer: None, - dates: None, - files, - message: None, - new_branch: None, - signoff: None, - } - } -} diff --git a/forgejo-openapi/src/models/changed_file.rs b/forgejo-openapi/src/models/changed_file.rs deleted file mode 100644 index 6d60dc1..0000000 --- a/forgejo-openapi/src/models/changed_file.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ChangedFile : ChangedFile store information about files affected by the pull request -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ChangedFile { - #[serde(rename = "additions", skip_serializing_if = "Option::is_none")] - pub additions: Option, - #[serde(rename = "changes", skip_serializing_if = "Option::is_none")] - pub changes: Option, - #[serde(rename = "contents_url", skip_serializing_if = "Option::is_none")] - pub contents_url: Option, - #[serde(rename = "deletions", skip_serializing_if = "Option::is_none")] - pub deletions: Option, - #[serde(rename = "filename", skip_serializing_if = "Option::is_none")] - pub filename: Option, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "previous_filename", skip_serializing_if = "Option::is_none")] - pub previous_filename: Option, - #[serde(rename = "raw_url", skip_serializing_if = "Option::is_none")] - pub raw_url: Option, - #[serde(rename = "status", skip_serializing_if = "Option::is_none")] - pub status: Option, -} - -impl ChangedFile { - /// ChangedFile store information about files affected by the pull request - pub fn new() -> ChangedFile { - ChangedFile { - additions: None, - changes: None, - contents_url: None, - deletions: None, - filename: None, - html_url: None, - previous_filename: None, - raw_url: None, - status: None, - } - } -} diff --git a/forgejo-openapi/src/models/combined_status.rs b/forgejo-openapi/src/models/combined_status.rs deleted file mode 100644 index aa9298b..0000000 --- a/forgejo-openapi/src/models/combined_status.rs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CombinedStatus : CombinedStatus holds the combined state of several statuses for a single commit -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CombinedStatus { - #[serde(rename = "commit_url", skip_serializing_if = "Option::is_none")] - pub commit_url: Option, - #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] - pub repository: Option>, - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, - /// CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" - #[serde(rename = "state", skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "statuses", skip_serializing_if = "Option::is_none")] - pub statuses: Option>, - #[serde(rename = "total_count", skip_serializing_if = "Option::is_none")] - pub total_count: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl CombinedStatus { - /// CombinedStatus holds the combined state of several statuses for a single commit - pub fn new() -> CombinedStatus { - CombinedStatus { - commit_url: None, - repository: None, - sha: None, - state: None, - statuses: None, - total_count: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/comment.rs b/forgejo-openapi/src/models/comment.rs deleted file mode 100644 index bdc579e..0000000 --- a/forgejo-openapi/src/models/comment.rs +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Comment : Comment represents a comment on a commit or issue -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Comment { - #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] - pub assets: Option>, - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "issue_url", skip_serializing_if = "Option::is_none")] - pub issue_url: Option, - #[serde(rename = "original_author", skip_serializing_if = "Option::is_none")] - pub original_author: Option, - #[serde(rename = "original_author_id", skip_serializing_if = "Option::is_none")] - pub original_author_id: Option, - #[serde(rename = "pull_request_url", skip_serializing_if = "Option::is_none")] - pub pull_request_url: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "user", skip_serializing_if = "Option::is_none")] - pub user: Option>, -} - -impl Comment { - /// Comment represents a comment on a commit or issue - pub fn new() -> Comment { - Comment { - assets: None, - body: None, - created_at: None, - html_url: None, - id: None, - issue_url: None, - original_author: None, - original_author_id: None, - pull_request_url: None, - updated_at: None, - user: None, - } - } -} diff --git a/forgejo-openapi/src/models/commit.rs b/forgejo-openapi/src/models/commit.rs deleted file mode 100644 index 362067d..0000000 --- a/forgejo-openapi/src/models/commit.rs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Commit { - #[serde(rename = "author", skip_serializing_if = "Option::is_none")] - pub author: Option>, - #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] - pub commit: Option>, - #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] - pub committer: Option>, - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - #[serde(rename = "files", skip_serializing_if = "Option::is_none")] - pub files: Option>, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "parents", skip_serializing_if = "Option::is_none")] - pub parents: Option>, - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, - #[serde(rename = "stats", skip_serializing_if = "Option::is_none")] - pub stats: Option>, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl Commit { - pub fn new() -> Commit { - Commit { - author: None, - commit: None, - committer: None, - created: None, - files: None, - html_url: None, - parents: None, - sha: None, - stats: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/commit_affected_files.rs b/forgejo-openapi/src/models/commit_affected_files.rs deleted file mode 100644 index c1712ec..0000000 --- a/forgejo-openapi/src/models/commit_affected_files.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CommitAffectedFiles : CommitAffectedFiles store information about files affected by the commit -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CommitAffectedFiles { - #[serde(rename = "filename", skip_serializing_if = "Option::is_none")] - pub filename: Option, - #[serde(rename = "status", skip_serializing_if = "Option::is_none")] - pub status: Option, -} - -impl CommitAffectedFiles { - /// CommitAffectedFiles store information about files affected by the commit - pub fn new() -> CommitAffectedFiles { - CommitAffectedFiles { - filename: None, - status: None, - } - } -} diff --git a/forgejo-openapi/src/models/commit_date_options.rs b/forgejo-openapi/src/models/commit_date_options.rs deleted file mode 100644 index e7e398f..0000000 --- a/forgejo-openapi/src/models/commit_date_options.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CommitDateOptions : CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CommitDateOptions { - #[serde(rename = "author", skip_serializing_if = "Option::is_none")] - pub author: Option, - #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] - pub committer: Option, -} - -impl CommitDateOptions { - /// CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE - pub fn new() -> CommitDateOptions { - CommitDateOptions { - author: None, - committer: None, - } - } -} diff --git a/forgejo-openapi/src/models/commit_meta.rs b/forgejo-openapi/src/models/commit_meta.rs deleted file mode 100644 index 4516c94..0000000 --- a/forgejo-openapi/src/models/commit_meta.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CommitMeta { - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl CommitMeta { - pub fn new() -> CommitMeta { - CommitMeta { - created: None, - sha: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/commit_stats.rs b/forgejo-openapi/src/models/commit_stats.rs deleted file mode 100644 index 89891f6..0000000 --- a/forgejo-openapi/src/models/commit_stats.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CommitStats : CommitStats is statistics for a RepoCommit -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CommitStats { - #[serde(rename = "additions", skip_serializing_if = "Option::is_none")] - pub additions: Option, - #[serde(rename = "deletions", skip_serializing_if = "Option::is_none")] - pub deletions: Option, - #[serde(rename = "total", skip_serializing_if = "Option::is_none")] - pub total: Option, -} - -impl CommitStats { - /// CommitStats is statistics for a RepoCommit - pub fn new() -> CommitStats { - CommitStats { - additions: None, - deletions: None, - total: None, - } - } -} diff --git a/forgejo-openapi/src/models/commit_status.rs b/forgejo-openapi/src/models/commit_status.rs deleted file mode 100644 index 8423fb3..0000000 --- a/forgejo-openapi/src/models/commit_status.rs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CommitStatus : CommitStatus holds a single status of a single Commit -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CommitStatus { - #[serde(rename = "context", skip_serializing_if = "Option::is_none")] - pub context: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "creator", skip_serializing_if = "Option::is_none")] - pub creator: Option>, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" - #[serde(rename = "status", skip_serializing_if = "Option::is_none")] - pub status: Option, - #[serde(rename = "target_url", skip_serializing_if = "Option::is_none")] - pub target_url: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl CommitStatus { - /// CommitStatus holds a single status of a single Commit - pub fn new() -> CommitStatus { - CommitStatus { - context: None, - created_at: None, - creator: None, - description: None, - id: None, - status: None, - target_url: None, - updated_at: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/commit_user.rs b/forgejo-openapi/src/models/commit_user.rs deleted file mode 100644 index 28f5909..0000000 --- a/forgejo-openapi/src/models/commit_user.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CommitUser { - #[serde(rename = "date", skip_serializing_if = "Option::is_none")] - pub date: Option, - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, -} - -impl CommitUser { - pub fn new() -> CommitUser { - CommitUser { - date: None, - email: None, - name: None, - } - } -} diff --git a/forgejo-openapi/src/models/compare.rs b/forgejo-openapi/src/models/compare.rs deleted file mode 100644 index 17fd66a..0000000 --- a/forgejo-openapi/src/models/compare.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Compare { - #[serde(rename = "commits", skip_serializing_if = "Option::is_none")] - pub commits: Option>, - #[serde(rename = "files", skip_serializing_if = "Option::is_none")] - pub files: Option>, - #[serde(rename = "total_commits", skip_serializing_if = "Option::is_none")] - pub total_commits: Option, -} - -impl Compare { - pub fn new() -> Compare { - Compare { - commits: None, - files: None, - total_commits: None, - } - } -} diff --git a/forgejo-openapi/src/models/contents_response.rs b/forgejo-openapi/src/models/contents_response.rs deleted file mode 100644 index f2b7f31..0000000 --- a/forgejo-openapi/src/models/contents_response.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ContentsResponse : ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ContentsResponse { - #[serde(rename = "_links", skip_serializing_if = "Option::is_none")] - pub _links: Option>, - /// `content` is populated when `type` is `file`, otherwise null - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option, - #[serde(rename = "download_url", skip_serializing_if = "Option::is_none")] - pub download_url: Option, - /// `encoding` is populated when `type` is `file`, otherwise null - #[serde(rename = "encoding", skip_serializing_if = "Option::is_none")] - pub encoding: Option, - #[serde(rename = "git_url", skip_serializing_if = "Option::is_none")] - pub git_url: Option, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "last_commit_sha", skip_serializing_if = "Option::is_none")] - pub last_commit_sha: Option, - #[serde(rename = "last_commit_when", skip_serializing_if = "Option::is_none")] - pub last_commit_when: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "path", skip_serializing_if = "Option::is_none")] - pub path: Option, - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, - /// `submodule_git_url` is populated when `type` is `submodule`, otherwise null - #[serde(rename = "submodule_git_url", skip_serializing_if = "Option::is_none")] - pub submodule_git_url: Option, - /// `target` is populated when `type` is `symlink`, otherwise null - #[serde(rename = "target", skip_serializing_if = "Option::is_none")] - pub target: Option, - /// `type` will be `file`, `dir`, `symlink`, or `submodule` - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl ContentsResponse { - /// ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content - pub fn new() -> ContentsResponse { - ContentsResponse { - _links: None, - content: None, - download_url: None, - encoding: None, - git_url: None, - html_url: None, - last_commit_sha: None, - last_commit_when: None, - name: None, - path: None, - sha: None, - size: None, - submodule_git_url: None, - target: None, - r#type: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_access_token_option.rs b/forgejo-openapi/src/models/create_access_token_option.rs deleted file mode 100644 index 0fc671a..0000000 --- a/forgejo-openapi/src/models/create_access_token_option.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateAccessTokenOption : CreateAccessTokenOption options when create access token -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateAccessTokenOption { - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")] - pub scopes: Option>, -} - -impl CreateAccessTokenOption { - /// CreateAccessTokenOption options when create access token - pub fn new(name: String) -> CreateAccessTokenOption { - CreateAccessTokenOption { name, scopes: None } - } -} diff --git a/forgejo-openapi/src/models/create_branch_protection_option.rs b/forgejo-openapi/src/models/create_branch_protection_option.rs deleted file mode 100644 index 5d316d8..0000000 --- a/forgejo-openapi/src/models/create_branch_protection_option.rs +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateBranchProtectionOption : CreateBranchProtectionOption options for creating a branch protection -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateBranchProtectionOption { - #[serde(rename = "apply_to_admins", skip_serializing_if = "Option::is_none")] - pub apply_to_admins: Option, - #[serde( - rename = "approvals_whitelist_teams", - skip_serializing_if = "Option::is_none" - )] - pub approvals_whitelist_teams: Option>, - #[serde( - rename = "approvals_whitelist_username", - skip_serializing_if = "Option::is_none" - )] - pub approvals_whitelist_username: Option>, - #[serde( - rename = "block_on_official_review_requests", - skip_serializing_if = "Option::is_none" - )] - pub block_on_official_review_requests: Option, - #[serde( - rename = "block_on_outdated_branch", - skip_serializing_if = "Option::is_none" - )] - pub block_on_outdated_branch: Option, - #[serde( - rename = "block_on_rejected_reviews", - skip_serializing_if = "Option::is_none" - )] - pub block_on_rejected_reviews: Option, - /// Deprecated: true - #[serde(rename = "branch_name", skip_serializing_if = "Option::is_none")] - pub branch_name: Option, - #[serde( - rename = "dismiss_stale_approvals", - skip_serializing_if = "Option::is_none" - )] - pub dismiss_stale_approvals: Option, - #[serde( - rename = "enable_approvals_whitelist", - skip_serializing_if = "Option::is_none" - )] - pub enable_approvals_whitelist: Option, - #[serde( - rename = "enable_merge_whitelist", - skip_serializing_if = "Option::is_none" - )] - pub enable_merge_whitelist: Option, - #[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")] - pub enable_push: Option, - #[serde( - rename = "enable_push_whitelist", - skip_serializing_if = "Option::is_none" - )] - pub enable_push_whitelist: Option, - #[serde( - rename = "enable_status_check", - skip_serializing_if = "Option::is_none" - )] - pub enable_status_check: Option, - #[serde( - rename = "ignore_stale_approvals", - skip_serializing_if = "Option::is_none" - )] - pub ignore_stale_approvals: Option, - #[serde( - rename = "merge_whitelist_teams", - skip_serializing_if = "Option::is_none" - )] - pub merge_whitelist_teams: Option>, - #[serde( - rename = "merge_whitelist_usernames", - skip_serializing_if = "Option::is_none" - )] - pub merge_whitelist_usernames: Option>, - #[serde( - rename = "protected_file_patterns", - skip_serializing_if = "Option::is_none" - )] - pub protected_file_patterns: Option, - #[serde( - rename = "push_whitelist_deploy_keys", - skip_serializing_if = "Option::is_none" - )] - pub push_whitelist_deploy_keys: Option, - #[serde( - rename = "push_whitelist_teams", - skip_serializing_if = "Option::is_none" - )] - pub push_whitelist_teams: Option>, - #[serde( - rename = "push_whitelist_usernames", - skip_serializing_if = "Option::is_none" - )] - pub push_whitelist_usernames: Option>, - #[serde( - rename = "require_signed_commits", - skip_serializing_if = "Option::is_none" - )] - pub require_signed_commits: Option, - #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] - pub required_approvals: Option, - #[serde(rename = "rule_name", skip_serializing_if = "Option::is_none")] - pub rule_name: Option, - #[serde( - rename = "status_check_contexts", - skip_serializing_if = "Option::is_none" - )] - pub status_check_contexts: Option>, - #[serde( - rename = "unprotected_file_patterns", - skip_serializing_if = "Option::is_none" - )] - pub unprotected_file_patterns: Option, -} - -impl CreateBranchProtectionOption { - /// CreateBranchProtectionOption options for creating a branch protection - pub fn new() -> CreateBranchProtectionOption { - CreateBranchProtectionOption { - apply_to_admins: None, - approvals_whitelist_teams: None, - approvals_whitelist_username: None, - block_on_official_review_requests: None, - block_on_outdated_branch: None, - block_on_rejected_reviews: None, - branch_name: None, - dismiss_stale_approvals: None, - enable_approvals_whitelist: None, - enable_merge_whitelist: None, - enable_push: None, - enable_push_whitelist: None, - enable_status_check: None, - ignore_stale_approvals: None, - merge_whitelist_teams: None, - merge_whitelist_usernames: None, - protected_file_patterns: None, - push_whitelist_deploy_keys: None, - push_whitelist_teams: None, - push_whitelist_usernames: None, - require_signed_commits: None, - required_approvals: None, - rule_name: None, - status_check_contexts: None, - unprotected_file_patterns: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_branch_repo_option.rs b/forgejo-openapi/src/models/create_branch_repo_option.rs deleted file mode 100644 index 319d082..0000000 --- a/forgejo-openapi/src/models/create_branch_repo_option.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateBranchRepoOption : CreateBranchRepoOption options when creating a branch in a repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateBranchRepoOption { - /// Name of the branch to create - #[serde(rename = "new_branch_name")] - pub new_branch_name: String, - /// Deprecated: true Name of the old branch to create from - #[serde(rename = "old_branch_name", skip_serializing_if = "Option::is_none")] - pub old_branch_name: Option, - /// Name of the old branch/tag/commit to create from - #[serde(rename = "old_ref_name", skip_serializing_if = "Option::is_none")] - pub old_ref_name: Option, -} - -impl CreateBranchRepoOption { - /// CreateBranchRepoOption options when creating a branch in a repository - pub fn new(new_branch_name: String) -> CreateBranchRepoOption { - CreateBranchRepoOption { - new_branch_name, - old_branch_name: None, - old_ref_name: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_email_option.rs b/forgejo-openapi/src/models/create_email_option.rs deleted file mode 100644 index c655094..0000000 --- a/forgejo-openapi/src/models/create_email_option.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateEmailOption : CreateEmailOption options when creating email addresses -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateEmailOption { - /// email addresses to add - #[serde(rename = "emails", skip_serializing_if = "Option::is_none")] - pub emails: Option>, -} - -impl CreateEmailOption { - /// CreateEmailOption options when creating email addresses - pub fn new() -> CreateEmailOption { - CreateEmailOption { emails: None } - } -} diff --git a/forgejo-openapi/src/models/create_file_options.rs b/forgejo-openapi/src/models/create_file_options.rs deleted file mode 100644 index 31ff8ed..0000000 --- a/forgejo-openapi/src/models/create_file_options.rs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateFileOptions : CreateFileOptions options for creating files 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) -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateFileOptions { - #[serde(rename = "author", skip_serializing_if = "Option::is_none")] - pub author: Option>, - /// branch (optional) to base this file from. if not given, the default branch is used - #[serde(rename = "branch", skip_serializing_if = "Option::is_none")] - pub branch: Option, - #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] - pub committer: Option>, - /// content must be base64 encoded - #[serde(rename = "content")] - pub content: String, - #[serde(rename = "dates", skip_serializing_if = "Option::is_none")] - pub dates: Option>, - /// message (optional) for the commit of this file. if not supplied, a default message will be used - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - /// new_branch (optional) will make a new branch from `branch` before creating the file - #[serde(rename = "new_branch", skip_serializing_if = "Option::is_none")] - pub new_branch: Option, - /// Add a Signed-off-by trailer by the committer at the end of the commit log message. - #[serde(rename = "signoff", skip_serializing_if = "Option::is_none")] - pub signoff: Option, -} - -impl CreateFileOptions { - /// CreateFileOptions options for creating files 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) - pub fn new(content: String) -> CreateFileOptions { - CreateFileOptions { - author: None, - branch: None, - committer: None, - content, - dates: None, - message: None, - new_branch: None, - signoff: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_fork_option.rs b/forgejo-openapi/src/models/create_fork_option.rs deleted file mode 100644 index 577e449..0000000 --- a/forgejo-openapi/src/models/create_fork_option.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateForkOption : CreateForkOption options for creating a fork -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateForkOption { - /// name of the forked repository - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// organization name, if forking into an organization - #[serde(rename = "organization", skip_serializing_if = "Option::is_none")] - pub organization: Option, -} - -impl CreateForkOption { - /// CreateForkOption options for creating a fork - pub fn new() -> CreateForkOption { - CreateForkOption { - name: None, - organization: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_gpg_key_option.rs b/forgejo-openapi/src/models/create_gpg_key_option.rs deleted file mode 100644 index 3ac1216..0000000 --- a/forgejo-openapi/src/models/create_gpg_key_option.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateGpgKeyOption : CreateGPGKeyOption options create user GPG key -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateGpgKeyOption { - /// An armored GPG key to add - #[serde(rename = "armored_public_key")] - pub armored_public_key: String, - #[serde(rename = "armored_signature", skip_serializing_if = "Option::is_none")] - pub armored_signature: Option, -} - -impl CreateGpgKeyOption { - /// CreateGPGKeyOption options create user GPG key - pub fn new(armored_public_key: String) -> CreateGpgKeyOption { - CreateGpgKeyOption { - armored_public_key, - armored_signature: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_hook_option.rs b/forgejo-openapi/src/models/create_hook_option.rs deleted file mode 100644 index 69a1807..0000000 --- a/forgejo-openapi/src/models/create_hook_option.rs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateHookOption : CreateHookOption options when create a hook -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateHookOption { - #[serde(rename = "active", skip_serializing_if = "Option::is_none")] - pub active: Option, - #[serde( - rename = "authorization_header", - skip_serializing_if = "Option::is_none" - )] - pub authorization_header: Option, - #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] - pub branch_filter: Option, - /// CreateHookOptionConfig has all config options in it required are \"content_type\" and \"url\" Required - #[serde(rename = "config")] - pub config: std::collections::HashMap, - #[serde(rename = "events", skip_serializing_if = "Option::is_none")] - pub events: Option>, - #[serde(rename = "type")] - pub r#type: Type, -} - -impl CreateHookOption { - /// CreateHookOption options when create a hook - pub fn new( - config: std::collections::HashMap, - r#type: Type, - ) -> CreateHookOption { - CreateHookOption { - active: None, - authorization_header: None, - branch_filter: None, - config, - events: None, - r#type, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "forgejo")] - Forgejo, - #[serde(rename = "dingtalk")] - Dingtalk, - #[serde(rename = "discord")] - Discord, - #[serde(rename = "gitea")] - Gitea, - #[serde(rename = "gogs")] - Gogs, - #[serde(rename = "msteams")] - Msteams, - #[serde(rename = "slack")] - Slack, - #[serde(rename = "telegram")] - Telegram, - #[serde(rename = "feishu")] - Feishu, - #[serde(rename = "wechatwork")] - Wechatwork, - #[serde(rename = "packagist")] - Packagist, -} - -impl Default for Type { - fn default() -> Type { - Self::Forgejo - } -} diff --git a/forgejo-openapi/src/models/create_issue_comment_option.rs b/forgejo-openapi/src/models/create_issue_comment_option.rs deleted file mode 100644 index 159720a..0000000 --- a/forgejo-openapi/src/models/create_issue_comment_option.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateIssueCommentOption : CreateIssueCommentOption options for creating a comment on an issue -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateIssueCommentOption { - #[serde(rename = "body")] - pub body: String, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, -} - -impl CreateIssueCommentOption { - /// CreateIssueCommentOption options for creating a comment on an issue - pub fn new(body: String) -> CreateIssueCommentOption { - CreateIssueCommentOption { - body, - updated_at: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_issue_option.rs b/forgejo-openapi/src/models/create_issue_option.rs deleted file mode 100644 index 922569e..0000000 --- a/forgejo-openapi/src/models/create_issue_option.rs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateIssueOption : CreateIssueOption options to create one issue -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateIssueOption { - /// deprecated - #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] - pub assignee: Option, - #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] - pub assignees: Option>, - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "closed", skip_serializing_if = "Option::is_none")] - pub closed: Option, - #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] - pub due_date: Option, - /// list of label ids - #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] - pub labels: Option>, - /// milestone id - #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] - pub milestone: Option, - #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] - pub r#ref: Option, - #[serde(rename = "title")] - pub title: String, -} - -impl CreateIssueOption { - /// CreateIssueOption options to create one issue - pub fn new(title: String) -> CreateIssueOption { - CreateIssueOption { - assignee: None, - assignees: None, - body: None, - closed: None, - due_date: None, - labels: None, - milestone: None, - r#ref: None, - title, - } - } -} diff --git a/forgejo-openapi/src/models/create_key_option.rs b/forgejo-openapi/src/models/create_key_option.rs deleted file mode 100644 index 4fd4c32..0000000 --- a/forgejo-openapi/src/models/create_key_option.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateKeyOption : CreateKeyOption options when creating a key -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateKeyOption { - /// An armored SSH key to add - #[serde(rename = "key")] - pub key: String, - /// Describe if the key has only read access or read/write - #[serde(rename = "read_only", skip_serializing_if = "Option::is_none")] - pub read_only: Option, - /// Title of the key to add - #[serde(rename = "title")] - pub title: String, -} - -impl CreateKeyOption { - /// CreateKeyOption options when creating a key - pub fn new(key: String, title: String) -> CreateKeyOption { - CreateKeyOption { - key, - read_only: None, - title, - } - } -} diff --git a/forgejo-openapi/src/models/create_label_option.rs b/forgejo-openapi/src/models/create_label_option.rs deleted file mode 100644 index 5dadd98..0000000 --- a/forgejo-openapi/src/models/create_label_option.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateLabelOption : CreateLabelOption options for creating a label -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateLabelOption { - #[serde(rename = "color")] - pub color: String, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "exclusive", skip_serializing_if = "Option::is_none")] - pub exclusive: Option, - #[serde(rename = "is_archived", skip_serializing_if = "Option::is_none")] - pub is_archived: Option, - #[serde(rename = "name")] - pub name: String, -} - -impl CreateLabelOption { - /// CreateLabelOption options for creating a label - pub fn new(color: String, name: String) -> CreateLabelOption { - CreateLabelOption { - color, - description: None, - exclusive: None, - is_archived: None, - name, - } - } -} diff --git a/forgejo-openapi/src/models/create_milestone_option.rs b/forgejo-openapi/src/models/create_milestone_option.rs deleted file mode 100644 index 261861b..0000000 --- a/forgejo-openapi/src/models/create_milestone_option.rs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateMilestoneOption : CreateMilestoneOption options for creating a milestone -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateMilestoneOption { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "due_on", skip_serializing_if = "Option::is_none")] - pub due_on: Option, - #[serde(rename = "state", skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, -} - -impl CreateMilestoneOption { - /// CreateMilestoneOption options for creating a milestone - pub fn new() -> CreateMilestoneOption { - CreateMilestoneOption { - description: None, - due_on: None, - state: None, - title: None, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum State { - #[serde(rename = "open")] - Open, - #[serde(rename = "closed")] - Closed, -} - -impl Default for State { - fn default() -> State { - Self::Open - } -} diff --git a/forgejo-openapi/src/models/create_o_auth2_application_options.rs b/forgejo-openapi/src/models/create_o_auth2_application_options.rs deleted file mode 100644 index 826dd1a..0000000 --- a/forgejo-openapi/src/models/create_o_auth2_application_options.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateOAuth2ApplicationOptions : CreateOAuth2ApplicationOptions holds options to create an oauth2 application -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateOAuth2ApplicationOptions { - #[serde( - rename = "confidential_client", - skip_serializing_if = "Option::is_none" - )] - pub confidential_client: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "redirect_uris", skip_serializing_if = "Option::is_none")] - pub redirect_uris: Option>, -} - -impl CreateOAuth2ApplicationOptions { - /// CreateOAuth2ApplicationOptions holds options to create an oauth2 application - pub fn new() -> CreateOAuth2ApplicationOptions { - CreateOAuth2ApplicationOptions { - confidential_client: None, - name: None, - redirect_uris: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_or_update_secret_option.rs b/forgejo-openapi/src/models/create_or_update_secret_option.rs deleted file mode 100644 index cb7ac74..0000000 --- a/forgejo-openapi/src/models/create_or_update_secret_option.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateOrUpdateSecretOption : CreateOrUpdateSecretOption options when creating or updating secret -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateOrUpdateSecretOption { - /// Data of the secret to update - #[serde(rename = "data")] - pub data: String, -} - -impl CreateOrUpdateSecretOption { - /// CreateOrUpdateSecretOption options when creating or updating secret - pub fn new(data: String) -> CreateOrUpdateSecretOption { - CreateOrUpdateSecretOption { data } - } -} diff --git a/forgejo-openapi/src/models/create_org_option.rs b/forgejo-openapi/src/models/create_org_option.rs deleted file mode 100644 index a39bd6a..0000000 --- a/forgejo-openapi/src/models/create_org_option.rs +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateOrgOption : CreateOrgOption options for creating an organization -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateOrgOption { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] - pub full_name: Option, - #[serde(rename = "location", skip_serializing_if = "Option::is_none")] - pub location: Option, - #[serde( - rename = "repo_admin_change_team_access", - skip_serializing_if = "Option::is_none" - )] - pub repo_admin_change_team_access: Option, - #[serde(rename = "username")] - pub username: String, - /// possible values are `public` (default), `limited` or `private` - #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] - pub visibility: Option, - #[serde(rename = "website", skip_serializing_if = "Option::is_none")] - pub website: Option, -} - -impl CreateOrgOption { - /// CreateOrgOption options for creating an organization - pub fn new(username: String) -> CreateOrgOption { - CreateOrgOption { - description: None, - email: None, - full_name: None, - location: None, - repo_admin_change_team_access: None, - username, - visibility: None, - website: None, - } - } -} -/// possible values are `public` (default), `limited` or `private` -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Visibility { - #[serde(rename = "public")] - Public, - #[serde(rename = "limited")] - Limited, - #[serde(rename = "private")] - Private, -} - -impl Default for Visibility { - fn default() -> Visibility { - Self::Public - } -} diff --git a/forgejo-openapi/src/models/create_pull_request_option.rs b/forgejo-openapi/src/models/create_pull_request_option.rs deleted file mode 100644 index 0f2a670..0000000 --- a/forgejo-openapi/src/models/create_pull_request_option.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreatePullRequestOption : CreatePullRequestOption options when creating a pull request -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreatePullRequestOption { - #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] - pub assignee: Option, - #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] - pub assignees: Option>, - #[serde(rename = "base", skip_serializing_if = "Option::is_none")] - pub base: Option, - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] - pub due_date: Option, - #[serde(rename = "head", skip_serializing_if = "Option::is_none")] - pub head: Option, - #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] - pub milestone: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, -} - -impl CreatePullRequestOption { - /// CreatePullRequestOption options when creating a pull request - pub fn new() -> CreatePullRequestOption { - CreatePullRequestOption { - assignee: None, - assignees: None, - base: None, - body: None, - due_date: None, - head: None, - labels: None, - milestone: None, - title: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_pull_review_comment.rs b/forgejo-openapi/src/models/create_pull_review_comment.rs deleted file mode 100644 index 2c94189..0000000 --- a/forgejo-openapi/src/models/create_pull_review_comment.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreatePullReviewComment : CreatePullReviewComment represent a review comment for creation api -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreatePullReviewComment { - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - /// if comment to new file line or 0 - #[serde(rename = "new_position", skip_serializing_if = "Option::is_none")] - pub new_position: Option, - /// if comment to old file line or 0 - #[serde(rename = "old_position", skip_serializing_if = "Option::is_none")] - pub old_position: Option, - /// the tree path - #[serde(rename = "path", skip_serializing_if = "Option::is_none")] - pub path: Option, -} - -impl CreatePullReviewComment { - /// CreatePullReviewComment represent a review comment for creation api - pub fn new() -> CreatePullReviewComment { - CreatePullReviewComment { - body: None, - new_position: None, - old_position: None, - path: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_pull_review_options.rs b/forgejo-openapi/src/models/create_pull_review_options.rs deleted file mode 100644 index a0226b5..0000000 --- a/forgejo-openapi/src/models/create_pull_review_options.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreatePullReviewOptions : CreatePullReviewOptions are options to create a pull review -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreatePullReviewOptions { - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "comments", skip_serializing_if = "Option::is_none")] - pub comments: Option>, - #[serde(rename = "commit_id", skip_serializing_if = "Option::is_none")] - pub commit_id: Option, - /// ReviewStateType review state type - #[serde(rename = "event", skip_serializing_if = "Option::is_none")] - pub event: Option, -} - -impl CreatePullReviewOptions { - /// CreatePullReviewOptions are options to create a pull review - pub fn new() -> CreatePullReviewOptions { - CreatePullReviewOptions { - body: None, - comments: None, - commit_id: None, - event: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_push_mirror_option.rs b/forgejo-openapi/src/models/create_push_mirror_option.rs deleted file mode 100644 index 38c343f..0000000 --- a/forgejo-openapi/src/models/create_push_mirror_option.rs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreatePushMirrorOption { - #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] - pub branch_filter: Option, - #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] - pub interval: Option, - #[serde(rename = "remote_address", skip_serializing_if = "Option::is_none")] - pub remote_address: Option, - #[serde(rename = "remote_password", skip_serializing_if = "Option::is_none")] - pub remote_password: Option, - #[serde(rename = "remote_username", skip_serializing_if = "Option::is_none")] - pub remote_username: Option, - #[serde(rename = "sync_on_commit", skip_serializing_if = "Option::is_none")] - pub sync_on_commit: Option, - #[serde(rename = "use_ssh", skip_serializing_if = "Option::is_none")] - pub use_ssh: Option, -} - -impl CreatePushMirrorOption { - pub fn new() -> CreatePushMirrorOption { - CreatePushMirrorOption { - branch_filter: None, - interval: None, - remote_address: None, - remote_password: None, - remote_username: None, - sync_on_commit: None, - use_ssh: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_quota_group_options.rs b/forgejo-openapi/src/models/create_quota_group_options.rs deleted file mode 100644 index 08cc2ca..0000000 --- a/forgejo-openapi/src/models/create_quota_group_options.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateQuotaGroupOptions : CreateQutaGroupOptions represents the options for creating a quota group -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateQuotaGroupOptions { - /// Name of the quota group to create - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// Rules to add to the newly created group. If a rule does not exist, it will be created. - #[serde(rename = "rules", skip_serializing_if = "Option::is_none")] - pub rules: Option>, -} - -impl CreateQuotaGroupOptions { - /// CreateQutaGroupOptions represents the options for creating a quota group - pub fn new() -> CreateQuotaGroupOptions { - CreateQuotaGroupOptions { - name: None, - rules: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_quota_rule_options.rs b/forgejo-openapi/src/models/create_quota_rule_options.rs deleted file mode 100644 index f47bc67..0000000 --- a/forgejo-openapi/src/models/create_quota_rule_options.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateQuotaRuleOptions : CreateQuotaRuleOptions represents the options for creating a quota rule -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateQuotaRuleOptions { - /// The limit set by the rule - #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] - pub limit: Option, - /// Name of the rule to create - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// The subjects affected by the rule - #[serde(rename = "subjects", skip_serializing_if = "Option::is_none")] - pub subjects: Option>, -} - -impl CreateQuotaRuleOptions { - /// CreateQuotaRuleOptions represents the options for creating a quota rule - pub fn new() -> CreateQuotaRuleOptions { - CreateQuotaRuleOptions { - limit: None, - name: None, - subjects: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_release_option.rs b/forgejo-openapi/src/models/create_release_option.rs deleted file mode 100644 index f3a4fac..0000000 --- a/forgejo-openapi/src/models/create_release_option.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateReleaseOption : CreateReleaseOption options when creating a release -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateReleaseOption { - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "draft", skip_serializing_if = "Option::is_none")] - pub draft: Option, - #[serde(rename = "hide_archive_links", skip_serializing_if = "Option::is_none")] - pub hide_archive_links: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "prerelease", skip_serializing_if = "Option::is_none")] - pub prerelease: Option, - #[serde(rename = "tag_name")] - pub tag_name: String, - #[serde(rename = "target_commitish", skip_serializing_if = "Option::is_none")] - pub target_commitish: Option, -} - -impl CreateReleaseOption { - /// CreateReleaseOption options when creating a release - pub fn new(tag_name: String) -> CreateReleaseOption { - CreateReleaseOption { - body: None, - draft: None, - hide_archive_links: None, - name: None, - prerelease: None, - tag_name, - target_commitish: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_repo_option.rs b/forgejo-openapi/src/models/create_repo_option.rs deleted file mode 100644 index 6017a41..0000000 --- a/forgejo-openapi/src/models/create_repo_option.rs +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateRepoOption : CreateRepoOption options when creating repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateRepoOption { - /// Whether the repository should be auto-initialized? - #[serde(rename = "auto_init", skip_serializing_if = "Option::is_none")] - pub auto_init: Option, - /// DefaultBranch of the repository (used when initializes and in template) - #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] - pub default_branch: Option, - /// Description of the repository to create - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - /// Gitignores to use - #[serde(rename = "gitignores", skip_serializing_if = "Option::is_none")] - pub gitignores: Option, - /// Label-Set to use - #[serde(rename = "issue_labels", skip_serializing_if = "Option::is_none")] - pub issue_labels: Option, - /// License to use - #[serde(rename = "license", skip_serializing_if = "Option::is_none")] - pub license: Option, - /// Name of the repository to create - #[serde(rename = "name")] - pub name: String, - /// ObjectFormatName of the underlying git repository - #[serde(rename = "object_format_name", skip_serializing_if = "Option::is_none")] - pub object_format_name: Option, - /// Whether the repository is private - #[serde(rename = "private", skip_serializing_if = "Option::is_none")] - pub private: Option, - /// Readme of the repository to create - #[serde(rename = "readme", skip_serializing_if = "Option::is_none")] - pub readme: Option, - /// Whether the repository is template - #[serde(rename = "template", skip_serializing_if = "Option::is_none")] - pub template: Option, - /// TrustModel of the repository - #[serde(rename = "trust_model", skip_serializing_if = "Option::is_none")] - pub trust_model: Option, -} - -impl CreateRepoOption { - /// CreateRepoOption options when creating repository - pub fn new(name: String) -> CreateRepoOption { - CreateRepoOption { - auto_init: None, - default_branch: None, - description: None, - gitignores: None, - issue_labels: None, - license: None, - name, - object_format_name: None, - private: None, - readme: None, - template: None, - trust_model: None, - } - } -} -/// ObjectFormatName of the underlying git repository -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ObjectFormatName { - #[serde(rename = "sha1")] - Sha1, - #[serde(rename = "sha256")] - Sha256, -} - -impl Default for ObjectFormatName { - fn default() -> ObjectFormatName { - Self::Sha1 - } -} -/// TrustModel of the repository -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum TrustModel { - #[serde(rename = "default")] - Default, - #[serde(rename = "collaborator")] - Collaborator, - #[serde(rename = "committer")] - Committer, - #[serde(rename = "collaboratorcommitter")] - Collaboratorcommitter, -} - -impl Default for TrustModel { - fn default() -> TrustModel { - Self::Default - } -} diff --git a/forgejo-openapi/src/models/create_status_option.rs b/forgejo-openapi/src/models/create_status_option.rs deleted file mode 100644 index dd087d6..0000000 --- a/forgejo-openapi/src/models/create_status_option.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateStatusOption : CreateStatusOption holds the information needed to create a new CommitStatus for a Commit -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateStatusOption { - #[serde(rename = "context", skip_serializing_if = "Option::is_none")] - pub context: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - /// CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\" - #[serde(rename = "state", skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "target_url", skip_serializing_if = "Option::is_none")] - pub target_url: Option, -} - -impl CreateStatusOption { - /// CreateStatusOption holds the information needed to create a new CommitStatus for a Commit - pub fn new() -> CreateStatusOption { - CreateStatusOption { - context: None, - description: None, - state: None, - target_url: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_tag_option.rs b/forgejo-openapi/src/models/create_tag_option.rs deleted file mode 100644 index 86b0c97..0000000 --- a/forgejo-openapi/src/models/create_tag_option.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateTagOption : CreateTagOption options when creating a tag -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateTagOption { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "tag_name")] - pub tag_name: String, - #[serde(rename = "target", skip_serializing_if = "Option::is_none")] - pub target: Option, -} - -impl CreateTagOption { - /// CreateTagOption options when creating a tag - pub fn new(tag_name: String) -> CreateTagOption { - CreateTagOption { - message: None, - tag_name, - target: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_tag_protection_option.rs b/forgejo-openapi/src/models/create_tag_protection_option.rs deleted file mode 100644 index b093768..0000000 --- a/forgejo-openapi/src/models/create_tag_protection_option.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateTagProtectionOption : CreateTagProtectionOption options for creating a tag protection -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateTagProtectionOption { - #[serde(rename = "name_pattern", skip_serializing_if = "Option::is_none")] - pub name_pattern: Option, - #[serde(rename = "whitelist_teams", skip_serializing_if = "Option::is_none")] - pub whitelist_teams: Option>, - #[serde( - rename = "whitelist_usernames", - skip_serializing_if = "Option::is_none" - )] - pub whitelist_usernames: Option>, -} - -impl CreateTagProtectionOption { - /// CreateTagProtectionOption options for creating a tag protection - pub fn new() -> CreateTagProtectionOption { - CreateTagProtectionOption { - name_pattern: None, - whitelist_teams: None, - whitelist_usernames: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_team_option.rs b/forgejo-openapi/src/models/create_team_option.rs deleted file mode 100644 index da8012c..0000000 --- a/forgejo-openapi/src/models/create_team_option.rs +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateTeamOption : CreateTeamOption options for creating a team -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateTeamOption { - #[serde( - rename = "can_create_org_repo", - skip_serializing_if = "Option::is_none" - )] - pub can_create_org_repo: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde( - rename = "includes_all_repositories", - skip_serializing_if = "Option::is_none" - )] - pub includes_all_repositories: Option, - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] - pub permission: Option, - #[serde(rename = "units", skip_serializing_if = "Option::is_none")] - pub units: Option>, - #[serde(rename = "units_map", skip_serializing_if = "Option::is_none")] - pub units_map: Option>, -} - -impl CreateTeamOption { - /// CreateTeamOption options for creating a team - pub fn new(name: String) -> CreateTeamOption { - CreateTeamOption { - can_create_org_repo: None, - description: None, - includes_all_repositories: None, - name, - permission: None, - units: None, - units_map: None, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Permission { - #[serde(rename = "read")] - Read, - #[serde(rename = "write")] - Write, - #[serde(rename = "admin")] - Admin, -} - -impl Default for Permission { - fn default() -> Permission { - Self::Read - } -} diff --git a/forgejo-openapi/src/models/create_user_option.rs b/forgejo-openapi/src/models/create_user_option.rs deleted file mode 100644 index 7972850..0000000 --- a/forgejo-openapi/src/models/create_user_option.rs +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateUserOption : CreateUserOption create user options -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateUserOption { - /// For explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to \"now\". - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "email")] - pub email: String, - #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] - pub full_name: Option, - #[serde(rename = "login_name", skip_serializing_if = "Option::is_none")] - pub login_name: Option, - #[serde( - rename = "must_change_password", - skip_serializing_if = "Option::is_none" - )] - pub must_change_password: Option, - #[serde(rename = "password", skip_serializing_if = "Option::is_none")] - pub password: Option, - #[serde(rename = "restricted", skip_serializing_if = "Option::is_none")] - pub restricted: Option, - #[serde(rename = "send_notify", skip_serializing_if = "Option::is_none")] - pub send_notify: Option, - #[serde(rename = "source_id", skip_serializing_if = "Option::is_none")] - pub source_id: Option, - #[serde(rename = "username")] - pub username: String, - #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] - pub visibility: Option, -} - -impl CreateUserOption { - /// CreateUserOption create user options - pub fn new(email: String, username: String) -> CreateUserOption { - CreateUserOption { - created_at: None, - email, - full_name: None, - login_name: None, - must_change_password: None, - password: None, - restricted: None, - send_notify: None, - source_id: None, - username, - visibility: None, - } - } -} diff --git a/forgejo-openapi/src/models/create_variable_option.rs b/forgejo-openapi/src/models/create_variable_option.rs deleted file mode 100644 index e8a2f61..0000000 --- a/forgejo-openapi/src/models/create_variable_option.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateVariableOption : CreateVariableOption the option when creating variable -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateVariableOption { - /// Value of the variable to create - #[serde(rename = "value")] - pub value: String, -} - -impl CreateVariableOption { - /// CreateVariableOption the option when creating variable - pub fn new(value: String) -> CreateVariableOption { - CreateVariableOption { value } - } -} diff --git a/forgejo-openapi/src/models/create_wiki_page_options.rs b/forgejo-openapi/src/models/create_wiki_page_options.rs deleted file mode 100644 index d1d3aca..0000000 --- a/forgejo-openapi/src/models/create_wiki_page_options.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// CreateWikiPageOptions : CreateWikiPageOptions form for creating wiki -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateWikiPageOptions { - /// content must be base64 encoded - #[serde(rename = "content_base64", skip_serializing_if = "Option::is_none")] - pub content_base64: Option, - /// optional commit message summarizing the change - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - /// page title. leave empty to keep unchanged - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, -} - -impl CreateWikiPageOptions { - /// CreateWikiPageOptions form for creating wiki - pub fn new() -> CreateWikiPageOptions { - CreateWikiPageOptions { - content_base64: None, - message: None, - title: None, - } - } -} diff --git a/forgejo-openapi/src/models/cron.rs b/forgejo-openapi/src/models/cron.rs deleted file mode 100644 index 60f2144..0000000 --- a/forgejo-openapi/src/models/cron.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Cron : Cron represents a Cron task -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Cron { - #[serde(rename = "exec_times", skip_serializing_if = "Option::is_none")] - pub exec_times: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "next", skip_serializing_if = "Option::is_none")] - pub next: Option, - #[serde(rename = "prev", skip_serializing_if = "Option::is_none")] - pub prev: Option, - #[serde(rename = "schedule", skip_serializing_if = "Option::is_none")] - pub schedule: Option, -} - -impl Cron { - /// Cron represents a Cron task - pub fn new() -> Cron { - Cron { - exec_times: None, - name: None, - next: None, - prev: None, - schedule: None, - } - } -} diff --git a/forgejo-openapi/src/models/delete_email_option.rs b/forgejo-openapi/src/models/delete_email_option.rs deleted file mode 100644 index 0c95470..0000000 --- a/forgejo-openapi/src/models/delete_email_option.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// DeleteEmailOption : DeleteEmailOption options when deleting email addresses -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct DeleteEmailOption { - /// email addresses to delete - #[serde(rename = "emails", skip_serializing_if = "Option::is_none")] - pub emails: Option>, -} - -impl DeleteEmailOption { - /// DeleteEmailOption options when deleting email addresses - pub fn new() -> DeleteEmailOption { - DeleteEmailOption { emails: None } - } -} diff --git a/forgejo-openapi/src/models/delete_file_options.rs b/forgejo-openapi/src/models/delete_file_options.rs deleted file mode 100644 index a20e461..0000000 --- a/forgejo-openapi/src/models/delete_file_options.rs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// DeleteFileOptions : DeleteFileOptions options for deleting files (used for other File structs below) 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) -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct DeleteFileOptions { - #[serde(rename = "author", skip_serializing_if = "Option::is_none")] - pub author: Option>, - /// branch (optional) to base this file from. if not given, the default branch is used - #[serde(rename = "branch", skip_serializing_if = "Option::is_none")] - pub branch: Option, - #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] - pub committer: Option>, - #[serde(rename = "dates", skip_serializing_if = "Option::is_none")] - pub dates: Option>, - /// message (optional) for the commit of this file. if not supplied, a default message will be used - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - /// new_branch (optional) will make a new branch from `branch` before creating the file - #[serde(rename = "new_branch", skip_serializing_if = "Option::is_none")] - pub new_branch: Option, - /// sha is the SHA for the file that already exists - #[serde(rename = "sha")] - pub sha: String, - /// Add a Signed-off-by trailer by the committer at the end of the commit log message. - #[serde(rename = "signoff", skip_serializing_if = "Option::is_none")] - pub signoff: Option, -} - -impl DeleteFileOptions { - /// DeleteFileOptions options for deleting files (used for other File structs below) 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) - pub fn new(sha: String) -> DeleteFileOptions { - DeleteFileOptions { - author: None, - branch: None, - committer: None, - dates: None, - message: None, - new_branch: None, - sha, - signoff: None, - } - } -} diff --git a/forgejo-openapi/src/models/delete_labels_option.rs b/forgejo-openapi/src/models/delete_labels_option.rs deleted file mode 100644 index e08c81a..0000000 --- a/forgejo-openapi/src/models/delete_labels_option.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// DeleteLabelsOption : DeleteLabelOption options for deleting a label -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct DeleteLabelsOption { - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, -} - -impl DeleteLabelsOption { - /// DeleteLabelOption options for deleting a label - pub fn new() -> DeleteLabelsOption { - DeleteLabelsOption { updated_at: None } - } -} diff --git a/forgejo-openapi/src/models/deploy_key.rs b/forgejo-openapi/src/models/deploy_key.rs deleted file mode 100644 index 159d6c9..0000000 --- a/forgejo-openapi/src/models/deploy_key.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// DeployKey : DeployKey a deploy key -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct DeployKey { - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "fingerprint", skip_serializing_if = "Option::is_none")] - pub fingerprint: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, - #[serde(rename = "key_id", skip_serializing_if = "Option::is_none")] - pub key_id: Option, - #[serde(rename = "read_only", skip_serializing_if = "Option::is_none")] - pub read_only: Option, - #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] - pub repository: Option>, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl DeployKey { - /// DeployKey a deploy key - pub fn new() -> DeployKey { - DeployKey { - created_at: None, - fingerprint: None, - id: None, - key: None, - key_id: None, - read_only: None, - repository: None, - title: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/dismiss_pull_review_options.rs b/forgejo-openapi/src/models/dismiss_pull_review_options.rs deleted file mode 100644 index 30be2f9..0000000 --- a/forgejo-openapi/src/models/dismiss_pull_review_options.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// DismissPullReviewOptions : DismissPullReviewOptions are options to dismiss a pull review -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct DismissPullReviewOptions { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "priors", skip_serializing_if = "Option::is_none")] - pub priors: Option, -} - -impl DismissPullReviewOptions { - /// DismissPullReviewOptions are options to dismiss a pull review - pub fn new() -> DismissPullReviewOptions { - DismissPullReviewOptions { - message: None, - priors: None, - } - } -} diff --git a/forgejo-openapi/src/models/dispatch_workflow_option.rs b/forgejo-openapi/src/models/dispatch_workflow_option.rs deleted file mode 100644 index 474120b..0000000 --- a/forgejo-openapi/src/models/dispatch_workflow_option.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// DispatchWorkflowOption : DispatchWorkflowOption options when dispatching a workflow -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct DispatchWorkflowOption { - /// Input keys and values configured in the workflow file. - #[serde(rename = "inputs", skip_serializing_if = "Option::is_none")] - pub inputs: Option>, - /// Git reference for the workflow - #[serde(rename = "ref")] - pub r#ref: String, - /// Flag to return the run info - #[serde(rename = "return_run_info", skip_serializing_if = "Option::is_none")] - pub return_run_info: Option, -} - -impl DispatchWorkflowOption { - /// DispatchWorkflowOption options when dispatching a workflow - pub fn new(r#ref: String) -> DispatchWorkflowOption { - DispatchWorkflowOption { - inputs: None, - r#ref, - return_run_info: None, - } - } -} diff --git a/forgejo-openapi/src/models/dispatch_workflow_run.rs b/forgejo-openapi/src/models/dispatch_workflow_run.rs deleted file mode 100644 index c591819..0000000 --- a/forgejo-openapi/src/models/dispatch_workflow_run.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// DispatchWorkflowRun : DispatchWorkflowRun represents a workflow run -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct DispatchWorkflowRun { - /// the workflow run id - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// the jobs name - #[serde(rename = "jobs", skip_serializing_if = "Option::is_none")] - pub jobs: Option>, - /// a unique number for each run of a repository - #[serde(rename = "run_number", skip_serializing_if = "Option::is_none")] - pub run_number: Option, -} - -impl DispatchWorkflowRun { - /// DispatchWorkflowRun represents a workflow run - pub fn new() -> DispatchWorkflowRun { - DispatchWorkflowRun { - id: None, - jobs: None, - run_number: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_attachment_options.rs b/forgejo-openapi/src/models/edit_attachment_options.rs deleted file mode 100644 index 7d70787..0000000 --- a/forgejo-openapi/src/models/edit_attachment_options.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditAttachmentOptions : EditAttachmentOptions options for editing attachments -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditAttachmentOptions { - /// (Can only be set if existing attachment is of external type) - #[serde( - rename = "browser_download_url", - skip_serializing_if = "Option::is_none" - )] - pub browser_download_url: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, -} - -impl EditAttachmentOptions { - /// EditAttachmentOptions options for editing attachments - pub fn new() -> EditAttachmentOptions { - EditAttachmentOptions { - browser_download_url: None, - name: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_branch_protection_option.rs b/forgejo-openapi/src/models/edit_branch_protection_option.rs deleted file mode 100644 index 46456cc..0000000 --- a/forgejo-openapi/src/models/edit_branch_protection_option.rs +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditBranchProtectionOption : EditBranchProtectionOption options for editing a branch protection -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditBranchProtectionOption { - #[serde(rename = "apply_to_admins", skip_serializing_if = "Option::is_none")] - pub apply_to_admins: Option, - #[serde( - rename = "approvals_whitelist_teams", - skip_serializing_if = "Option::is_none" - )] - pub approvals_whitelist_teams: Option>, - #[serde( - rename = "approvals_whitelist_username", - skip_serializing_if = "Option::is_none" - )] - pub approvals_whitelist_username: Option>, - #[serde( - rename = "block_on_official_review_requests", - skip_serializing_if = "Option::is_none" - )] - pub block_on_official_review_requests: Option, - #[serde( - rename = "block_on_outdated_branch", - skip_serializing_if = "Option::is_none" - )] - pub block_on_outdated_branch: Option, - #[serde( - rename = "block_on_rejected_reviews", - skip_serializing_if = "Option::is_none" - )] - pub block_on_rejected_reviews: Option, - #[serde( - rename = "dismiss_stale_approvals", - skip_serializing_if = "Option::is_none" - )] - pub dismiss_stale_approvals: Option, - #[serde( - rename = "enable_approvals_whitelist", - skip_serializing_if = "Option::is_none" - )] - pub enable_approvals_whitelist: Option, - #[serde( - rename = "enable_merge_whitelist", - skip_serializing_if = "Option::is_none" - )] - pub enable_merge_whitelist: Option, - #[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")] - pub enable_push: Option, - #[serde( - rename = "enable_push_whitelist", - skip_serializing_if = "Option::is_none" - )] - pub enable_push_whitelist: Option, - #[serde( - rename = "enable_status_check", - skip_serializing_if = "Option::is_none" - )] - pub enable_status_check: Option, - #[serde( - rename = "ignore_stale_approvals", - skip_serializing_if = "Option::is_none" - )] - pub ignore_stale_approvals: Option, - #[serde( - rename = "merge_whitelist_teams", - skip_serializing_if = "Option::is_none" - )] - pub merge_whitelist_teams: Option>, - #[serde( - rename = "merge_whitelist_usernames", - skip_serializing_if = "Option::is_none" - )] - pub merge_whitelist_usernames: Option>, - #[serde( - rename = "protected_file_patterns", - skip_serializing_if = "Option::is_none" - )] - pub protected_file_patterns: Option, - #[serde( - rename = "push_whitelist_deploy_keys", - skip_serializing_if = "Option::is_none" - )] - pub push_whitelist_deploy_keys: Option, - #[serde( - rename = "push_whitelist_teams", - skip_serializing_if = "Option::is_none" - )] - pub push_whitelist_teams: Option>, - #[serde( - rename = "push_whitelist_usernames", - skip_serializing_if = "Option::is_none" - )] - pub push_whitelist_usernames: Option>, - #[serde( - rename = "require_signed_commits", - skip_serializing_if = "Option::is_none" - )] - pub require_signed_commits: Option, - #[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")] - pub required_approvals: Option, - #[serde( - rename = "status_check_contexts", - skip_serializing_if = "Option::is_none" - )] - pub status_check_contexts: Option>, - #[serde( - rename = "unprotected_file_patterns", - skip_serializing_if = "Option::is_none" - )] - pub unprotected_file_patterns: Option, -} - -impl EditBranchProtectionOption { - /// EditBranchProtectionOption options for editing a branch protection - pub fn new() -> EditBranchProtectionOption { - EditBranchProtectionOption { - apply_to_admins: None, - approvals_whitelist_teams: None, - approvals_whitelist_username: None, - block_on_official_review_requests: None, - block_on_outdated_branch: None, - block_on_rejected_reviews: None, - dismiss_stale_approvals: None, - enable_approvals_whitelist: None, - enable_merge_whitelist: None, - enable_push: None, - enable_push_whitelist: None, - enable_status_check: None, - ignore_stale_approvals: None, - merge_whitelist_teams: None, - merge_whitelist_usernames: None, - protected_file_patterns: None, - push_whitelist_deploy_keys: None, - push_whitelist_teams: None, - push_whitelist_usernames: None, - require_signed_commits: None, - required_approvals: None, - status_check_contexts: None, - unprotected_file_patterns: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_deadline_option.rs b/forgejo-openapi/src/models/edit_deadline_option.rs deleted file mode 100644 index c8792b5..0000000 --- a/forgejo-openapi/src/models/edit_deadline_option.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditDeadlineOption : EditDeadlineOption options for creating a deadline -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditDeadlineOption { - #[serde(rename = "due_date")] - pub due_date: String, -} - -impl EditDeadlineOption { - /// EditDeadlineOption options for creating a deadline - pub fn new(due_date: String) -> EditDeadlineOption { - EditDeadlineOption { due_date } - } -} diff --git a/forgejo-openapi/src/models/edit_git_hook_option.rs b/forgejo-openapi/src/models/edit_git_hook_option.rs deleted file mode 100644 index 1e414b6..0000000 --- a/forgejo-openapi/src/models/edit_git_hook_option.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditGitHookOption : EditGitHookOption options when modifying one Git hook -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditGitHookOption { - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option, -} - -impl EditGitHookOption { - /// EditGitHookOption options when modifying one Git hook - pub fn new() -> EditGitHookOption { - EditGitHookOption { content: None } - } -} diff --git a/forgejo-openapi/src/models/edit_hook_option.rs b/forgejo-openapi/src/models/edit_hook_option.rs deleted file mode 100644 index 1f513d3..0000000 --- a/forgejo-openapi/src/models/edit_hook_option.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditHookOption : EditHookOption options when modify one hook -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditHookOption { - #[serde(rename = "active", skip_serializing_if = "Option::is_none")] - pub active: Option, - #[serde( - rename = "authorization_header", - skip_serializing_if = "Option::is_none" - )] - pub authorization_header: Option, - #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] - pub branch_filter: Option, - #[serde(rename = "config", skip_serializing_if = "Option::is_none")] - pub config: Option>, - #[serde(rename = "events", skip_serializing_if = "Option::is_none")] - pub events: Option>, -} - -impl EditHookOption { - /// EditHookOption options when modify one hook - pub fn new() -> EditHookOption { - EditHookOption { - active: None, - authorization_header: None, - branch_filter: None, - config: None, - events: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_issue_comment_option.rs b/forgejo-openapi/src/models/edit_issue_comment_option.rs deleted file mode 100644 index 2124e7f..0000000 --- a/forgejo-openapi/src/models/edit_issue_comment_option.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditIssueCommentOption : EditIssueCommentOption options for editing a comment -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditIssueCommentOption { - #[serde(rename = "body")] - pub body: String, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, -} - -impl EditIssueCommentOption { - /// EditIssueCommentOption options for editing a comment - pub fn new(body: String) -> EditIssueCommentOption { - EditIssueCommentOption { - body, - updated_at: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_issue_option.rs b/forgejo-openapi/src/models/edit_issue_option.rs deleted file mode 100644 index 7f339cb..0000000 --- a/forgejo-openapi/src/models/edit_issue_option.rs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditIssueOption : EditIssueOption options for editing an issue -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditIssueOption { - /// deprecated - #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] - pub assignee: Option, - #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] - pub assignees: Option>, - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] - pub due_date: Option, - #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] - pub milestone: Option, - #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] - pub r#ref: Option, - #[serde(rename = "state", skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, - #[serde(rename = "unset_due_date", skip_serializing_if = "Option::is_none")] - pub unset_due_date: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, -} - -impl EditIssueOption { - /// EditIssueOption options for editing an issue - pub fn new() -> EditIssueOption { - EditIssueOption { - assignee: None, - assignees: None, - body: None, - due_date: None, - milestone: None, - r#ref: None, - state: None, - title: None, - unset_due_date: None, - updated_at: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_label_option.rs b/forgejo-openapi/src/models/edit_label_option.rs deleted file mode 100644 index 6303749..0000000 --- a/forgejo-openapi/src/models/edit_label_option.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditLabelOption : EditLabelOption options for editing a label -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditLabelOption { - #[serde(rename = "color", skip_serializing_if = "Option::is_none")] - pub color: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "exclusive", skip_serializing_if = "Option::is_none")] - pub exclusive: Option, - #[serde(rename = "is_archived", skip_serializing_if = "Option::is_none")] - pub is_archived: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, -} - -impl EditLabelOption { - /// EditLabelOption options for editing a label - pub fn new() -> EditLabelOption { - EditLabelOption { - color: None, - description: None, - exclusive: None, - is_archived: None, - name: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_milestone_option.rs b/forgejo-openapi/src/models/edit_milestone_option.rs deleted file mode 100644 index be7c99f..0000000 --- a/forgejo-openapi/src/models/edit_milestone_option.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditMilestoneOption : EditMilestoneOption options for editing a milestone -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditMilestoneOption { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "due_on", skip_serializing_if = "Option::is_none")] - pub due_on: Option, - #[serde(rename = "state", skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, -} - -impl EditMilestoneOption { - /// EditMilestoneOption options for editing a milestone - pub fn new() -> EditMilestoneOption { - EditMilestoneOption { - description: None, - due_on: None, - state: None, - title: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_org_option.rs b/forgejo-openapi/src/models/edit_org_option.rs deleted file mode 100644 index d6cb082..0000000 --- a/forgejo-openapi/src/models/edit_org_option.rs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditOrgOption : EditOrgOption options for editing an organization -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditOrgOption { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] - pub full_name: Option, - #[serde(rename = "location", skip_serializing_if = "Option::is_none")] - pub location: Option, - #[serde( - rename = "repo_admin_change_team_access", - skip_serializing_if = "Option::is_none" - )] - pub repo_admin_change_team_access: Option, - /// possible values are `public`, `limited` or `private` - #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] - pub visibility: Option, - #[serde(rename = "website", skip_serializing_if = "Option::is_none")] - pub website: Option, -} - -impl EditOrgOption { - /// EditOrgOption options for editing an organization - pub fn new() -> EditOrgOption { - EditOrgOption { - description: None, - email: None, - full_name: None, - location: None, - repo_admin_change_team_access: None, - visibility: None, - website: None, - } - } -} -/// possible values are `public`, `limited` or `private` -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Visibility { - #[serde(rename = "public")] - Public, - #[serde(rename = "limited")] - Limited, - #[serde(rename = "private")] - Private, -} - -impl Default for Visibility { - fn default() -> Visibility { - Self::Public - } -} diff --git a/forgejo-openapi/src/models/edit_pull_request_option.rs b/forgejo-openapi/src/models/edit_pull_request_option.rs deleted file mode 100644 index cc09f76..0000000 --- a/forgejo-openapi/src/models/edit_pull_request_option.rs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditPullRequestOption : EditPullRequestOption options when modify pull request -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditPullRequestOption { - #[serde( - rename = "allow_maintainer_edit", - skip_serializing_if = "Option::is_none" - )] - pub allow_maintainer_edit: Option, - #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] - pub assignee: Option, - #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] - pub assignees: Option>, - #[serde(rename = "base", skip_serializing_if = "Option::is_none")] - pub base: Option, - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] - pub due_date: Option, - #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] - pub milestone: Option, - #[serde(rename = "state", skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, - #[serde(rename = "unset_due_date", skip_serializing_if = "Option::is_none")] - pub unset_due_date: Option, -} - -impl EditPullRequestOption { - /// EditPullRequestOption options when modify pull request - pub fn new() -> EditPullRequestOption { - EditPullRequestOption { - allow_maintainer_edit: None, - assignee: None, - assignees: None, - base: None, - body: None, - due_date: None, - labels: None, - milestone: None, - state: None, - title: None, - unset_due_date: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_quota_rule_options.rs b/forgejo-openapi/src/models/edit_quota_rule_options.rs deleted file mode 100644 index 5821961..0000000 --- a/forgejo-openapi/src/models/edit_quota_rule_options.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditQuotaRuleOptions : EditQuotaRuleOptions represents the options for editing a quota rule -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditQuotaRuleOptions { - /// The limit set by the rule - #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] - pub limit: Option, - /// The subjects affected by the rule - #[serde(rename = "subjects", skip_serializing_if = "Option::is_none")] - pub subjects: Option>, -} - -impl EditQuotaRuleOptions { - /// EditQuotaRuleOptions represents the options for editing a quota rule - pub fn new() -> EditQuotaRuleOptions { - EditQuotaRuleOptions { - limit: None, - subjects: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_reaction_option.rs b/forgejo-openapi/src/models/edit_reaction_option.rs deleted file mode 100644 index 95397a4..0000000 --- a/forgejo-openapi/src/models/edit_reaction_option.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditReactionOption : EditReactionOption contain the reaction type -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditReactionOption { - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option, -} - -impl EditReactionOption { - /// EditReactionOption contain the reaction type - pub fn new() -> EditReactionOption { - EditReactionOption { content: None } - } -} diff --git a/forgejo-openapi/src/models/edit_release_option.rs b/forgejo-openapi/src/models/edit_release_option.rs deleted file mode 100644 index df0bdfc..0000000 --- a/forgejo-openapi/src/models/edit_release_option.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditReleaseOption : EditReleaseOption options when editing a release -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditReleaseOption { - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "draft", skip_serializing_if = "Option::is_none")] - pub draft: Option, - #[serde(rename = "hide_archive_links", skip_serializing_if = "Option::is_none")] - pub hide_archive_links: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "prerelease", skip_serializing_if = "Option::is_none")] - pub prerelease: Option, - #[serde(rename = "tag_name", skip_serializing_if = "Option::is_none")] - pub tag_name: Option, - #[serde(rename = "target_commitish", skip_serializing_if = "Option::is_none")] - pub target_commitish: Option, -} - -impl EditReleaseOption { - /// EditReleaseOption options when editing a release - pub fn new() -> EditReleaseOption { - EditReleaseOption { - body: None, - draft: None, - hide_archive_links: None, - name: None, - prerelease: None, - tag_name: None, - target_commitish: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_repo_option.rs b/forgejo-openapi/src/models/edit_repo_option.rs deleted file mode 100644 index 5e27c3e..0000000 --- a/forgejo-openapi/src/models/edit_repo_option.rs +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditRepoOption : EditRepoOption options when editing a repository's properties -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditRepoOption { - /// either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging. - #[serde( - rename = "allow_fast_forward_only_merge", - skip_serializing_if = "Option::is_none" - )] - pub allow_fast_forward_only_merge: Option, - /// either `true` to allow mark pr as merged manually, or `false` to prevent it. - #[serde(rename = "allow_manual_merge", skip_serializing_if = "Option::is_none")] - pub allow_manual_merge: Option, - /// either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. - #[serde( - rename = "allow_merge_commits", - skip_serializing_if = "Option::is_none" - )] - pub allow_merge_commits: Option, - /// either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. - #[serde(rename = "allow_rebase", skip_serializing_if = "Option::is_none")] - pub allow_rebase: Option, - /// either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. - #[serde( - rename = "allow_rebase_explicit", - skip_serializing_if = "Option::is_none" - )] - pub allow_rebase_explicit: Option, - /// either `true` to allow updating pull request branch by rebase, or `false` to prevent it. - #[serde( - rename = "allow_rebase_update", - skip_serializing_if = "Option::is_none" - )] - pub allow_rebase_update: Option, - /// either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. - #[serde(rename = "allow_squash_merge", skip_serializing_if = "Option::is_none")] - pub allow_squash_merge: Option, - /// set to `true` to archive this repository. - #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] - pub archived: Option, - /// either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. - #[serde( - rename = "autodetect_manual_merge", - skip_serializing_if = "Option::is_none" - )] - pub autodetect_manual_merge: Option, - /// set to `true` to allow edits from maintainers by default - #[serde( - rename = "default_allow_maintainer_edit", - skip_serializing_if = "Option::is_none" - )] - pub default_allow_maintainer_edit: Option, - /// sets the default branch for this repository. - #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] - pub default_branch: Option, - /// set to `true` to delete pr branch after merge by default - #[serde( - rename = "default_delete_branch_after_merge", - skip_serializing_if = "Option::is_none" - )] - pub default_delete_branch_after_merge: Option, - /// set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", \"fast-forward-only\", \"manually-merged\", or \"rebase-update-only\". - #[serde( - rename = "default_merge_style", - skip_serializing_if = "Option::is_none" - )] - pub default_merge_style: Option, - /// set to a update style to be used by this repository: \"rebase\" or \"merge\" - #[serde( - rename = "default_update_style", - skip_serializing_if = "Option::is_none" - )] - pub default_update_style: Option, - /// a short description of the repository. - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - /// enable prune - remove obsolete remote-tracking references when mirroring - #[serde(rename = "enable_prune", skip_serializing_if = "Option::is_none")] - pub enable_prune: Option, - #[serde(rename = "external_tracker", skip_serializing_if = "Option::is_none")] - pub external_tracker: Option>, - #[serde(rename = "external_wiki", skip_serializing_if = "Option::is_none")] - pub external_wiki: Option>, - /// set the globally editable state of the wiki - #[serde( - rename = "globally_editable_wiki", - skip_serializing_if = "Option::is_none" - )] - pub globally_editable_wiki: Option, - /// either `true` to enable actions unit, or `false` to disable them. - #[serde(rename = "has_actions", skip_serializing_if = "Option::is_none")] - pub has_actions: Option, - /// either `true` to enable issues for this repository or `false` to disable them. - #[serde(rename = "has_issues", skip_serializing_if = "Option::is_none")] - pub has_issues: Option, - /// either `true` to enable packages unit, or `false` to disable them. - #[serde(rename = "has_packages", skip_serializing_if = "Option::is_none")] - pub has_packages: Option, - /// either `true` to enable project unit, or `false` to disable them. - #[serde(rename = "has_projects", skip_serializing_if = "Option::is_none")] - pub has_projects: Option, - /// either `true` to allow pull requests, or `false` to prevent pull request. - #[serde(rename = "has_pull_requests", skip_serializing_if = "Option::is_none")] - pub has_pull_requests: Option, - /// either `true` to enable releases unit, or `false` to disable them. - #[serde(rename = "has_releases", skip_serializing_if = "Option::is_none")] - pub has_releases: Option, - /// either `true` to enable the wiki for this repository or `false` to disable it. - #[serde(rename = "has_wiki", skip_serializing_if = "Option::is_none")] - pub has_wiki: Option, - /// either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. - #[serde( - rename = "ignore_whitespace_conflicts", - skip_serializing_if = "Option::is_none" - )] - pub ignore_whitespace_conflicts: Option, - #[serde(rename = "internal_tracker", skip_serializing_if = "Option::is_none")] - pub internal_tracker: Option>, - /// set to a string like `8h30m0s` to set the mirror interval time - #[serde(rename = "mirror_interval", skip_serializing_if = "Option::is_none")] - pub mirror_interval: Option, - /// name of the repository - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. - #[serde(rename = "private", skip_serializing_if = "Option::is_none")] - pub private: Option, - /// either `true` to make this repository a template or `false` to make it a normal repository - #[serde(rename = "template", skip_serializing_if = "Option::is_none")] - pub template: Option, - /// a URL with more information about the repository. - #[serde(rename = "website", skip_serializing_if = "Option::is_none")] - pub website: Option, - /// sets the branch used for this repository's wiki. - #[serde(rename = "wiki_branch", skip_serializing_if = "Option::is_none")] - pub wiki_branch: Option, -} - -impl EditRepoOption { - /// EditRepoOption options when editing a repository's properties - pub fn new() -> EditRepoOption { - EditRepoOption { - allow_fast_forward_only_merge: None, - allow_manual_merge: None, - allow_merge_commits: None, - allow_rebase: None, - allow_rebase_explicit: None, - allow_rebase_update: None, - allow_squash_merge: None, - archived: None, - autodetect_manual_merge: None, - default_allow_maintainer_edit: None, - default_branch: None, - default_delete_branch_after_merge: None, - default_merge_style: None, - default_update_style: None, - description: None, - enable_prune: None, - external_tracker: None, - external_wiki: None, - globally_editable_wiki: None, - has_actions: None, - has_issues: None, - has_packages: None, - has_projects: None, - has_pull_requests: None, - has_releases: None, - has_wiki: None, - ignore_whitespace_conflicts: None, - internal_tracker: None, - mirror_interval: None, - name: None, - private: None, - template: None, - website: None, - wiki_branch: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_tag_protection_option.rs b/forgejo-openapi/src/models/edit_tag_protection_option.rs deleted file mode 100644 index 65d7514..0000000 --- a/forgejo-openapi/src/models/edit_tag_protection_option.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditTagProtectionOption : EditTagProtectionOption options for editing a tag protection -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditTagProtectionOption { - #[serde(rename = "name_pattern", skip_serializing_if = "Option::is_none")] - pub name_pattern: Option, - #[serde(rename = "whitelist_teams", skip_serializing_if = "Option::is_none")] - pub whitelist_teams: Option>, - #[serde( - rename = "whitelist_usernames", - skip_serializing_if = "Option::is_none" - )] - pub whitelist_usernames: Option>, -} - -impl EditTagProtectionOption { - /// EditTagProtectionOption options for editing a tag protection - pub fn new() -> EditTagProtectionOption { - EditTagProtectionOption { - name_pattern: None, - whitelist_teams: None, - whitelist_usernames: None, - } - } -} diff --git a/forgejo-openapi/src/models/edit_team_option.rs b/forgejo-openapi/src/models/edit_team_option.rs deleted file mode 100644 index 5837fd0..0000000 --- a/forgejo-openapi/src/models/edit_team_option.rs +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditTeamOption : EditTeamOption options for editing a team -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditTeamOption { - #[serde( - rename = "can_create_org_repo", - skip_serializing_if = "Option::is_none" - )] - pub can_create_org_repo: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde( - rename = "includes_all_repositories", - skip_serializing_if = "Option::is_none" - )] - pub includes_all_repositories: Option, - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] - pub permission: Option, - #[serde(rename = "units", skip_serializing_if = "Option::is_none")] - pub units: Option>, - #[serde(rename = "units_map", skip_serializing_if = "Option::is_none")] - pub units_map: Option>, -} - -impl EditTeamOption { - /// EditTeamOption options for editing a team - pub fn new(name: String) -> EditTeamOption { - EditTeamOption { - can_create_org_repo: None, - description: None, - includes_all_repositories: None, - name, - permission: None, - units: None, - units_map: None, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Permission { - #[serde(rename = "read")] - Read, - #[serde(rename = "write")] - Write, - #[serde(rename = "admin")] - Admin, -} - -impl Default for Permission { - fn default() -> Permission { - Self::Read - } -} diff --git a/forgejo-openapi/src/models/edit_user_option.rs b/forgejo-openapi/src/models/edit_user_option.rs deleted file mode 100644 index ec188ec..0000000 --- a/forgejo-openapi/src/models/edit_user_option.rs +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// EditUserOption : EditUserOption edit user options -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EditUserOption { - #[serde(rename = "active", skip_serializing_if = "Option::is_none")] - pub active: Option, - #[serde(rename = "admin", skip_serializing_if = "Option::is_none")] - pub admin: Option, - #[serde( - rename = "allow_create_organization", - skip_serializing_if = "Option::is_none" - )] - pub allow_create_organization: Option, - #[serde(rename = "allow_git_hook", skip_serializing_if = "Option::is_none")] - pub allow_git_hook: Option, - #[serde(rename = "allow_import_local", skip_serializing_if = "Option::is_none")] - pub allow_import_local: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] - pub full_name: Option, - #[serde(rename = "hide_email", skip_serializing_if = "Option::is_none")] - pub hide_email: Option, - #[serde(rename = "location", skip_serializing_if = "Option::is_none")] - pub location: Option, - #[serde(rename = "login_name", skip_serializing_if = "Option::is_none")] - pub login_name: Option, - #[serde(rename = "max_repo_creation", skip_serializing_if = "Option::is_none")] - pub max_repo_creation: Option, - #[serde( - rename = "must_change_password", - skip_serializing_if = "Option::is_none" - )] - pub must_change_password: Option, - #[serde(rename = "password", skip_serializing_if = "Option::is_none")] - pub password: Option, - #[serde(rename = "prohibit_login", skip_serializing_if = "Option::is_none")] - pub prohibit_login: Option, - #[serde(rename = "pronouns", skip_serializing_if = "Option::is_none")] - pub pronouns: Option, - #[serde(rename = "restricted", skip_serializing_if = "Option::is_none")] - pub restricted: Option, - #[serde(rename = "source_id", skip_serializing_if = "Option::is_none")] - pub source_id: Option, - #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] - pub visibility: Option, - #[serde(rename = "website", skip_serializing_if = "Option::is_none")] - pub website: Option, -} - -impl EditUserOption { - /// EditUserOption edit user options - pub fn new() -> EditUserOption { - EditUserOption { - active: None, - admin: None, - allow_create_organization: None, - allow_git_hook: None, - allow_import_local: None, - description: None, - email: None, - full_name: None, - hide_email: None, - location: None, - login_name: None, - max_repo_creation: None, - must_change_password: None, - password: None, - prohibit_login: None, - pronouns: None, - restricted: None, - source_id: None, - visibility: None, - website: None, - } - } -} diff --git a/forgejo-openapi/src/models/email.rs b/forgejo-openapi/src/models/email.rs deleted file mode 100644 index bd05e34..0000000 --- a/forgejo-openapi/src/models/email.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Email : Email an email address belonging to a user -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Email { - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(rename = "primary", skip_serializing_if = "Option::is_none")] - pub primary: Option, - #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")] - pub user_id: Option, - #[serde(rename = "username", skip_serializing_if = "Option::is_none")] - pub username: Option, - #[serde(rename = "verified", skip_serializing_if = "Option::is_none")] - pub verified: Option, -} - -impl Email { - /// Email an email address belonging to a user - pub fn new() -> Email { - Email { - email: None, - primary: None, - user_id: None, - username: None, - verified: None, - } - } -} diff --git a/forgejo-openapi/src/models/external_tracker.rs b/forgejo-openapi/src/models/external_tracker.rs deleted file mode 100644 index 54f1b3b..0000000 --- a/forgejo-openapi/src/models/external_tracker.rs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ExternalTracker : ExternalTracker represents settings for external tracker -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ExternalTracker { - /// External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. - #[serde( - rename = "external_tracker_format", - skip_serializing_if = "Option::is_none" - )] - pub external_tracker_format: Option, - /// External Issue Tracker issue regular expression - #[serde( - rename = "external_tracker_regexp_pattern", - skip_serializing_if = "Option::is_none" - )] - pub external_tracker_regexp_pattern: Option, - /// External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` - #[serde( - rename = "external_tracker_style", - skip_serializing_if = "Option::is_none" - )] - pub external_tracker_style: Option, - /// URL of external issue tracker. - #[serde( - rename = "external_tracker_url", - skip_serializing_if = "Option::is_none" - )] - pub external_tracker_url: Option, -} - -impl ExternalTracker { - /// ExternalTracker represents settings for external tracker - pub fn new() -> ExternalTracker { - ExternalTracker { - external_tracker_format: None, - external_tracker_regexp_pattern: None, - external_tracker_style: None, - external_tracker_url: None, - } - } -} diff --git a/forgejo-openapi/src/models/external_wiki.rs b/forgejo-openapi/src/models/external_wiki.rs deleted file mode 100644 index 9787e33..0000000 --- a/forgejo-openapi/src/models/external_wiki.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ExternalWiki : ExternalWiki represents setting for external wiki -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ExternalWiki { - /// URL of external wiki. - #[serde(rename = "external_wiki_url", skip_serializing_if = "Option::is_none")] - pub external_wiki_url: Option, -} - -impl ExternalWiki { - /// ExternalWiki represents setting for external wiki - pub fn new() -> ExternalWiki { - ExternalWiki { - external_wiki_url: None, - } - } -} diff --git a/forgejo-openapi/src/models/file_commit_response.rs b/forgejo-openapi/src/models/file_commit_response.rs deleted file mode 100644 index 2260b02..0000000 --- a/forgejo-openapi/src/models/file_commit_response.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct FileCommitResponse { - #[serde(rename = "author", skip_serializing_if = "Option::is_none")] - pub author: Option>, - #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] - pub committer: Option>, - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "parents", skip_serializing_if = "Option::is_none")] - pub parents: Option>, - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, - #[serde(rename = "tree", skip_serializing_if = "Option::is_none")] - pub tree: Option>, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl FileCommitResponse { - pub fn new() -> FileCommitResponse { - FileCommitResponse { - author: None, - committer: None, - created: None, - html_url: None, - message: None, - parents: None, - sha: None, - tree: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/file_delete_response.rs b/forgejo-openapi/src/models/file_delete_response.rs deleted file mode 100644 index 40d093d..0000000 --- a/forgejo-openapi/src/models/file_delete_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// FileDeleteResponse : FileDeleteResponse contains information about a repo's file that was deleted -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct FileDeleteResponse { - #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] - pub commit: Option>, - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, -} - -impl FileDeleteResponse { - /// FileDeleteResponse contains information about a repo's file that was deleted - pub fn new() -> FileDeleteResponse { - FileDeleteResponse { - commit: None, - content: None, - verification: None, - } - } -} diff --git a/forgejo-openapi/src/models/file_links_response.rs b/forgejo-openapi/src/models/file_links_response.rs deleted file mode 100644 index 421d0c9..0000000 --- a/forgejo-openapi/src/models/file_links_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// FileLinksResponse : FileLinksResponse contains the links for a repo's file -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct FileLinksResponse { - #[serde(rename = "git", skip_serializing_if = "Option::is_none")] - pub git: Option, - #[serde(rename = "html", skip_serializing_if = "Option::is_none")] - pub html: Option, - #[serde(rename = "self", skip_serializing_if = "Option::is_none")] - pub param_self: Option, -} - -impl FileLinksResponse { - /// FileLinksResponse contains the links for a repo's file - pub fn new() -> FileLinksResponse { - FileLinksResponse { - git: None, - html: None, - param_self: None, - } - } -} diff --git a/forgejo-openapi/src/models/file_response.rs b/forgejo-openapi/src/models/file_response.rs deleted file mode 100644 index e883d28..0000000 --- a/forgejo-openapi/src/models/file_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// FileResponse : FileResponse contains information about a repo's file -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct FileResponse { - #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] - pub commit: Option>, - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option>, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, -} - -impl FileResponse { - /// FileResponse contains information about a repo's file - pub fn new() -> FileResponse { - FileResponse { - commit: None, - content: None, - verification: None, - } - } -} diff --git a/forgejo-openapi/src/models/files_response.rs b/forgejo-openapi/src/models/files_response.rs deleted file mode 100644 index 0d656c8..0000000 --- a/forgejo-openapi/src/models/files_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// FilesResponse : FilesResponse contains information about multiple files from a repo -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct FilesResponse { - #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] - pub commit: Option>, - #[serde(rename = "files", skip_serializing_if = "Option::is_none")] - pub files: Option>, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, -} - -impl FilesResponse { - /// FilesResponse contains information about multiple files from a repo - pub fn new() -> FilesResponse { - FilesResponse { - commit: None, - files: None, - verification: None, - } - } -} diff --git a/forgejo-openapi/src/models/general_api_settings.rs b/forgejo-openapi/src/models/general_api_settings.rs deleted file mode 100644 index b5853e2..0000000 --- a/forgejo-openapi/src/models/general_api_settings.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GeneralApiSettings : GeneralAPISettings contains global api settings exposed by it -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GeneralApiSettings { - #[serde( - rename = "default_git_trees_per_page", - skip_serializing_if = "Option::is_none" - )] - pub default_git_trees_per_page: Option, - #[serde( - rename = "default_max_blob_size", - skip_serializing_if = "Option::is_none" - )] - pub default_max_blob_size: Option, - #[serde(rename = "default_paging_num", skip_serializing_if = "Option::is_none")] - pub default_paging_num: Option, - #[serde(rename = "max_response_items", skip_serializing_if = "Option::is_none")] - pub max_response_items: Option, -} - -impl GeneralApiSettings { - /// GeneralAPISettings contains global api settings exposed by it - pub fn new() -> GeneralApiSettings { - GeneralApiSettings { - default_git_trees_per_page: None, - default_max_blob_size: None, - default_paging_num: None, - max_response_items: None, - } - } -} diff --git a/forgejo-openapi/src/models/general_attachment_settings.rs b/forgejo-openapi/src/models/general_attachment_settings.rs deleted file mode 100644 index 535a680..0000000 --- a/forgejo-openapi/src/models/general_attachment_settings.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GeneralAttachmentSettings : GeneralAttachmentSettings contains global Attachment settings exposed by API -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GeneralAttachmentSettings { - #[serde(rename = "allowed_types", skip_serializing_if = "Option::is_none")] - pub allowed_types: Option, - #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")] - pub enabled: Option, - #[serde(rename = "max_files", skip_serializing_if = "Option::is_none")] - pub max_files: Option, - #[serde(rename = "max_size", skip_serializing_if = "Option::is_none")] - pub max_size: Option, -} - -impl GeneralAttachmentSettings { - /// GeneralAttachmentSettings contains global Attachment settings exposed by API - pub fn new() -> GeneralAttachmentSettings { - GeneralAttachmentSettings { - allowed_types: None, - enabled: None, - max_files: None, - max_size: None, - } - } -} diff --git a/forgejo-openapi/src/models/general_repo_settings.rs b/forgejo-openapi/src/models/general_repo_settings.rs deleted file mode 100644 index ab5b6e9..0000000 --- a/forgejo-openapi/src/models/general_repo_settings.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GeneralRepoSettings : GeneralRepoSettings contains global repository settings exposed by API -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GeneralRepoSettings { - #[serde(rename = "forks_disabled", skip_serializing_if = "Option::is_none")] - pub forks_disabled: Option, - #[serde(rename = "http_git_disabled", skip_serializing_if = "Option::is_none")] - pub http_git_disabled: Option, - #[serde(rename = "lfs_disabled", skip_serializing_if = "Option::is_none")] - pub lfs_disabled: Option, - #[serde( - rename = "migrations_disabled", - skip_serializing_if = "Option::is_none" - )] - pub migrations_disabled: Option, - #[serde(rename = "mirrors_disabled", skip_serializing_if = "Option::is_none")] - pub mirrors_disabled: Option, - #[serde(rename = "stars_disabled", skip_serializing_if = "Option::is_none")] - pub stars_disabled: Option, - #[serde( - rename = "time_tracking_disabled", - skip_serializing_if = "Option::is_none" - )] - pub time_tracking_disabled: Option, -} - -impl GeneralRepoSettings { - /// GeneralRepoSettings contains global repository settings exposed by API - pub fn new() -> GeneralRepoSettings { - GeneralRepoSettings { - forks_disabled: None, - http_git_disabled: None, - lfs_disabled: None, - migrations_disabled: None, - mirrors_disabled: None, - stars_disabled: None, - time_tracking_disabled: None, - } - } -} diff --git a/forgejo-openapi/src/models/general_ui_settings.rs b/forgejo-openapi/src/models/general_ui_settings.rs deleted file mode 100644 index e57a9af..0000000 --- a/forgejo-openapi/src/models/general_ui_settings.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GeneralUiSettings : GeneralUISettings contains global ui settings exposed by API -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GeneralUiSettings { - #[serde(rename = "allowed_reactions", skip_serializing_if = "Option::is_none")] - pub allowed_reactions: Option>, - #[serde(rename = "custom_emojis", skip_serializing_if = "Option::is_none")] - pub custom_emojis: Option>, - #[serde(rename = "default_theme", skip_serializing_if = "Option::is_none")] - pub default_theme: Option, -} - -impl GeneralUiSettings { - /// GeneralUISettings contains global ui settings exposed by API - pub fn new() -> GeneralUiSettings { - GeneralUiSettings { - allowed_reactions: None, - custom_emojis: None, - default_theme: None, - } - } -} diff --git a/forgejo-openapi/src/models/generate_repo_option.rs b/forgejo-openapi/src/models/generate_repo_option.rs deleted file mode 100644 index ffdbbe2..0000000 --- a/forgejo-openapi/src/models/generate_repo_option.rs +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GenerateRepoOption : GenerateRepoOption options when creating repository using a template -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GenerateRepoOption { - /// include avatar of the template repo - #[serde(rename = "avatar", skip_serializing_if = "Option::is_none")] - pub avatar: Option, - /// Default branch of the new repository - #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] - pub default_branch: Option, - /// Description of the repository to create - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - /// include git content of default branch in template repo - #[serde(rename = "git_content", skip_serializing_if = "Option::is_none")] - pub git_content: Option, - /// include git hooks in template repo - #[serde(rename = "git_hooks", skip_serializing_if = "Option::is_none")] - pub git_hooks: Option, - /// include labels in template repo - #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] - pub labels: Option, - /// Name of the repository to create - #[serde(rename = "name")] - pub name: String, - /// The organization or person who will own the new repository - #[serde(rename = "owner")] - pub owner: String, - /// Whether the repository is private - #[serde(rename = "private", skip_serializing_if = "Option::is_none")] - pub private: Option, - /// include protected branches in template repo - #[serde(rename = "protected_branch", skip_serializing_if = "Option::is_none")] - pub protected_branch: Option, - /// include topics in template repo - #[serde(rename = "topics", skip_serializing_if = "Option::is_none")] - pub topics: Option, - /// include webhooks in template repo - #[serde(rename = "webhooks", skip_serializing_if = "Option::is_none")] - pub webhooks: Option, -} - -impl GenerateRepoOption { - /// GenerateRepoOption options when creating repository using a template - pub fn new(name: String, owner: String) -> GenerateRepoOption { - GenerateRepoOption { - avatar: None, - default_branch: None, - description: None, - git_content: None, - git_hooks: None, - labels: None, - name, - owner, - private: None, - protected_branch: None, - topics: None, - webhooks: None, - } - } -} diff --git a/forgejo-openapi/src/models/git_blob.rs b/forgejo-openapi/src/models/git_blob.rs deleted file mode 100644 index 9191682..0000000 --- a/forgejo-openapi/src/models/git_blob.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GitBlob : GitBlob represents a git blob -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GitBlob { - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option, - #[serde(rename = "encoding", skip_serializing_if = "Option::is_none")] - pub encoding: Option, - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl GitBlob { - /// GitBlob represents a git blob - pub fn new() -> GitBlob { - GitBlob { - content: None, - encoding: None, - sha: None, - size: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/git_entry.rs b/forgejo-openapi/src/models/git_entry.rs deleted file mode 100644 index fd2519e..0000000 --- a/forgejo-openapi/src/models/git_entry.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GitEntry : GitEntry represents a git tree -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GitEntry { - #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] - pub mode: Option, - #[serde(rename = "path", skip_serializing_if = "Option::is_none")] - pub path: Option, - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl GitEntry { - /// GitEntry represents a git tree - pub fn new() -> GitEntry { - GitEntry { - mode: None, - path: None, - sha: None, - size: None, - r#type: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/git_hook.rs b/forgejo-openapi/src/models/git_hook.rs deleted file mode 100644 index 0b3d4dd..0000000 --- a/forgejo-openapi/src/models/git_hook.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GitHook : GitHook represents a Git repository hook -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GitHook { - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option, - #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")] - pub is_active: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, -} - -impl GitHook { - /// GitHook represents a Git repository hook - pub fn new() -> GitHook { - GitHook { - content: None, - is_active: None, - name: None, - } - } -} diff --git a/forgejo-openapi/src/models/git_object.rs b/forgejo-openapi/src/models/git_object.rs deleted file mode 100644 index 35c01b5..0000000 --- a/forgejo-openapi/src/models/git_object.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GitObject { - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl GitObject { - pub fn new() -> GitObject { - GitObject { - sha: None, - r#type: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/git_tree_response.rs b/forgejo-openapi/src/models/git_tree_response.rs deleted file mode 100644 index b36685e..0000000 --- a/forgejo-openapi/src/models/git_tree_response.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GitTreeResponse : GitTreeResponse returns a git tree -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GitTreeResponse { - #[serde(rename = "page", skip_serializing_if = "Option::is_none")] - pub page: Option, - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, - #[serde(rename = "total_count", skip_serializing_if = "Option::is_none")] - pub total_count: Option, - #[serde(rename = "tree", skip_serializing_if = "Option::is_none")] - pub tree: Option>, - #[serde(rename = "truncated", skip_serializing_if = "Option::is_none")] - pub truncated: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl GitTreeResponse { - /// GitTreeResponse returns a git tree - pub fn new() -> GitTreeResponse { - GitTreeResponse { - page: None, - sha: None, - total_count: None, - tree: None, - truncated: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/gitignore_template_info.rs b/forgejo-openapi/src/models/gitignore_template_info.rs deleted file mode 100644 index c823d45..0000000 --- a/forgejo-openapi/src/models/gitignore_template_info.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GitignoreTemplateInfo : GitignoreTemplateInfo name and text of a gitignore template -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GitignoreTemplateInfo { - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "source", skip_serializing_if = "Option::is_none")] - pub source: Option, -} - -impl GitignoreTemplateInfo { - /// GitignoreTemplateInfo name and text of a gitignore template - pub fn new() -> GitignoreTemplateInfo { - GitignoreTemplateInfo { - name: None, - source: None, - } - } -} diff --git a/forgejo-openapi/src/models/gpg_key.rs b/forgejo-openapi/src/models/gpg_key.rs deleted file mode 100644 index 9909b0b..0000000 --- a/forgejo-openapi/src/models/gpg_key.rs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GpgKey : GPGKey a user GPG key to sign commit and tag in repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GpgKey { - #[serde(rename = "can_certify", skip_serializing_if = "Option::is_none")] - pub can_certify: Option, - #[serde(rename = "can_encrypt_comms", skip_serializing_if = "Option::is_none")] - pub can_encrypt_comms: Option, - #[serde( - rename = "can_encrypt_storage", - skip_serializing_if = "Option::is_none" - )] - pub can_encrypt_storage: Option, - #[serde(rename = "can_sign", skip_serializing_if = "Option::is_none")] - pub can_sign: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "emails", skip_serializing_if = "Option::is_none")] - pub emails: Option>, - #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")] - pub expires_at: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "key_id", skip_serializing_if = "Option::is_none")] - pub key_id: Option, - #[serde(rename = "primary_key_id", skip_serializing_if = "Option::is_none")] - pub primary_key_id: Option, - #[serde(rename = "public_key", skip_serializing_if = "Option::is_none")] - pub public_key: Option, - #[serde(rename = "subkeys", skip_serializing_if = "Option::is_none")] - pub subkeys: Option>, - #[serde(rename = "verified", skip_serializing_if = "Option::is_none")] - pub verified: Option, -} - -impl GpgKey { - /// GPGKey a user GPG key to sign commit and tag in repository - pub fn new() -> GpgKey { - GpgKey { - can_certify: None, - can_encrypt_comms: None, - can_encrypt_storage: None, - can_sign: None, - created_at: None, - emails: None, - expires_at: None, - id: None, - key_id: None, - primary_key_id: None, - public_key: None, - subkeys: None, - verified: None, - } - } -} diff --git a/forgejo-openapi/src/models/gpg_key_email.rs b/forgejo-openapi/src/models/gpg_key_email.rs deleted file mode 100644 index 4f1ddf1..0000000 --- a/forgejo-openapi/src/models/gpg_key_email.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// GpgKeyEmail : GPGKeyEmail an email attached to a GPGKey -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GpgKeyEmail { - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(rename = "verified", skip_serializing_if = "Option::is_none")] - pub verified: Option, -} - -impl GpgKeyEmail { - /// GPGKeyEmail an email attached to a GPGKey - pub fn new() -> GpgKeyEmail { - GpgKeyEmail { - email: None, - verified: None, - } - } -} diff --git a/forgejo-openapi/src/models/hook.rs b/forgejo-openapi/src/models/hook.rs deleted file mode 100644 index 0484cb4..0000000 --- a/forgejo-openapi/src/models/hook.rs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Hook : Hook a hook is a web hook when one repository changed -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Hook { - #[serde(rename = "active", skip_serializing_if = "Option::is_none")] - pub active: Option, - #[serde( - rename = "authorization_header", - skip_serializing_if = "Option::is_none" - )] - pub authorization_header: Option, - #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] - pub branch_filter: Option, - /// Deprecated: use Metadata instead - #[serde(rename = "config", skip_serializing_if = "Option::is_none")] - pub config: Option>, - #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] - pub content_type: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "events", skip_serializing_if = "Option::is_none")] - pub events: Option>, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl Hook { - /// Hook a hook is a web hook when one repository changed - pub fn new() -> Hook { - Hook { - active: None, - authorization_header: None, - branch_filter: None, - config: None, - content_type: None, - created_at: None, - events: None, - id: None, - metadata: None, - r#type: None, - updated_at: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/identity.rs b/forgejo-openapi/src/models/identity.rs deleted file mode 100644 index 8566c72..0000000 --- a/forgejo-openapi/src/models/identity.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Identity : Identity for a person's identity like an author or committer -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Identity { - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, -} - -impl Identity { - /// Identity for a person's identity like an author or committer - pub fn new() -> Identity { - Identity { - email: None, - name: None, - } - } -} diff --git a/forgejo-openapi/src/models/internal_tracker.rs b/forgejo-openapi/src/models/internal_tracker.rs deleted file mode 100644 index f17c315..0000000 --- a/forgejo-openapi/src/models/internal_tracker.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// InternalTracker : InternalTracker represents settings for internal tracker -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct InternalTracker { - /// Let only contributors track time (Built-in issue tracker) - #[serde( - rename = "allow_only_contributors_to_track_time", - skip_serializing_if = "Option::is_none" - )] - pub allow_only_contributors_to_track_time: Option, - /// Enable dependencies for issues and pull requests (Built-in issue tracker) - #[serde( - rename = "enable_issue_dependencies", - skip_serializing_if = "Option::is_none" - )] - pub enable_issue_dependencies: Option, - /// Enable time tracking (Built-in issue tracker) - #[serde( - rename = "enable_time_tracker", - skip_serializing_if = "Option::is_none" - )] - pub enable_time_tracker: Option, -} - -impl InternalTracker { - /// InternalTracker represents settings for internal tracker - pub fn new() -> InternalTracker { - InternalTracker { - allow_only_contributors_to_track_time: None, - enable_issue_dependencies: None, - enable_time_tracker: None, - } - } -} diff --git a/forgejo-openapi/src/models/issue.rs b/forgejo-openapi/src/models/issue.rs deleted file mode 100644 index 0984ccc..0000000 --- a/forgejo-openapi/src/models/issue.rs +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Issue : Issue represents an issue in a repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Issue { - #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] - pub assets: Option>, - #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] - pub assignee: Option>, - #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] - pub assignees: Option>, - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "closed_at", skip_serializing_if = "Option::is_none")] - pub closed_at: Option, - #[serde(rename = "comments", skip_serializing_if = "Option::is_none")] - pub comments: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] - pub due_date: Option, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "is_locked", skip_serializing_if = "Option::is_none")] - pub is_locked: Option, - #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] - pub milestone: Option>, - #[serde(rename = "number", skip_serializing_if = "Option::is_none")] - pub number: Option, - #[serde(rename = "original_author", skip_serializing_if = "Option::is_none")] - pub original_author: Option, - #[serde(rename = "original_author_id", skip_serializing_if = "Option::is_none")] - pub original_author_id: Option, - #[serde(rename = "pin_order", skip_serializing_if = "Option::is_none")] - pub pin_order: Option, - #[serde(rename = "pull_request", skip_serializing_if = "Option::is_none")] - pub pull_request: Option>, - #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] - pub r#ref: Option, - #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] - pub repository: Option>, - /// StateType issue state type - #[serde(rename = "state", skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, - #[serde(rename = "user", skip_serializing_if = "Option::is_none")] - pub user: Option>, -} - -impl Issue { - /// Issue represents an issue in a repository - pub fn new() -> Issue { - Issue { - assets: None, - assignee: None, - assignees: None, - body: None, - closed_at: None, - comments: None, - created_at: None, - due_date: None, - html_url: None, - id: None, - is_locked: None, - labels: None, - milestone: None, - number: None, - original_author: None, - original_author_id: None, - pin_order: None, - pull_request: None, - r#ref: None, - repository: None, - state: None, - title: None, - updated_at: None, - url: None, - user: None, - } - } -} diff --git a/forgejo-openapi/src/models/issue_config.rs b/forgejo-openapi/src/models/issue_config.rs deleted file mode 100644 index 467cbdf..0000000 --- a/forgejo-openapi/src/models/issue_config.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct IssueConfig { - #[serde( - rename = "blank_issues_enabled", - skip_serializing_if = "Option::is_none" - )] - pub blank_issues_enabled: Option, - #[serde(rename = "contact_links", skip_serializing_if = "Option::is_none")] - pub contact_links: Option>, -} - -impl IssueConfig { - pub fn new() -> IssueConfig { - IssueConfig { - blank_issues_enabled: None, - contact_links: None, - } - } -} diff --git a/forgejo-openapi/src/models/issue_config_contact_link.rs b/forgejo-openapi/src/models/issue_config_contact_link.rs deleted file mode 100644 index f591d50..0000000 --- a/forgejo-openapi/src/models/issue_config_contact_link.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct IssueConfigContactLink { - #[serde(rename = "about", skip_serializing_if = "Option::is_none")] - pub about: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl IssueConfigContactLink { - pub fn new() -> IssueConfigContactLink { - IssueConfigContactLink { - about: None, - name: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/issue_config_validation.rs b/forgejo-openapi/src/models/issue_config_validation.rs deleted file mode 100644 index 04cf3bc..0000000 --- a/forgejo-openapi/src/models/issue_config_validation.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct IssueConfigValidation { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "valid", skip_serializing_if = "Option::is_none")] - pub valid: Option, -} - -impl IssueConfigValidation { - pub fn new() -> IssueConfigValidation { - IssueConfigValidation { - message: None, - valid: None, - } - } -} diff --git a/forgejo-openapi/src/models/issue_deadline.rs b/forgejo-openapi/src/models/issue_deadline.rs deleted file mode 100644 index 83e48f3..0000000 --- a/forgejo-openapi/src/models/issue_deadline.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// IssueDeadline : IssueDeadline represents an issue deadline -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct IssueDeadline { - #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] - pub due_date: Option, -} - -impl IssueDeadline { - /// IssueDeadline represents an issue deadline - pub fn new() -> IssueDeadline { - IssueDeadline { due_date: None } - } -} diff --git a/forgejo-openapi/src/models/issue_form_field.rs b/forgejo-openapi/src/models/issue_form_field.rs deleted file mode 100644 index 0d8689f..0000000 --- a/forgejo-openapi/src/models/issue_form_field.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// IssueFormField : IssueFormField represents a form field -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct IssueFormField { - #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")] - pub attributes: Option>, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "validations", skip_serializing_if = "Option::is_none")] - pub validations: Option>, - #[serde(rename = "visible", skip_serializing_if = "Option::is_none")] - pub visible: Option>, -} - -impl IssueFormField { - /// IssueFormField represents a form field - pub fn new() -> IssueFormField { - IssueFormField { - attributes: None, - id: None, - r#type: None, - validations: None, - visible: None, - } - } -} diff --git a/forgejo-openapi/src/models/issue_labels_option.rs b/forgejo-openapi/src/models/issue_labels_option.rs deleted file mode 100644 index d5d9258..0000000 --- a/forgejo-openapi/src/models/issue_labels_option.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// IssueLabelsOption : IssueLabelsOption a collection of labels -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct IssueLabelsOption { - /// Labels can be a list of integers representing label IDs or a list of strings representing label names - #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, -} - -impl IssueLabelsOption { - /// IssueLabelsOption a collection of labels - pub fn new() -> IssueLabelsOption { - IssueLabelsOption { - labels: None, - updated_at: None, - } - } -} diff --git a/forgejo-openapi/src/models/issue_meta.rs b/forgejo-openapi/src/models/issue_meta.rs deleted file mode 100644 index f555cc0..0000000 --- a/forgejo-openapi/src/models/issue_meta.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// IssueMeta : IssueMeta basic issue information -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct IssueMeta { - #[serde(rename = "index", skip_serializing_if = "Option::is_none")] - pub index: Option, - #[serde(rename = "owner", skip_serializing_if = "Option::is_none")] - pub owner: Option, - #[serde(rename = "repo", skip_serializing_if = "Option::is_none")] - pub repo: Option, -} - -impl IssueMeta { - /// IssueMeta basic issue information - pub fn new() -> IssueMeta { - IssueMeta { - index: None, - owner: None, - repo: None, - } - } -} diff --git a/forgejo-openapi/src/models/issue_template.rs b/forgejo-openapi/src/models/issue_template.rs deleted file mode 100644 index 47b568d..0000000 --- a/forgejo-openapi/src/models/issue_template.rs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// IssueTemplate : IssueTemplate represents an issue template for a repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct IssueTemplate { - #[serde(rename = "about", skip_serializing_if = "Option::is_none")] - pub about: Option, - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option>, - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option, - #[serde(rename = "file_name", skip_serializing_if = "Option::is_none")] - pub file_name: Option, - #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] - pub r#ref: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, -} - -impl IssueTemplate { - /// IssueTemplate represents an issue template for a repository - pub fn new() -> IssueTemplate { - IssueTemplate { - about: None, - body: None, - content: None, - file_name: None, - labels: None, - name: None, - r#ref: None, - title: None, - } - } -} diff --git a/forgejo-openapi/src/models/label.rs b/forgejo-openapi/src/models/label.rs deleted file mode 100644 index e79e850..0000000 --- a/forgejo-openapi/src/models/label.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Label : Label a label to an issue or a pr -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Label { - #[serde(rename = "color", skip_serializing_if = "Option::is_none")] - pub color: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "exclusive", skip_serializing_if = "Option::is_none")] - pub exclusive: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "is_archived", skip_serializing_if = "Option::is_none")] - pub is_archived: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl Label { - /// Label a label to an issue or a pr - pub fn new() -> Label { - Label { - color: None, - description: None, - exclusive: None, - id: None, - is_archived: None, - name: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/label_template.rs b/forgejo-openapi/src/models/label_template.rs deleted file mode 100644 index 90d8b63..0000000 --- a/forgejo-openapi/src/models/label_template.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// LabelTemplate : LabelTemplate info of a Label template -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct LabelTemplate { - #[serde(rename = "color", skip_serializing_if = "Option::is_none")] - pub color: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "exclusive", skip_serializing_if = "Option::is_none")] - pub exclusive: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, -} - -impl LabelTemplate { - /// LabelTemplate info of a Label template - pub fn new() -> LabelTemplate { - LabelTemplate { - color: None, - description: None, - exclusive: None, - name: None, - } - } -} diff --git a/forgejo-openapi/src/models/license_template_info.rs b/forgejo-openapi/src/models/license_template_info.rs deleted file mode 100644 index c0286aa..0000000 --- a/forgejo-openapi/src/models/license_template_info.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// LicenseTemplateInfo : LicensesInfo contains information about a License -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct LicenseTemplateInfo { - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "implementation", skip_serializing_if = "Option::is_none")] - pub implementation: Option, - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl LicenseTemplateInfo { - /// LicensesInfo contains information about a License - pub fn new() -> LicenseTemplateInfo { - LicenseTemplateInfo { - body: None, - implementation: None, - key: None, - name: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/licenses_template_list_entry.rs b/forgejo-openapi/src/models/licenses_template_list_entry.rs deleted file mode 100644 index f23100e..0000000 --- a/forgejo-openapi/src/models/licenses_template_list_entry.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// LicensesTemplateListEntry : LicensesListEntry is used for the API -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct LicensesTemplateListEntry { - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl LicensesTemplateListEntry { - /// LicensesListEntry is used for the API - pub fn new() -> LicensesTemplateListEntry { - LicensesTemplateListEntry { - key: None, - name: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/list_action_run_response.rs b/forgejo-openapi/src/models/list_action_run_response.rs deleted file mode 100644 index 5e1303a..0000000 --- a/forgejo-openapi/src/models/list_action_run_response.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ListActionRunResponse : ListActionRunResponse return a list of ActionRun -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListActionRunResponse { - #[serde(rename = "total_count", skip_serializing_if = "Option::is_none")] - pub total_count: Option, - #[serde(rename = "workflow_runs", skip_serializing_if = "Option::is_none")] - pub workflow_runs: Option>, -} - -impl ListActionRunResponse { - /// ListActionRunResponse return a list of ActionRun - pub fn new() -> ListActionRunResponse { - ListActionRunResponse { - total_count: None, - workflow_runs: None, - } - } -} diff --git a/forgejo-openapi/src/models/markdown_option.rs b/forgejo-openapi/src/models/markdown_option.rs deleted file mode 100644 index 9528590..0000000 --- a/forgejo-openapi/src/models/markdown_option.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// MarkdownOption : MarkdownOption markdown options -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MarkdownOption { - /// Context to render in: body - #[serde(rename = "Context", skip_serializing_if = "Option::is_none")] - pub context: Option, - /// Mode to render (comment, gfm, markdown) in: body - #[serde(rename = "Mode", skip_serializing_if = "Option::is_none")] - pub mode: Option, - /// Text markdown to render in: body - #[serde(rename = "Text", skip_serializing_if = "Option::is_none")] - pub text: Option, - /// Is it a wiki page ? in: body - #[serde(rename = "Wiki", skip_serializing_if = "Option::is_none")] - pub wiki: Option, -} - -impl MarkdownOption { - /// MarkdownOption markdown options - pub fn new() -> MarkdownOption { - MarkdownOption { - context: None, - mode: None, - text: None, - wiki: None, - } - } -} diff --git a/forgejo-openapi/src/models/markup_option.rs b/forgejo-openapi/src/models/markup_option.rs deleted file mode 100644 index d8d0ee5..0000000 --- a/forgejo-openapi/src/models/markup_option.rs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// MarkupOption : MarkupOption markup options -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MarkupOption { - /// The current branch path where the form gets posted in: body - #[serde(rename = "BranchPath", skip_serializing_if = "Option::is_none")] - pub branch_path: Option, - /// Context to render in: body - #[serde(rename = "Context", skip_serializing_if = "Option::is_none")] - pub context: Option, - /// File path for detecting extension in file mode in: body - #[serde(rename = "FilePath", skip_serializing_if = "Option::is_none")] - pub file_path: Option, - /// Mode to render (comment, gfm, markdown, file) in: body - #[serde(rename = "Mode", skip_serializing_if = "Option::is_none")] - pub mode: Option, - /// Text markup to render in: body - #[serde(rename = "Text", skip_serializing_if = "Option::is_none")] - pub text: Option, - /// Is it a wiki page ? in: body - #[serde(rename = "Wiki", skip_serializing_if = "Option::is_none")] - pub wiki: Option, -} - -impl MarkupOption { - /// MarkupOption markup options - pub fn new() -> MarkupOption { - MarkupOption { - branch_path: None, - context: None, - file_path: None, - mode: None, - text: None, - wiki: None, - } - } -} diff --git a/forgejo-openapi/src/models/merge_pull_request_option.rs b/forgejo-openapi/src/models/merge_pull_request_option.rs deleted file mode 100644 index cd03ca2..0000000 --- a/forgejo-openapi/src/models/merge_pull_request_option.rs +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// MergePullRequestOption : MergePullRequestForm form for merging Pull Request -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MergePullRequestOption { - #[serde(rename = "Do")] - pub r#do: Do, - #[serde(rename = "MergeCommitID", skip_serializing_if = "Option::is_none")] - pub merge_commit_id: Option, - #[serde(rename = "MergeMessageField", skip_serializing_if = "Option::is_none")] - pub merge_message_field: Option, - #[serde(rename = "MergeTitleField", skip_serializing_if = "Option::is_none")] - pub merge_title_field: Option, - #[serde( - rename = "delete_branch_after_merge", - skip_serializing_if = "Option::is_none" - )] - pub delete_branch_after_merge: Option, - #[serde(rename = "force_merge", skip_serializing_if = "Option::is_none")] - pub force_merge: Option, - #[serde(rename = "head_commit_id", skip_serializing_if = "Option::is_none")] - pub head_commit_id: Option, - #[serde( - rename = "merge_when_checks_succeed", - skip_serializing_if = "Option::is_none" - )] - pub merge_when_checks_succeed: Option, -} - -impl MergePullRequestOption { - /// MergePullRequestForm form for merging Pull Request - pub fn new(r#do: Do) -> MergePullRequestOption { - MergePullRequestOption { - r#do, - merge_commit_id: None, - merge_message_field: None, - merge_title_field: None, - delete_branch_after_merge: None, - force_merge: None, - head_commit_id: None, - merge_when_checks_succeed: None, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Do { - #[serde(rename = "merge")] - Merge, - #[serde(rename = "rebase")] - Rebase, - #[serde(rename = "rebase-merge")] - RebaseMerge, - #[serde(rename = "squash")] - Squash, - #[serde(rename = "fast-forward-only")] - FastForwardOnly, - #[serde(rename = "manually-merged")] - ManuallyMerged, -} - -impl Default for Do { - fn default() -> Do { - Self::Merge - } -} diff --git a/forgejo-openapi/src/models/migrate_repo_options.rs b/forgejo-openapi/src/models/migrate_repo_options.rs deleted file mode 100644 index 1e9c9d8..0000000 --- a/forgejo-openapi/src/models/migrate_repo_options.rs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// MigrateRepoOptions : MigrateRepoOptions options for migrating repository's this is used to interact with api v1 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MigrateRepoOptions { - #[serde(rename = "auth_password", skip_serializing_if = "Option::is_none")] - pub auth_password: Option, - #[serde(rename = "auth_token", skip_serializing_if = "Option::is_none")] - pub auth_token: Option, - #[serde(rename = "auth_username", skip_serializing_if = "Option::is_none")] - pub auth_username: Option, - #[serde(rename = "clone_addr")] - pub clone_addr: String, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "issues", skip_serializing_if = "Option::is_none")] - pub issues: Option, - #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] - pub labels: Option, - #[serde(rename = "lfs", skip_serializing_if = "Option::is_none")] - pub lfs: Option, - #[serde(rename = "lfs_endpoint", skip_serializing_if = "Option::is_none")] - pub lfs_endpoint: Option, - #[serde(rename = "milestones", skip_serializing_if = "Option::is_none")] - pub milestones: Option, - #[serde(rename = "mirror", skip_serializing_if = "Option::is_none")] - pub mirror: Option, - #[serde(rename = "mirror_interval", skip_serializing_if = "Option::is_none")] - pub mirror_interval: Option, - #[serde(rename = "private", skip_serializing_if = "Option::is_none")] - pub private: Option, - #[serde(rename = "pull_requests", skip_serializing_if = "Option::is_none")] - pub pull_requests: Option, - #[serde(rename = "releases", skip_serializing_if = "Option::is_none")] - pub releases: Option, - #[serde(rename = "repo_name")] - pub repo_name: String, - /// Name of User or Organisation who will own Repo after migration - #[serde(rename = "repo_owner", skip_serializing_if = "Option::is_none")] - pub repo_owner: Option, - #[serde(rename = "service", skip_serializing_if = "Option::is_none")] - pub service: Option, - /// deprecated (only for backwards compatibility) - #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] - pub uid: Option, - #[serde(rename = "wiki", skip_serializing_if = "Option::is_none")] - pub wiki: Option, -} - -impl MigrateRepoOptions { - /// MigrateRepoOptions options for migrating repository's this is used to interact with api v1 - pub fn new(clone_addr: String, repo_name: String) -> MigrateRepoOptions { - MigrateRepoOptions { - auth_password: None, - auth_token: None, - auth_username: None, - clone_addr, - description: None, - issues: None, - labels: None, - lfs: None, - lfs_endpoint: None, - milestones: None, - mirror: None, - mirror_interval: None, - private: None, - pull_requests: None, - releases: None, - repo_name, - repo_owner: None, - service: None, - uid: None, - wiki: None, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Service { - #[serde(rename = "git")] - Git, - #[serde(rename = "github")] - Github, - #[serde(rename = "gitea")] - Gitea, - #[serde(rename = "gitlab")] - Gitlab, - #[serde(rename = "gogs")] - Gogs, - #[serde(rename = "onedev")] - Onedev, - #[serde(rename = "gitbucket")] - Gitbucket, - #[serde(rename = "codebase")] - Codebase, -} - -impl Default for Service { - fn default() -> Service { - Self::Git - } -} diff --git a/forgejo-openapi/src/models/milestone.rs b/forgejo-openapi/src/models/milestone.rs deleted file mode 100644 index 4c3a953..0000000 --- a/forgejo-openapi/src/models/milestone.rs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Milestone : Milestone milestone is a collection of issues on one repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Milestone { - #[serde(rename = "closed_at", skip_serializing_if = "Option::is_none")] - pub closed_at: Option, - #[serde(rename = "closed_issues", skip_serializing_if = "Option::is_none")] - pub closed_issues: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "due_on", skip_serializing_if = "Option::is_none")] - pub due_on: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "open_issues", skip_serializing_if = "Option::is_none")] - pub open_issues: Option, - /// StateType issue state type - #[serde(rename = "state", skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, -} - -impl Milestone { - /// Milestone milestone is a collection of issues on one repository - pub fn new() -> Milestone { - Milestone { - closed_at: None, - closed_issues: None, - created_at: None, - description: None, - due_on: None, - id: None, - open_issues: None, - state: None, - title: None, - updated_at: None, - } - } -} diff --git a/forgejo-openapi/src/models/mod.rs b/forgejo-openapi/src/models/mod.rs deleted file mode 100644 index c4a24ec..0000000 --- a/forgejo-openapi/src/models/mod.rs +++ /dev/null @@ -1,456 +0,0 @@ -pub mod access_token; -pub use self::access_token::AccessToken; -pub mod action_run; -pub use self::action_run::ActionRun; -pub mod action_run_job; -pub use self::action_run_job::ActionRunJob; -pub mod action_task; -pub use self::action_task::ActionTask; -pub mod action_task_response; -pub use self::action_task_response::ActionTaskResponse; -pub mod action_variable; -pub use self::action_variable::ActionVariable; -pub mod activity; -pub use self::activity::Activity; -pub mod activity_pub; -pub use self::activity_pub::ActivityPub; -pub mod add_collaborator_option; -pub use self::add_collaborator_option::AddCollaboratorOption; -pub mod add_time_option; -pub use self::add_time_option::AddTimeOption; -pub mod annotated_tag; -pub use self::annotated_tag::AnnotatedTag; -pub mod annotated_tag_object; -pub use self::annotated_tag_object::AnnotatedTagObject; -pub mod api_error; -pub use self::api_error::ApiError; -pub mod api_forbidden_error; -pub use self::api_forbidden_error::ApiForbiddenError; -pub mod api_internal_server_error; -pub use self::api_internal_server_error::ApiInternalServerError; -pub mod api_invalid_topics_error; -pub use self::api_invalid_topics_error::ApiInvalidTopicsError; -pub mod api_not_found; -pub use self::api_not_found::ApiNotFound; -pub mod api_repo_archived_error; -pub use self::api_repo_archived_error::ApiRepoArchivedError; -pub mod api_unauthorized_error; -pub use self::api_unauthorized_error::ApiUnauthorizedError; -pub mod api_validation_error; -pub use self::api_validation_error::ApiValidationError; -pub mod attachment; -pub use self::attachment::Attachment; -pub mod blocked_user; -pub use self::blocked_user::BlockedUser; -pub mod branch; -pub use self::branch::Branch; -pub mod branch_protection; -pub use self::branch_protection::BranchProtection; -pub mod change_file_operation; -pub use self::change_file_operation::ChangeFileOperation; -pub mod change_files_options; -pub use self::change_files_options::ChangeFilesOptions; -pub mod changed_file; -pub use self::changed_file::ChangedFile; -pub mod combined_status; -pub use self::combined_status::CombinedStatus; -pub mod comment; -pub use self::comment::Comment; -pub mod commit; -pub use self::commit::Commit; -pub mod commit_affected_files; -pub use self::commit_affected_files::CommitAffectedFiles; -pub mod commit_date_options; -pub use self::commit_date_options::CommitDateOptions; -pub mod commit_meta; -pub use self::commit_meta::CommitMeta; -pub mod commit_stats; -pub use self::commit_stats::CommitStats; -pub mod commit_status; -pub use self::commit_status::CommitStatus; -pub mod commit_user; -pub use self::commit_user::CommitUser; -pub mod compare; -pub use self::compare::Compare; -pub mod contents_response; -pub use self::contents_response::ContentsResponse; -pub mod create_access_token_option; -pub use self::create_access_token_option::CreateAccessTokenOption; -pub mod create_branch_protection_option; -pub use self::create_branch_protection_option::CreateBranchProtectionOption; -pub mod create_branch_repo_option; -pub use self::create_branch_repo_option::CreateBranchRepoOption; -pub mod create_email_option; -pub use self::create_email_option::CreateEmailOption; -pub mod create_file_options; -pub use self::create_file_options::CreateFileOptions; -pub mod create_fork_option; -pub use self::create_fork_option::CreateForkOption; -pub mod create_gpg_key_option; -pub use self::create_gpg_key_option::CreateGpgKeyOption; -pub mod create_hook_option; -pub use self::create_hook_option::CreateHookOption; -pub mod create_issue_comment_option; -pub use self::create_issue_comment_option::CreateIssueCommentOption; -pub mod create_issue_option; -pub use self::create_issue_option::CreateIssueOption; -pub mod create_key_option; -pub use self::create_key_option::CreateKeyOption; -pub mod create_label_option; -pub use self::create_label_option::CreateLabelOption; -pub mod create_milestone_option; -pub use self::create_milestone_option::CreateMilestoneOption; -pub mod create_o_auth2_application_options; -pub use self::create_o_auth2_application_options::CreateOAuth2ApplicationOptions; -pub mod create_or_update_secret_option; -pub use self::create_or_update_secret_option::CreateOrUpdateSecretOption; -pub mod create_org_option; -pub use self::create_org_option::CreateOrgOption; -pub mod create_pull_request_option; -pub use self::create_pull_request_option::CreatePullRequestOption; -pub mod create_pull_review_comment; -pub use self::create_pull_review_comment::CreatePullReviewComment; -pub mod create_pull_review_options; -pub use self::create_pull_review_options::CreatePullReviewOptions; -pub mod create_push_mirror_option; -pub use self::create_push_mirror_option::CreatePushMirrorOption; -pub mod create_quota_group_options; -pub use self::create_quota_group_options::CreateQuotaGroupOptions; -pub mod create_quota_rule_options; -pub use self::create_quota_rule_options::CreateQuotaRuleOptions; -pub mod create_release_option; -pub use self::create_release_option::CreateReleaseOption; -pub mod create_repo_option; -pub use self::create_repo_option::CreateRepoOption; -pub mod create_status_option; -pub use self::create_status_option::CreateStatusOption; -pub mod create_tag_option; -pub use self::create_tag_option::CreateTagOption; -pub mod create_tag_protection_option; -pub use self::create_tag_protection_option::CreateTagProtectionOption; -pub mod create_team_option; -pub use self::create_team_option::CreateTeamOption; -pub mod create_user_option; -pub use self::create_user_option::CreateUserOption; -pub mod create_variable_option; -pub use self::create_variable_option::CreateVariableOption; -pub mod create_wiki_page_options; -pub use self::create_wiki_page_options::CreateWikiPageOptions; -pub mod cron; -pub use self::cron::Cron; -pub mod delete_email_option; -pub use self::delete_email_option::DeleteEmailOption; -pub mod delete_file_options; -pub use self::delete_file_options::DeleteFileOptions; -pub mod delete_labels_option; -pub use self::delete_labels_option::DeleteLabelsOption; -pub mod deploy_key; -pub use self::deploy_key::DeployKey; -pub mod dismiss_pull_review_options; -pub use self::dismiss_pull_review_options::DismissPullReviewOptions; -pub mod dispatch_workflow_option; -pub use self::dispatch_workflow_option::DispatchWorkflowOption; -pub mod dispatch_workflow_run; -pub use self::dispatch_workflow_run::DispatchWorkflowRun; -pub mod edit_attachment_options; -pub use self::edit_attachment_options::EditAttachmentOptions; -pub mod edit_branch_protection_option; -pub use self::edit_branch_protection_option::EditBranchProtectionOption; -pub mod edit_deadline_option; -pub use self::edit_deadline_option::EditDeadlineOption; -pub mod edit_git_hook_option; -pub use self::edit_git_hook_option::EditGitHookOption; -pub mod edit_hook_option; -pub use self::edit_hook_option::EditHookOption; -pub mod edit_issue_comment_option; -pub use self::edit_issue_comment_option::EditIssueCommentOption; -pub mod edit_issue_option; -pub use self::edit_issue_option::EditIssueOption; -pub mod edit_label_option; -pub use self::edit_label_option::EditLabelOption; -pub mod edit_milestone_option; -pub use self::edit_milestone_option::EditMilestoneOption; -pub mod edit_org_option; -pub use self::edit_org_option::EditOrgOption; -pub mod edit_pull_request_option; -pub use self::edit_pull_request_option::EditPullRequestOption; -pub mod edit_quota_rule_options; -pub use self::edit_quota_rule_options::EditQuotaRuleOptions; -pub mod edit_reaction_option; -pub use self::edit_reaction_option::EditReactionOption; -pub mod edit_release_option; -pub use self::edit_release_option::EditReleaseOption; -pub mod edit_repo_option; -pub use self::edit_repo_option::EditRepoOption; -pub mod edit_tag_protection_option; -pub use self::edit_tag_protection_option::EditTagProtectionOption; -pub mod edit_team_option; -pub use self::edit_team_option::EditTeamOption; -pub mod edit_user_option; -pub use self::edit_user_option::EditUserOption; -pub mod email; -pub use self::email::Email; -pub mod external_tracker; -pub use self::external_tracker::ExternalTracker; -pub mod external_wiki; -pub use self::external_wiki::ExternalWiki; -pub mod file_commit_response; -pub use self::file_commit_response::FileCommitResponse; -pub mod file_delete_response; -pub use self::file_delete_response::FileDeleteResponse; -pub mod file_links_response; -pub use self::file_links_response::FileLinksResponse; -pub mod file_response; -pub use self::file_response::FileResponse; -pub mod files_response; -pub use self::files_response::FilesResponse; -pub mod general_api_settings; -pub use self::general_api_settings::GeneralApiSettings; -pub mod general_attachment_settings; -pub use self::general_attachment_settings::GeneralAttachmentSettings; -pub mod general_repo_settings; -pub use self::general_repo_settings::GeneralRepoSettings; -pub mod general_ui_settings; -pub use self::general_ui_settings::GeneralUiSettings; -pub mod generate_repo_option; -pub use self::generate_repo_option::GenerateRepoOption; -pub mod git_blob; -pub use self::git_blob::GitBlob; -pub mod git_entry; -pub use self::git_entry::GitEntry; -pub mod git_hook; -pub use self::git_hook::GitHook; -pub mod git_object; -pub use self::git_object::GitObject; -pub mod git_tree_response; -pub use self::git_tree_response::GitTreeResponse; -pub mod gitignore_template_info; -pub use self::gitignore_template_info::GitignoreTemplateInfo; -pub mod gpg_key; -pub use self::gpg_key::GpgKey; -pub mod gpg_key_email; -pub use self::gpg_key_email::GpgKeyEmail; -pub mod hook; -pub use self::hook::Hook; -pub mod identity; -pub use self::identity::Identity; -pub mod internal_tracker; -pub use self::internal_tracker::InternalTracker; -pub mod issue; -pub use self::issue::Issue; -pub mod issue_config; -pub use self::issue_config::IssueConfig; -pub mod issue_config_contact_link; -pub use self::issue_config_contact_link::IssueConfigContactLink; -pub mod issue_config_validation; -pub use self::issue_config_validation::IssueConfigValidation; -pub mod issue_deadline; -pub use self::issue_deadline::IssueDeadline; -pub mod issue_form_field; -pub use self::issue_form_field::IssueFormField; -pub mod issue_labels_option; -pub use self::issue_labels_option::IssueLabelsOption; -pub mod issue_meta; -pub use self::issue_meta::IssueMeta; -pub mod issue_template; -pub use self::issue_template::IssueTemplate; -pub mod label; -pub use self::label::Label; -pub mod label_template; -pub use self::label_template::LabelTemplate; -pub mod license_template_info; -pub use self::license_template_info::LicenseTemplateInfo; -pub mod licenses_template_list_entry; -pub use self::licenses_template_list_entry::LicensesTemplateListEntry; -pub mod list_action_run_response; -pub use self::list_action_run_response::ListActionRunResponse; -pub mod markdown_option; -pub use self::markdown_option::MarkdownOption; -pub mod markup_option; -pub use self::markup_option::MarkupOption; -pub mod merge_pull_request_option; -pub use self::merge_pull_request_option::MergePullRequestOption; -pub mod migrate_repo_options; -pub use self::migrate_repo_options::MigrateRepoOptions; -pub mod milestone; -pub use self::milestone::Milestone; -pub mod new_issue_pins_allowed; -pub use self::new_issue_pins_allowed::NewIssuePinsAllowed; -pub mod node_info; -pub use self::node_info::NodeInfo; -pub mod node_info_services; -pub use self::node_info_services::NodeInfoServices; -pub mod node_info_software; -pub use self::node_info_software::NodeInfoSoftware; -pub mod node_info_usage; -pub use self::node_info_usage::NodeInfoUsage; -pub mod node_info_usage_users; -pub use self::node_info_usage_users::NodeInfoUsageUsers; -pub mod note; -pub use self::note::Note; -pub mod note_options; -pub use self::note_options::NoteOptions; -pub mod notification_count; -pub use self::notification_count::NotificationCount; -pub mod notification_subject; -pub use self::notification_subject::NotificationSubject; -pub mod notification_thread; -pub use self::notification_thread::NotificationThread; -pub mod o_auth2_application; -pub use self::o_auth2_application::OAuth2Application; -pub mod organization; -pub use self::organization::Organization; -pub mod organization_permissions; -pub use self::organization_permissions::OrganizationPermissions; -pub mod package; -pub use self::package::Package; -pub mod package_file; -pub use self::package_file::PackageFile; -pub mod payload_commit; -pub use self::payload_commit::PayloadCommit; -pub mod payload_commit_verification; -pub use self::payload_commit_verification::PayloadCommitVerification; -pub mod payload_user; -pub use self::payload_user::PayloadUser; -pub mod permission; -pub use self::permission::Permission; -pub mod pr_branch_info; -pub use self::pr_branch_info::PrBranchInfo; -pub mod public_key; -pub use self::public_key::PublicKey; -pub mod pull_request; -pub use self::pull_request::PullRequest; -pub mod pull_request_meta; -pub use self::pull_request_meta::PullRequestMeta; -pub mod pull_review; -pub use self::pull_review::PullReview; -pub mod pull_review_comment; -pub use self::pull_review_comment::PullReviewComment; -pub mod pull_review_request_options; -pub use self::pull_review_request_options::PullReviewRequestOptions; -pub mod push_mirror; -pub use self::push_mirror::PushMirror; -pub mod quota_group; -pub use self::quota_group::QuotaGroup; -pub mod quota_info; -pub use self::quota_info::QuotaInfo; -pub mod quota_rule_info; -pub use self::quota_rule_info::QuotaRuleInfo; -pub mod quota_used; -pub use self::quota_used::QuotaUsed; -pub mod quota_used_artifact; -pub use self::quota_used_artifact::QuotaUsedArtifact; -pub mod quota_used_attachment; -pub use self::quota_used_attachment::QuotaUsedAttachment; -pub mod quota_used_attachment_contained_in; -pub use self::quota_used_attachment_contained_in::QuotaUsedAttachmentContainedIn; -pub mod quota_used_package; -pub use self::quota_used_package::QuotaUsedPackage; -pub mod quota_used_size; -pub use self::quota_used_size::QuotaUsedSize; -pub mod quota_used_size_assets; -pub use self::quota_used_size_assets::QuotaUsedSizeAssets; -pub mod quota_used_size_assets_attachments; -pub use self::quota_used_size_assets_attachments::QuotaUsedSizeAssetsAttachments; -pub mod quota_used_size_assets_packages; -pub use self::quota_used_size_assets_packages::QuotaUsedSizeAssetsPackages; -pub mod quota_used_size_git; -pub use self::quota_used_size_git::QuotaUsedSizeGit; -pub mod quota_used_size_repos; -pub use self::quota_used_size_repos::QuotaUsedSizeRepos; -pub mod reaction; -pub use self::reaction::Reaction; -pub mod reference; -pub use self::reference::Reference; -pub mod registration_token; -pub use self::registration_token::RegistrationToken; -pub mod release; -pub use self::release::Release; -pub mod rename_org_option; -pub use self::rename_org_option::RenameOrgOption; -pub mod rename_user_option; -pub use self::rename_user_option::RenameUserOption; -pub mod replace_flags_option; -pub use self::replace_flags_option::ReplaceFlagsOption; -pub mod repo_collaborator_permission; -pub use self::repo_collaborator_permission::RepoCollaboratorPermission; -pub mod repo_commit; -pub use self::repo_commit::RepoCommit; -pub mod repo_create_release_attachment_request; -pub use self::repo_create_release_attachment_request::RepoCreateReleaseAttachmentRequest; -pub mod repo_topic_options; -pub use self::repo_topic_options::RepoTopicOptions; -pub mod repo_transfer; -pub use self::repo_transfer::RepoTransfer; -pub mod repository; -pub use self::repository::Repository; -pub mod repository_meta; -pub use self::repository_meta::RepositoryMeta; -pub mod search_results; -pub use self::search_results::SearchResults; -pub mod secret; -pub use self::secret::Secret; -pub mod server_version; -pub use self::server_version::ServerVersion; -pub mod set_user_quota_groups_options; -pub use self::set_user_quota_groups_options::SetUserQuotaGroupsOptions; -pub mod stop_watch; -pub use self::stop_watch::StopWatch; -pub mod submit_pull_review_options; -pub use self::submit_pull_review_options::SubmitPullReviewOptions; -pub mod sync_fork_info; -pub use self::sync_fork_info::SyncForkInfo; -pub mod tag; -pub use self::tag::Tag; -pub mod tag_archive_download_count; -pub use self::tag_archive_download_count::TagArchiveDownloadCount; -pub mod tag_protection; -pub use self::tag_protection::TagProtection; -pub mod team; -pub use self::team::Team; -pub mod team_search_results; -pub use self::team_search_results::TeamSearchResults; -pub mod timeline_comment; -pub use self::timeline_comment::TimelineComment; -pub mod topic_name; -pub use self::topic_name::TopicName; -pub mod topic_response; -pub use self::topic_response::TopicResponse; -pub mod topic_search_results; -pub use self::topic_search_results::TopicSearchResults; -pub mod tracked_time; -pub use self::tracked_time::TrackedTime; -pub mod transfer_repo_option; -pub use self::transfer_repo_option::TransferRepoOption; -pub mod update_branch_repo_option; -pub use self::update_branch_repo_option::UpdateBranchRepoOption; -pub mod update_file_options; -pub use self::update_file_options::UpdateFileOptions; -pub mod update_repo_avatar_option; -pub use self::update_repo_avatar_option::UpdateRepoAvatarOption; -pub mod update_user_avatar_option; -pub use self::update_user_avatar_option::UpdateUserAvatarOption; -pub mod update_variable_option; -pub use self::update_variable_option::UpdateVariableOption; -pub mod user; -pub use self::user::User; -pub mod user_heatmap_data; -pub use self::user_heatmap_data::UserHeatmapData; -pub mod user_search_results; -pub use self::user_search_results::UserSearchResults; -pub mod user_settings; -pub use self::user_settings::UserSettings; -pub mod user_settings_options; -pub use self::user_settings_options::UserSettingsOptions; -pub mod verify_gpg_key_option; -pub use self::verify_gpg_key_option::VerifyGpgKeyOption; -pub mod watch_info; -pub use self::watch_info::WatchInfo; -pub mod wiki_commit; -pub use self::wiki_commit::WikiCommit; -pub mod wiki_commit_list; -pub use self::wiki_commit_list::WikiCommitList; -pub mod wiki_page; -pub use self::wiki_page::WikiPage; -pub mod wiki_page_meta_data; -pub use self::wiki_page_meta_data::WikiPageMetaData; diff --git a/forgejo-openapi/src/models/new_issue_pins_allowed.rs b/forgejo-openapi/src/models/new_issue_pins_allowed.rs deleted file mode 100644 index e78e1bf..0000000 --- a/forgejo-openapi/src/models/new_issue_pins_allowed.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// NewIssuePinsAllowed : NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NewIssuePinsAllowed { - #[serde(rename = "issues", skip_serializing_if = "Option::is_none")] - pub issues: Option, - #[serde(rename = "pull_requests", skip_serializing_if = "Option::is_none")] - pub pull_requests: Option, -} - -impl NewIssuePinsAllowed { - /// NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed - pub fn new() -> NewIssuePinsAllowed { - NewIssuePinsAllowed { - issues: None, - pull_requests: None, - } - } -} diff --git a/forgejo-openapi/src/models/node_info.rs b/forgejo-openapi/src/models/node_info.rs deleted file mode 100644 index 6e40ac3..0000000 --- a/forgejo-openapi/src/models/node_info.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// NodeInfo : NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NodeInfo { - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, - #[serde(rename = "openRegistrations", skip_serializing_if = "Option::is_none")] - pub open_registrations: Option, - #[serde(rename = "protocols", skip_serializing_if = "Option::is_none")] - pub protocols: Option>, - #[serde(rename = "services", skip_serializing_if = "Option::is_none")] - pub services: Option>, - #[serde(rename = "software", skip_serializing_if = "Option::is_none")] - pub software: Option>, - #[serde(rename = "usage", skip_serializing_if = "Option::is_none")] - pub usage: Option>, - #[serde(rename = "version", skip_serializing_if = "Option::is_none")] - pub version: Option, -} - -impl NodeInfo { - /// NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks - pub fn new() -> NodeInfo { - NodeInfo { - metadata: None, - open_registrations: None, - protocols: None, - services: None, - software: None, - usage: None, - version: None, - } - } -} diff --git a/forgejo-openapi/src/models/node_info_services.rs b/forgejo-openapi/src/models/node_info_services.rs deleted file mode 100644 index f1e8011..0000000 --- a/forgejo-openapi/src/models/node_info_services.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// NodeInfoServices : NodeInfoServices contains the third party sites this server can connect to via their application API -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NodeInfoServices { - #[serde(rename = "inbound", skip_serializing_if = "Option::is_none")] - pub inbound: Option>, - #[serde(rename = "outbound", skip_serializing_if = "Option::is_none")] - pub outbound: Option>, -} - -impl NodeInfoServices { - /// NodeInfoServices contains the third party sites this server can connect to via their application API - pub fn new() -> NodeInfoServices { - NodeInfoServices { - inbound: None, - outbound: None, - } - } -} diff --git a/forgejo-openapi/src/models/node_info_software.rs b/forgejo-openapi/src/models/node_info_software.rs deleted file mode 100644 index 782f4ee..0000000 --- a/forgejo-openapi/src/models/node_info_software.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// NodeInfoSoftware : NodeInfoSoftware contains Metadata about server software in use -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NodeInfoSoftware { - #[serde(rename = "homepage", skip_serializing_if = "Option::is_none")] - pub homepage: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] - pub repository: Option, - #[serde(rename = "version", skip_serializing_if = "Option::is_none")] - pub version: Option, -} - -impl NodeInfoSoftware { - /// NodeInfoSoftware contains Metadata about server software in use - pub fn new() -> NodeInfoSoftware { - NodeInfoSoftware { - homepage: None, - name: None, - repository: None, - version: None, - } - } -} diff --git a/forgejo-openapi/src/models/node_info_usage.rs b/forgejo-openapi/src/models/node_info_usage.rs deleted file mode 100644 index 8d237bd..0000000 --- a/forgejo-openapi/src/models/node_info_usage.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// NodeInfoUsage : NodeInfoUsage contains usage statistics for this server -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NodeInfoUsage { - #[serde(rename = "localComments", skip_serializing_if = "Option::is_none")] - pub local_comments: Option, - #[serde(rename = "localPosts", skip_serializing_if = "Option::is_none")] - pub local_posts: Option, - #[serde(rename = "users", skip_serializing_if = "Option::is_none")] - pub users: Option>, -} - -impl NodeInfoUsage { - /// NodeInfoUsage contains usage statistics for this server - pub fn new() -> NodeInfoUsage { - NodeInfoUsage { - local_comments: None, - local_posts: None, - users: None, - } - } -} diff --git a/forgejo-openapi/src/models/node_info_usage_users.rs b/forgejo-openapi/src/models/node_info_usage_users.rs deleted file mode 100644 index c8d2c72..0000000 --- a/forgejo-openapi/src/models/node_info_usage_users.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// NodeInfoUsageUsers : NodeInfoUsageUsers contains statistics about the users of this server -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NodeInfoUsageUsers { - #[serde(rename = "activeHalfyear", skip_serializing_if = "Option::is_none")] - pub active_halfyear: Option, - #[serde(rename = "activeMonth", skip_serializing_if = "Option::is_none")] - pub active_month: Option, - #[serde(rename = "total", skip_serializing_if = "Option::is_none")] - pub total: Option, -} - -impl NodeInfoUsageUsers { - /// NodeInfoUsageUsers contains statistics about the users of this server - pub fn new() -> NodeInfoUsageUsers { - NodeInfoUsageUsers { - active_halfyear: None, - active_month: None, - total: None, - } - } -} diff --git a/forgejo-openapi/src/models/note.rs b/forgejo-openapi/src/models/note.rs deleted file mode 100644 index 3fb9daf..0000000 --- a/forgejo-openapi/src/models/note.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Note : Note contains information related to a git note -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Note { - #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] - pub commit: Option>, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, -} - -impl Note { - /// Note contains information related to a git note - pub fn new() -> Note { - Note { - commit: None, - message: None, - } - } -} diff --git a/forgejo-openapi/src/models/note_options.rs b/forgejo-openapi/src/models/note_options.rs deleted file mode 100644 index 25f5124..0000000 --- a/forgejo-openapi/src/models/note_options.rs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NoteOptions { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, -} - -impl NoteOptions { - pub fn new() -> NoteOptions { - NoteOptions { message: None } - } -} diff --git a/forgejo-openapi/src/models/notification_count.rs b/forgejo-openapi/src/models/notification_count.rs deleted file mode 100644 index 58683c5..0000000 --- a/forgejo-openapi/src/models/notification_count.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// NotificationCount : NotificationCount number of unread notifications -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NotificationCount { - #[serde(rename = "new", skip_serializing_if = "Option::is_none")] - pub new: Option, -} - -impl NotificationCount { - /// NotificationCount number of unread notifications - pub fn new() -> NotificationCount { - NotificationCount { new: None } - } -} diff --git a/forgejo-openapi/src/models/notification_subject.rs b/forgejo-openapi/src/models/notification_subject.rs deleted file mode 100644 index 25f70fd..0000000 --- a/forgejo-openapi/src/models/notification_subject.rs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// NotificationSubject : NotificationSubject contains the notification subject (Issue/Pull/Commit) -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NotificationSubject { - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde( - rename = "latest_comment_html_url", - skip_serializing_if = "Option::is_none" - )] - pub latest_comment_html_url: Option, - #[serde(rename = "latest_comment_url", skip_serializing_if = "Option::is_none")] - pub latest_comment_url: Option, - /// StateType issue state type - #[serde(rename = "state", skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, - /// NotifySubjectType represent type of notification subject - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl NotificationSubject { - /// NotificationSubject contains the notification subject (Issue/Pull/Commit) - pub fn new() -> NotificationSubject { - NotificationSubject { - html_url: None, - latest_comment_html_url: None, - latest_comment_url: None, - state: None, - title: None, - r#type: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/notification_thread.rs b/forgejo-openapi/src/models/notification_thread.rs deleted file mode 100644 index 044ef75..0000000 --- a/forgejo-openapi/src/models/notification_thread.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// NotificationThread : NotificationThread expose Notification on API -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NotificationThread { - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "pinned", skip_serializing_if = "Option::is_none")] - pub pinned: Option, - #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] - pub repository: Option>, - #[serde(rename = "subject", skip_serializing_if = "Option::is_none")] - pub subject: Option>, - #[serde(rename = "unread", skip_serializing_if = "Option::is_none")] - pub unread: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl NotificationThread { - /// NotificationThread expose Notification on API - pub fn new() -> NotificationThread { - NotificationThread { - id: None, - pinned: None, - repository: None, - subject: None, - unread: None, - updated_at: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/o_auth2_application.rs b/forgejo-openapi/src/models/o_auth2_application.rs deleted file mode 100644 index 2393339..0000000 --- a/forgejo-openapi/src/models/o_auth2_application.rs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OAuth2Application { - #[serde(rename = "client_id", skip_serializing_if = "Option::is_none")] - pub client_id: Option, - #[serde(rename = "client_secret", skip_serializing_if = "Option::is_none")] - pub client_secret: Option, - #[serde( - rename = "confidential_client", - skip_serializing_if = "Option::is_none" - )] - pub confidential_client: Option, - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "redirect_uris", skip_serializing_if = "Option::is_none")] - pub redirect_uris: Option>, -} - -impl OAuth2Application { - pub fn new() -> OAuth2Application { - OAuth2Application { - client_id: None, - client_secret: None, - confidential_client: None, - created: None, - id: None, - name: None, - redirect_uris: None, - } - } -} diff --git a/forgejo-openapi/src/models/organization.rs b/forgejo-openapi/src/models/organization.rs deleted file mode 100644 index eb3ec9e..0000000 --- a/forgejo-openapi/src/models/organization.rs +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Organization : Organization represents an organization -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Organization { - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] - pub full_name: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "location", skip_serializing_if = "Option::is_none")] - pub location: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde( - rename = "repo_admin_change_team_access", - skip_serializing_if = "Option::is_none" - )] - pub repo_admin_change_team_access: Option, - /// deprecated - #[serde(rename = "username", skip_serializing_if = "Option::is_none")] - pub username: Option, - #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] - pub visibility: Option, - #[serde(rename = "website", skip_serializing_if = "Option::is_none")] - pub website: Option, -} - -impl Organization { - /// Organization represents an organization - pub fn new() -> Organization { - Organization { - avatar_url: None, - description: None, - email: None, - full_name: None, - id: None, - location: None, - name: None, - repo_admin_change_team_access: None, - username: None, - visibility: None, - website: None, - } - } -} diff --git a/forgejo-openapi/src/models/organization_permissions.rs b/forgejo-openapi/src/models/organization_permissions.rs deleted file mode 100644 index ca9b6d7..0000000 --- a/forgejo-openapi/src/models/organization_permissions.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OrganizationPermissions : OrganizationPermissions list different users permissions on an organization -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OrganizationPermissions { - #[serde( - rename = "can_create_repository", - skip_serializing_if = "Option::is_none" - )] - pub can_create_repository: Option, - #[serde(rename = "can_read", skip_serializing_if = "Option::is_none")] - pub can_read: Option, - #[serde(rename = "can_write", skip_serializing_if = "Option::is_none")] - pub can_write: Option, - #[serde(rename = "is_admin", skip_serializing_if = "Option::is_none")] - pub is_admin: Option, - #[serde(rename = "is_owner", skip_serializing_if = "Option::is_none")] - pub is_owner: Option, -} - -impl OrganizationPermissions { - /// OrganizationPermissions list different users permissions on an organization - pub fn new() -> OrganizationPermissions { - OrganizationPermissions { - can_create_repository: None, - can_read: None, - can_write: None, - is_admin: None, - is_owner: None, - } - } -} diff --git a/forgejo-openapi/src/models/package.rs b/forgejo-openapi/src/models/package.rs deleted file mode 100644 index 891e1cf..0000000 --- a/forgejo-openapi/src/models/package.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Package : Package represents a package -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Package { - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "creator", skip_serializing_if = "Option::is_none")] - pub creator: Option>, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "owner", skip_serializing_if = "Option::is_none")] - pub owner: Option>, - #[serde(rename = "repository", skip_serializing_if = "Option::is_none")] - pub repository: Option>, - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "version", skip_serializing_if = "Option::is_none")] - pub version: Option, -} - -impl Package { - /// Package represents a package - pub fn new() -> Package { - Package { - created_at: None, - creator: None, - html_url: None, - id: None, - name: None, - owner: None, - repository: None, - r#type: None, - version: None, - } - } -} diff --git a/forgejo-openapi/src/models/package_file.rs b/forgejo-openapi/src/models/package_file.rs deleted file mode 100644 index fabf5d0..0000000 --- a/forgejo-openapi/src/models/package_file.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PackageFile : PackageFile represents a package file -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PackageFile { - #[serde(rename = "Size", skip_serializing_if = "Option::is_none")] - pub size: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "md5", skip_serializing_if = "Option::is_none")] - pub md5: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "sha1", skip_serializing_if = "Option::is_none")] - pub sha1: Option, - #[serde(rename = "sha256", skip_serializing_if = "Option::is_none")] - pub sha256: Option, - #[serde(rename = "sha512", skip_serializing_if = "Option::is_none")] - pub sha512: Option, -} - -impl PackageFile { - /// PackageFile represents a package file - pub fn new() -> PackageFile { - PackageFile { - size: None, - id: None, - md5: None, - name: None, - sha1: None, - sha256: None, - sha512: None, - } - } -} diff --git a/forgejo-openapi/src/models/payload_commit.rs b/forgejo-openapi/src/models/payload_commit.rs deleted file mode 100644 index 04eebf0..0000000 --- a/forgejo-openapi/src/models/payload_commit.rs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PayloadCommit : PayloadCommit represents a commit -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PayloadCommit { - #[serde(rename = "added", skip_serializing_if = "Option::is_none")] - pub added: Option>, - #[serde(rename = "author", skip_serializing_if = "Option::is_none")] - pub author: Option>, - #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] - pub committer: Option>, - /// sha1 hash of the commit - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "modified", skip_serializing_if = "Option::is_none")] - pub modified: Option>, - #[serde(rename = "removed", skip_serializing_if = "Option::is_none")] - pub removed: Option>, - #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] - pub timestamp: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, -} - -impl PayloadCommit { - /// PayloadCommit represents a commit - pub fn new() -> PayloadCommit { - PayloadCommit { - added: None, - author: None, - committer: None, - id: None, - message: None, - modified: None, - removed: None, - timestamp: None, - url: None, - verification: None, - } - } -} diff --git a/forgejo-openapi/src/models/payload_commit_verification.rs b/forgejo-openapi/src/models/payload_commit_verification.rs deleted file mode 100644 index 757167e..0000000 --- a/forgejo-openapi/src/models/payload_commit_verification.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PayloadCommitVerification : PayloadCommitVerification represents the GPG verification of a commit -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PayloadCommitVerification { - #[serde(rename = "payload", skip_serializing_if = "Option::is_none")] - pub payload: Option, - #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] - pub reason: Option, - #[serde(rename = "signature", skip_serializing_if = "Option::is_none")] - pub signature: Option, - #[serde(rename = "signer", skip_serializing_if = "Option::is_none")] - pub signer: Option>, - #[serde(rename = "verified", skip_serializing_if = "Option::is_none")] - pub verified: Option, -} - -impl PayloadCommitVerification { - /// PayloadCommitVerification represents the GPG verification of a commit - pub fn new() -> PayloadCommitVerification { - PayloadCommitVerification { - payload: None, - reason: None, - signature: None, - signer: None, - verified: None, - } - } -} diff --git a/forgejo-openapi/src/models/payload_user.rs b/forgejo-openapi/src/models/payload_user.rs deleted file mode 100644 index d302e20..0000000 --- a/forgejo-openapi/src/models/payload_user.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PayloadUser : PayloadUser represents the author or committer of a commit -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PayloadUser { - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - /// Full name of the commit author - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "username", skip_serializing_if = "Option::is_none")] - pub username: Option, -} - -impl PayloadUser { - /// PayloadUser represents the author or committer of a commit - pub fn new() -> PayloadUser { - PayloadUser { - email: None, - name: None, - username: None, - } - } -} diff --git a/forgejo-openapi/src/models/permission.rs b/forgejo-openapi/src/models/permission.rs deleted file mode 100644 index 28194e7..0000000 --- a/forgejo-openapi/src/models/permission.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Permission : Permission represents a set of permissions -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Permission { - #[serde(rename = "admin", skip_serializing_if = "Option::is_none")] - pub admin: Option, - #[serde(rename = "pull", skip_serializing_if = "Option::is_none")] - pub pull: Option, - #[serde(rename = "push", skip_serializing_if = "Option::is_none")] - pub push: Option, -} - -impl Permission { - /// Permission represents a set of permissions - pub fn new() -> Permission { - Permission { - admin: None, - pull: None, - push: None, - } - } -} diff --git a/forgejo-openapi/src/models/pr_branch_info.rs b/forgejo-openapi/src/models/pr_branch_info.rs deleted file mode 100644 index 2fa2231..0000000 --- a/forgejo-openapi/src/models/pr_branch_info.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PrBranchInfo : PRBranchInfo information about a branch -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PrBranchInfo { - #[serde(rename = "label", skip_serializing_if = "Option::is_none")] - pub label: Option, - #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] - pub r#ref: Option, - #[serde(rename = "repo", skip_serializing_if = "Option::is_none")] - pub repo: Option>, - #[serde(rename = "repo_id", skip_serializing_if = "Option::is_none")] - pub repo_id: Option, - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, -} - -impl PrBranchInfo { - /// PRBranchInfo information about a branch - pub fn new() -> PrBranchInfo { - PrBranchInfo { - label: None, - r#ref: None, - repo: None, - repo_id: None, - sha: None, - } - } -} diff --git a/forgejo-openapi/src/models/public_key.rs b/forgejo-openapi/src/models/public_key.rs deleted file mode 100644 index 5598ef4..0000000 --- a/forgejo-openapi/src/models/public_key.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PublicKey : PublicKey publickey is a user key to push code to repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PublicKey { - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "fingerprint", skip_serializing_if = "Option::is_none")] - pub fingerprint: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, - #[serde(rename = "key_type", skip_serializing_if = "Option::is_none")] - pub key_type: Option, - #[serde(rename = "read_only", skip_serializing_if = "Option::is_none")] - pub read_only: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, - #[serde(rename = "user", skip_serializing_if = "Option::is_none")] - pub user: Option>, -} - -impl PublicKey { - /// PublicKey publickey is a user key to push code to repository - pub fn new() -> PublicKey { - PublicKey { - created_at: None, - fingerprint: None, - id: None, - key: None, - key_type: None, - read_only: None, - title: None, - url: None, - user: None, - } - } -} diff --git a/forgejo-openapi/src/models/pull_request.rs b/forgejo-openapi/src/models/pull_request.rs deleted file mode 100644 index d1afdf8..0000000 --- a/forgejo-openapi/src/models/pull_request.rs +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PullRequest : PullRequest represents a pull request -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PullRequest { - #[serde(rename = "additions", skip_serializing_if = "Option::is_none")] - pub additions: Option, - #[serde( - rename = "allow_maintainer_edit", - skip_serializing_if = "Option::is_none" - )] - pub allow_maintainer_edit: Option, - #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] - pub assignee: Option>, - #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")] - pub assignees: Option>, - #[serde(rename = "base", skip_serializing_if = "Option::is_none")] - pub base: Option>, - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "changed_files", skip_serializing_if = "Option::is_none")] - pub changed_files: Option, - #[serde(rename = "closed_at", skip_serializing_if = "Option::is_none")] - pub closed_at: Option, - #[serde(rename = "comments", skip_serializing_if = "Option::is_none")] - pub comments: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "deletions", skip_serializing_if = "Option::is_none")] - pub deletions: Option, - #[serde(rename = "diff_url", skip_serializing_if = "Option::is_none")] - pub diff_url: Option, - #[serde(rename = "draft", skip_serializing_if = "Option::is_none")] - pub draft: Option, - #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")] - pub due_date: Option, - #[serde(rename = "flow", skip_serializing_if = "Option::is_none")] - pub flow: Option, - #[serde(rename = "head", skip_serializing_if = "Option::is_none")] - pub head: Option>, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "is_locked", skip_serializing_if = "Option::is_none")] - pub is_locked: Option, - #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(rename = "merge_base", skip_serializing_if = "Option::is_none")] - pub merge_base: Option, - #[serde(rename = "merge_commit_sha", skip_serializing_if = "Option::is_none")] - pub merge_commit_sha: Option, - #[serde(rename = "mergeable", skip_serializing_if = "Option::is_none")] - pub mergeable: Option, - #[serde(rename = "merged", skip_serializing_if = "Option::is_none")] - pub merged: Option, - #[serde(rename = "merged_at", skip_serializing_if = "Option::is_none")] - pub merged_at: Option, - #[serde(rename = "merged_by", skip_serializing_if = "Option::is_none")] - pub merged_by: Option>, - #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] - pub milestone: Option>, - #[serde(rename = "number", skip_serializing_if = "Option::is_none")] - pub number: Option, - #[serde(rename = "patch_url", skip_serializing_if = "Option::is_none")] - pub patch_url: Option, - #[serde(rename = "pin_order", skip_serializing_if = "Option::is_none")] - pub pin_order: Option, - #[serde( - rename = "requested_reviewers", - skip_serializing_if = "Option::is_none" - )] - pub requested_reviewers: Option>, - #[serde( - rename = "requested_reviewers_teams", - skip_serializing_if = "Option::is_none" - )] - pub requested_reviewers_teams: Option>, - /// number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) - #[serde(rename = "review_comments", skip_serializing_if = "Option::is_none")] - pub review_comments: Option, - /// StateType issue state type - #[serde(rename = "state", skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, - #[serde(rename = "user", skip_serializing_if = "Option::is_none")] - pub user: Option>, -} - -impl PullRequest { - /// PullRequest represents a pull request - pub fn new() -> PullRequest { - PullRequest { - additions: None, - allow_maintainer_edit: None, - assignee: None, - assignees: None, - base: None, - body: None, - changed_files: None, - closed_at: None, - comments: None, - created_at: None, - deletions: None, - diff_url: None, - draft: None, - due_date: None, - flow: None, - head: None, - html_url: None, - id: None, - is_locked: None, - labels: None, - merge_base: None, - merge_commit_sha: None, - mergeable: None, - merged: None, - merged_at: None, - merged_by: None, - milestone: None, - number: None, - patch_url: None, - pin_order: None, - requested_reviewers: None, - requested_reviewers_teams: None, - review_comments: None, - state: None, - title: None, - updated_at: None, - url: None, - user: None, - } - } -} diff --git a/forgejo-openapi/src/models/pull_request_meta.rs b/forgejo-openapi/src/models/pull_request_meta.rs deleted file mode 100644 index 8126be9..0000000 --- a/forgejo-openapi/src/models/pull_request_meta.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PullRequestMeta : PullRequestMeta PR info if an issue is a PR -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PullRequestMeta { - #[serde(rename = "draft", skip_serializing_if = "Option::is_none")] - pub draft: Option, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "merged", skip_serializing_if = "Option::is_none")] - pub merged: Option, - #[serde(rename = "merged_at", skip_serializing_if = "Option::is_none")] - pub merged_at: Option, -} - -impl PullRequestMeta { - /// PullRequestMeta PR info if an issue is a PR - pub fn new() -> PullRequestMeta { - PullRequestMeta { - draft: None, - html_url: None, - merged: None, - merged_at: None, - } - } -} diff --git a/forgejo-openapi/src/models/pull_review.rs b/forgejo-openapi/src/models/pull_review.rs deleted file mode 100644 index 89083cf..0000000 --- a/forgejo-openapi/src/models/pull_review.rs +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PullReview : PullReview represents a pull request review -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PullReview { - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "comments_count", skip_serializing_if = "Option::is_none")] - pub comments_count: Option, - #[serde(rename = "commit_id", skip_serializing_if = "Option::is_none")] - pub commit_id: Option, - #[serde(rename = "dismissed", skip_serializing_if = "Option::is_none")] - pub dismissed: Option, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "official", skip_serializing_if = "Option::is_none")] - pub official: Option, - #[serde(rename = "pull_request_url", skip_serializing_if = "Option::is_none")] - pub pull_request_url: Option, - #[serde(rename = "stale", skip_serializing_if = "Option::is_none")] - pub stale: Option, - /// ReviewStateType review state type - #[serde(rename = "state", skip_serializing_if = "Option::is_none")] - pub state: Option, - #[serde(rename = "submitted_at", skip_serializing_if = "Option::is_none")] - pub submitted_at: Option, - #[serde(rename = "team", skip_serializing_if = "Option::is_none")] - pub team: Option>, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "user", skip_serializing_if = "Option::is_none")] - pub user: Option>, -} - -impl PullReview { - /// PullReview represents a pull request review - pub fn new() -> PullReview { - PullReview { - body: None, - comments_count: None, - commit_id: None, - dismissed: None, - html_url: None, - id: None, - official: None, - pull_request_url: None, - stale: None, - state: None, - submitted_at: None, - team: None, - updated_at: None, - user: None, - } - } -} diff --git a/forgejo-openapi/src/models/pull_review_comment.rs b/forgejo-openapi/src/models/pull_review_comment.rs deleted file mode 100644 index 8745d13..0000000 --- a/forgejo-openapi/src/models/pull_review_comment.rs +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PullReviewComment : PullReviewComment represents a comment on a pull request review -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PullReviewComment { - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "commit_id", skip_serializing_if = "Option::is_none")] - pub commit_id: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "diff_hunk", skip_serializing_if = "Option::is_none")] - pub diff_hunk: Option, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "original_commit_id", skip_serializing_if = "Option::is_none")] - pub original_commit_id: Option, - #[serde(rename = "original_position", skip_serializing_if = "Option::is_none")] - pub original_position: Option, - #[serde(rename = "path", skip_serializing_if = "Option::is_none")] - pub path: Option, - #[serde(rename = "position", skip_serializing_if = "Option::is_none")] - pub position: Option, - #[serde( - rename = "pull_request_review_id", - skip_serializing_if = "Option::is_none" - )] - pub pull_request_review_id: Option, - #[serde(rename = "pull_request_url", skip_serializing_if = "Option::is_none")] - pub pull_request_url: Option, - #[serde(rename = "resolver", skip_serializing_if = "Option::is_none")] - pub resolver: Option>, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "user", skip_serializing_if = "Option::is_none")] - pub user: Option>, -} - -impl PullReviewComment { - /// PullReviewComment represents a comment on a pull request review - pub fn new() -> PullReviewComment { - PullReviewComment { - body: None, - commit_id: None, - created_at: None, - diff_hunk: None, - html_url: None, - id: None, - original_commit_id: None, - original_position: None, - path: None, - position: None, - pull_request_review_id: None, - pull_request_url: None, - resolver: None, - updated_at: None, - user: None, - } - } -} diff --git a/forgejo-openapi/src/models/pull_review_request_options.rs b/forgejo-openapi/src/models/pull_review_request_options.rs deleted file mode 100644 index 3101cd5..0000000 --- a/forgejo-openapi/src/models/pull_review_request_options.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PullReviewRequestOptions : PullReviewRequestOptions are options to add or remove pull review requests -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PullReviewRequestOptions { - #[serde(rename = "reviewers", skip_serializing_if = "Option::is_none")] - pub reviewers: Option>, - #[serde(rename = "team_reviewers", skip_serializing_if = "Option::is_none")] - pub team_reviewers: Option>, -} - -impl PullReviewRequestOptions { - /// PullReviewRequestOptions are options to add or remove pull review requests - pub fn new() -> PullReviewRequestOptions { - PullReviewRequestOptions { - reviewers: None, - team_reviewers: None, - } - } -} diff --git a/forgejo-openapi/src/models/push_mirror.rs b/forgejo-openapi/src/models/push_mirror.rs deleted file mode 100644 index 424af76..0000000 --- a/forgejo-openapi/src/models/push_mirror.rs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// PushMirror : PushMirror represents information of a push mirror -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PushMirror { - #[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")] - pub branch_filter: Option, - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] - pub interval: Option, - #[serde(rename = "last_error", skip_serializing_if = "Option::is_none")] - pub last_error: Option, - #[serde(rename = "last_update", skip_serializing_if = "Option::is_none")] - pub last_update: Option, - #[serde(rename = "public_key", skip_serializing_if = "Option::is_none")] - pub public_key: Option, - #[serde(rename = "remote_address", skip_serializing_if = "Option::is_none")] - pub remote_address: Option, - #[serde(rename = "remote_name", skip_serializing_if = "Option::is_none")] - pub remote_name: Option, - #[serde(rename = "repo_name", skip_serializing_if = "Option::is_none")] - pub repo_name: Option, - #[serde(rename = "sync_on_commit", skip_serializing_if = "Option::is_none")] - pub sync_on_commit: Option, -} - -impl PushMirror { - /// PushMirror represents information of a push mirror - pub fn new() -> PushMirror { - PushMirror { - branch_filter: None, - created: None, - interval: None, - last_error: None, - last_update: None, - public_key: None, - remote_address: None, - remote_name: None, - repo_name: None, - sync_on_commit: None, - } - } -} diff --git a/forgejo-openapi/src/models/quota_group.rs b/forgejo-openapi/src/models/quota_group.rs deleted file mode 100644 index 435c3eb..0000000 --- a/forgejo-openapi/src/models/quota_group.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaGroup : QuotaGroup represents a quota group -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaGroup { - /// Name of the group - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// Rules associated with the group - #[serde(rename = "rules", skip_serializing_if = "Option::is_none")] - pub rules: Option>, -} - -impl QuotaGroup { - /// QuotaGroup represents a quota group - pub fn new() -> QuotaGroup { - QuotaGroup { - name: None, - rules: None, - } - } -} diff --git a/forgejo-openapi/src/models/quota_info.rs b/forgejo-openapi/src/models/quota_info.rs deleted file mode 100644 index 662d1e3..0000000 --- a/forgejo-openapi/src/models/quota_info.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaInfo : QuotaInfo represents information about a user's quota -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaInfo { - /// QuotaGroupList represents a list of quota groups - #[serde(rename = "groups", skip_serializing_if = "Option::is_none")] - pub groups: Option>, - #[serde(rename = "used", skip_serializing_if = "Option::is_none")] - pub used: Option>, -} - -impl QuotaInfo { - /// QuotaInfo represents information about a user's quota - pub fn new() -> QuotaInfo { - QuotaInfo { - groups: None, - used: None, - } - } -} diff --git a/forgejo-openapi/src/models/quota_rule_info.rs b/forgejo-openapi/src/models/quota_rule_info.rs deleted file mode 100644 index e1820b9..0000000 --- a/forgejo-openapi/src/models/quota_rule_info.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaRuleInfo : QuotaRuleInfo contains information about a quota rule -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaRuleInfo { - /// The limit set by the rule - #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] - pub limit: Option, - /// Name of the rule (only shown to admins) - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// Subjects the rule affects - #[serde(rename = "subjects", skip_serializing_if = "Option::is_none")] - pub subjects: Option>, -} - -impl QuotaRuleInfo { - /// QuotaRuleInfo contains information about a quota rule - pub fn new() -> QuotaRuleInfo { - QuotaRuleInfo { - limit: None, - name: None, - subjects: None, - } - } -} diff --git a/forgejo-openapi/src/models/quota_used.rs b/forgejo-openapi/src/models/quota_used.rs deleted file mode 100644 index c114413..0000000 --- a/forgejo-openapi/src/models/quota_used.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaUsed : QuotaUsed represents the quota usage of a user -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaUsed { - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option>, -} - -impl QuotaUsed { - /// QuotaUsed represents the quota usage of a user - pub fn new() -> QuotaUsed { - QuotaUsed { size: None } - } -} diff --git a/forgejo-openapi/src/models/quota_used_artifact.rs b/forgejo-openapi/src/models/quota_used_artifact.rs deleted file mode 100644 index b985e26..0000000 --- a/forgejo-openapi/src/models/quota_used_artifact.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaUsedArtifact : QuotaUsedArtifact represents an artifact counting towards a user's quota -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaUsedArtifact { - /// HTML URL to the action run containing the artifact - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - /// Name of the artifact - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// Size of the artifact (compressed) - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, -} - -impl QuotaUsedArtifact { - /// QuotaUsedArtifact represents an artifact counting towards a user's quota - pub fn new() -> QuotaUsedArtifact { - QuotaUsedArtifact { - html_url: None, - name: None, - size: None, - } - } -} diff --git a/forgejo-openapi/src/models/quota_used_attachment.rs b/forgejo-openapi/src/models/quota_used_attachment.rs deleted file mode 100644 index 4e5683c..0000000 --- a/forgejo-openapi/src/models/quota_used_attachment.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaUsedAttachment : QuotaUsedAttachment represents an attachment counting towards a user's quota -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaUsedAttachment { - /// API URL for the attachment - #[serde(rename = "api_url", skip_serializing_if = "Option::is_none")] - pub api_url: Option, - #[serde(rename = "contained_in", skip_serializing_if = "Option::is_none")] - pub contained_in: Option>, - /// Filename of the attachment - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// Size of the attachment (in bytes) - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, -} - -impl QuotaUsedAttachment { - /// QuotaUsedAttachment represents an attachment counting towards a user's quota - pub fn new() -> QuotaUsedAttachment { - QuotaUsedAttachment { - api_url: None, - contained_in: None, - name: None, - size: None, - } - } -} diff --git a/forgejo-openapi/src/models/quota_used_attachment_contained_in.rs b/forgejo-openapi/src/models/quota_used_attachment_contained_in.rs deleted file mode 100644 index acb96a9..0000000 --- a/forgejo-openapi/src/models/quota_used_attachment_contained_in.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaUsedAttachmentContainedIn : Context for the attachment: URLs to the containing object -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaUsedAttachmentContainedIn { - /// API URL for the object that contains this attachment - #[serde(rename = "api_url", skip_serializing_if = "Option::is_none")] - pub api_url: Option, - /// HTML URL for the object that contains this attachment - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, -} - -impl QuotaUsedAttachmentContainedIn { - /// Context for the attachment: URLs to the containing object - pub fn new() -> QuotaUsedAttachmentContainedIn { - QuotaUsedAttachmentContainedIn { - api_url: None, - html_url: None, - } - } -} diff --git a/forgejo-openapi/src/models/quota_used_package.rs b/forgejo-openapi/src/models/quota_used_package.rs deleted file mode 100644 index 0273827..0000000 --- a/forgejo-openapi/src/models/quota_used_package.rs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaUsedPackage : QuotaUsedPackage represents a package counting towards a user's quota -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaUsedPackage { - /// HTML URL to the package version - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - /// Name of the package - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// Size of the package version - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, - /// Type of the package - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - /// Version of the package - #[serde(rename = "version", skip_serializing_if = "Option::is_none")] - pub version: Option, -} - -impl QuotaUsedPackage { - /// QuotaUsedPackage represents a package counting towards a user's quota - pub fn new() -> QuotaUsedPackage { - QuotaUsedPackage { - html_url: None, - name: None, - size: None, - r#type: None, - version: None, - } - } -} diff --git a/forgejo-openapi/src/models/quota_used_size.rs b/forgejo-openapi/src/models/quota_used_size.rs deleted file mode 100644 index b11174c..0000000 --- a/forgejo-openapi/src/models/quota_used_size.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaUsedSize : QuotaUsedSize represents the size-based quota usage of a user -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaUsedSize { - #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] - pub assets: Option>, - #[serde(rename = "git", skip_serializing_if = "Option::is_none")] - pub git: Option>, - #[serde(rename = "repos", skip_serializing_if = "Option::is_none")] - pub repos: Option>, -} - -impl QuotaUsedSize { - /// QuotaUsedSize represents the size-based quota usage of a user - pub fn new() -> QuotaUsedSize { - QuotaUsedSize { - assets: None, - git: None, - repos: None, - } - } -} diff --git a/forgejo-openapi/src/models/quota_used_size_assets.rs b/forgejo-openapi/src/models/quota_used_size_assets.rs deleted file mode 100644 index 29271cd..0000000 --- a/forgejo-openapi/src/models/quota_used_size_assets.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaUsedSizeAssets : QuotaUsedSizeAssets represents the size-based asset usage of a user -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaUsedSizeAssets { - /// Storage size used for the user's artifacts - #[serde(rename = "artifacts", skip_serializing_if = "Option::is_none")] - pub artifacts: Option, - #[serde(rename = "attachments", skip_serializing_if = "Option::is_none")] - pub attachments: Option>, - #[serde(rename = "packages", skip_serializing_if = "Option::is_none")] - pub packages: Option>, -} - -impl QuotaUsedSizeAssets { - /// QuotaUsedSizeAssets represents the size-based asset usage of a user - pub fn new() -> QuotaUsedSizeAssets { - QuotaUsedSizeAssets { - artifacts: None, - attachments: None, - packages: None, - } - } -} diff --git a/forgejo-openapi/src/models/quota_used_size_assets_attachments.rs b/forgejo-openapi/src/models/quota_used_size_assets_attachments.rs deleted file mode 100644 index 279d251..0000000 --- a/forgejo-openapi/src/models/quota_used_size_assets_attachments.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaUsedSizeAssetsAttachments : QuotaUsedSizeAssetsAttachments represents the size-based attachment quota usage of a user -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaUsedSizeAssetsAttachments { - /// Storage size used for the user's issue & comment attachments - #[serde(rename = "issues", skip_serializing_if = "Option::is_none")] - pub issues: Option, - /// Storage size used for the user's release attachments - #[serde(rename = "releases", skip_serializing_if = "Option::is_none")] - pub releases: Option, -} - -impl QuotaUsedSizeAssetsAttachments { - /// QuotaUsedSizeAssetsAttachments represents the size-based attachment quota usage of a user - pub fn new() -> QuotaUsedSizeAssetsAttachments { - QuotaUsedSizeAssetsAttachments { - issues: None, - releases: None, - } - } -} diff --git a/forgejo-openapi/src/models/quota_used_size_assets_packages.rs b/forgejo-openapi/src/models/quota_used_size_assets_packages.rs deleted file mode 100644 index ee0eefb..0000000 --- a/forgejo-openapi/src/models/quota_used_size_assets_packages.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaUsedSizeAssetsPackages : QuotaUsedSizeAssetsPackages represents the size-based package quota usage of a user -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaUsedSizeAssetsPackages { - /// Storage suze used for the user's packages - #[serde(rename = "all", skip_serializing_if = "Option::is_none")] - pub all: Option, -} - -impl QuotaUsedSizeAssetsPackages { - /// QuotaUsedSizeAssetsPackages represents the size-based package quota usage of a user - pub fn new() -> QuotaUsedSizeAssetsPackages { - QuotaUsedSizeAssetsPackages { all: None } - } -} diff --git a/forgejo-openapi/src/models/quota_used_size_git.rs b/forgejo-openapi/src/models/quota_used_size_git.rs deleted file mode 100644 index eb41a1b..0000000 --- a/forgejo-openapi/src/models/quota_used_size_git.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaUsedSizeGit : QuotaUsedSizeGit represents the size-based git (lfs) quota usage of a user -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaUsedSizeGit { - /// Storage size of the user's Git LFS objects - #[serde(rename = "LFS", skip_serializing_if = "Option::is_none")] - pub lfs: Option, -} - -impl QuotaUsedSizeGit { - /// QuotaUsedSizeGit represents the size-based git (lfs) quota usage of a user - pub fn new() -> QuotaUsedSizeGit { - QuotaUsedSizeGit { lfs: None } - } -} diff --git a/forgejo-openapi/src/models/quota_used_size_repos.rs b/forgejo-openapi/src/models/quota_used_size_repos.rs deleted file mode 100644 index 422f734..0000000 --- a/forgejo-openapi/src/models/quota_used_size_repos.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// QuotaUsedSizeRepos : QuotaUsedSizeRepos represents the size-based repository quota usage of a user -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct QuotaUsedSizeRepos { - /// Storage size of the user's private repositories - #[serde(rename = "private", skip_serializing_if = "Option::is_none")] - pub private: Option, - /// Storage size of the user's public repositories - #[serde(rename = "public", skip_serializing_if = "Option::is_none")] - pub public: Option, -} - -impl QuotaUsedSizeRepos { - /// QuotaUsedSizeRepos represents the size-based repository quota usage of a user - pub fn new() -> QuotaUsedSizeRepos { - QuotaUsedSizeRepos { - private: None, - public: None, - } - } -} diff --git a/forgejo-openapi/src/models/reaction.rs b/forgejo-openapi/src/models/reaction.rs deleted file mode 100644 index 1f0af87..0000000 --- a/forgejo-openapi/src/models/reaction.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Reaction : Reaction contain one reaction -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Reaction { - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "user", skip_serializing_if = "Option::is_none")] - pub user: Option>, -} - -impl Reaction { - /// Reaction contain one reaction - pub fn new() -> Reaction { - Reaction { - content: None, - created_at: None, - user: None, - } - } -} diff --git a/forgejo-openapi/src/models/reference.rs b/forgejo-openapi/src/models/reference.rs deleted file mode 100644 index 35582be..0000000 --- a/forgejo-openapi/src/models/reference.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Reference { - #[serde(rename = "object", skip_serializing_if = "Option::is_none")] - pub object: Option>, - #[serde(rename = "ref", skip_serializing_if = "Option::is_none")] - pub r#ref: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl Reference { - pub fn new() -> Reference { - Reference { - object: None, - r#ref: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/registration_token.rs b/forgejo-openapi/src/models/registration_token.rs deleted file mode 100644 index ce21428..0000000 --- a/forgejo-openapi/src/models/registration_token.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// RegistrationToken : RegistrationToken is a string used to register a runner with a server -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RegistrationToken { - #[serde(rename = "token", skip_serializing_if = "Option::is_none")] - pub token: Option, -} - -impl RegistrationToken { - /// RegistrationToken is a string used to register a runner with a server - pub fn new() -> RegistrationToken { - RegistrationToken { token: None } - } -} diff --git a/forgejo-openapi/src/models/release.rs b/forgejo-openapi/src/models/release.rs deleted file mode 100644 index 7e2e06e..0000000 --- a/forgejo-openapi/src/models/release.rs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Release : Release represents a repository release -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Release { - #[serde( - rename = "archive_download_count", - skip_serializing_if = "Option::is_none" - )] - pub archive_download_count: Option>, - #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] - pub assets: Option>, - #[serde(rename = "author", skip_serializing_if = "Option::is_none")] - pub author: Option>, - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "draft", skip_serializing_if = "Option::is_none")] - pub draft: Option, - #[serde(rename = "hide_archive_links", skip_serializing_if = "Option::is_none")] - pub hide_archive_links: Option, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "prerelease", skip_serializing_if = "Option::is_none")] - pub prerelease: Option, - #[serde(rename = "published_at", skip_serializing_if = "Option::is_none")] - pub published_at: Option, - #[serde(rename = "tag_name", skip_serializing_if = "Option::is_none")] - pub tag_name: Option, - #[serde(rename = "tarball_url", skip_serializing_if = "Option::is_none")] - pub tarball_url: Option, - #[serde(rename = "target_commitish", skip_serializing_if = "Option::is_none")] - pub target_commitish: Option, - #[serde(rename = "upload_url", skip_serializing_if = "Option::is_none")] - pub upload_url: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, - #[serde(rename = "zipball_url", skip_serializing_if = "Option::is_none")] - pub zipball_url: Option, -} - -impl Release { - /// Release represents a repository release - pub fn new() -> Release { - Release { - archive_download_count: None, - assets: None, - author: None, - body: None, - created_at: None, - draft: None, - hide_archive_links: None, - html_url: None, - id: None, - name: None, - prerelease: None, - published_at: None, - tag_name: None, - tarball_url: None, - target_commitish: None, - upload_url: None, - url: None, - zipball_url: None, - } - } -} diff --git a/forgejo-openapi/src/models/rename_org_option.rs b/forgejo-openapi/src/models/rename_org_option.rs deleted file mode 100644 index b86f223..0000000 --- a/forgejo-openapi/src/models/rename_org_option.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// RenameOrgOption : RenameOrgOption options when renaming an organization -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RenameOrgOption { - /// New username for this org. This name cannot be in use yet by any other user. - #[serde(rename = "new_name")] - pub new_name: String, -} - -impl RenameOrgOption { - /// RenameOrgOption options when renaming an organization - pub fn new(new_name: String) -> RenameOrgOption { - RenameOrgOption { new_name } - } -} diff --git a/forgejo-openapi/src/models/rename_user_option.rs b/forgejo-openapi/src/models/rename_user_option.rs deleted file mode 100644 index 7aa392f..0000000 --- a/forgejo-openapi/src/models/rename_user_option.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// RenameUserOption : RenameUserOption options when renaming a user -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RenameUserOption { - /// New username for this user. This name cannot be in use yet by any other user. - #[serde(rename = "new_username")] - pub new_username: String, -} - -impl RenameUserOption { - /// RenameUserOption options when renaming a user - pub fn new(new_username: String) -> RenameUserOption { - RenameUserOption { new_username } - } -} diff --git a/forgejo-openapi/src/models/replace_flags_option.rs b/forgejo-openapi/src/models/replace_flags_option.rs deleted file mode 100644 index ba93e92..0000000 --- a/forgejo-openapi/src/models/replace_flags_option.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ReplaceFlagsOption : ReplaceFlagsOption options when replacing the flags of a repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ReplaceFlagsOption { - #[serde(rename = "flags", skip_serializing_if = "Option::is_none")] - pub flags: Option>, -} - -impl ReplaceFlagsOption { - /// ReplaceFlagsOption options when replacing the flags of a repository - pub fn new() -> ReplaceFlagsOption { - ReplaceFlagsOption { flags: None } - } -} diff --git a/forgejo-openapi/src/models/repo_collaborator_permission.rs b/forgejo-openapi/src/models/repo_collaborator_permission.rs deleted file mode 100644 index 1bda2e1..0000000 --- a/forgejo-openapi/src/models/repo_collaborator_permission.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// RepoCollaboratorPermission : RepoCollaboratorPermission to get repository permission for a collaborator -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RepoCollaboratorPermission { - #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] - pub permission: Option, - #[serde(rename = "role_name", skip_serializing_if = "Option::is_none")] - pub role_name: Option, - #[serde(rename = "user", skip_serializing_if = "Option::is_none")] - pub user: Option>, -} - -impl RepoCollaboratorPermission { - /// RepoCollaboratorPermission to get repository permission for a collaborator - pub fn new() -> RepoCollaboratorPermission { - RepoCollaboratorPermission { - permission: None, - role_name: None, - user: None, - } - } -} diff --git a/forgejo-openapi/src/models/repo_commit.rs b/forgejo-openapi/src/models/repo_commit.rs deleted file mode 100644 index f59533e..0000000 --- a/forgejo-openapi/src/models/repo_commit.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RepoCommit { - #[serde(rename = "author", skip_serializing_if = "Option::is_none")] - pub author: Option>, - #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] - pub committer: Option>, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "tree", skip_serializing_if = "Option::is_none")] - pub tree: Option>, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, -} - -impl RepoCommit { - pub fn new() -> RepoCommit { - RepoCommit { - author: None, - committer: None, - message: None, - tree: None, - url: None, - verification: None, - } - } -} diff --git a/forgejo-openapi/src/models/repo_create_release_attachment_request.rs b/forgejo-openapi/src/models/repo_create_release_attachment_request.rs deleted file mode 100644 index ebeee2e..0000000 --- a/forgejo-openapi/src/models/repo_create_release_attachment_request.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RepoCreateReleaseAttachmentRequest { - /// attachment to upload (this parameter is incompatible with `external_url`) - #[serde(rename = "attachment", skip_serializing_if = "Option::is_none")] - pub attachment: Option, - /// url to external asset (this parameter is incompatible with `attachment`) - #[serde(rename = "external_url", skip_serializing_if = "Option::is_none")] - pub external_url: Option, -} - -impl RepoCreateReleaseAttachmentRequest { - pub fn new() -> RepoCreateReleaseAttachmentRequest { - RepoCreateReleaseAttachmentRequest { - attachment: None, - external_url: None, - } - } -} diff --git a/forgejo-openapi/src/models/repo_topic_options.rs b/forgejo-openapi/src/models/repo_topic_options.rs deleted file mode 100644 index c3d3428..0000000 --- a/forgejo-openapi/src/models/repo_topic_options.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// RepoTopicOptions : RepoTopicOptions a collection of repo topic names -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RepoTopicOptions { - /// list of topic names - #[serde(rename = "topics", skip_serializing_if = "Option::is_none")] - pub topics: Option>, -} - -impl RepoTopicOptions { - /// RepoTopicOptions a collection of repo topic names - pub fn new() -> RepoTopicOptions { - RepoTopicOptions { topics: None } - } -} diff --git a/forgejo-openapi/src/models/repo_transfer.rs b/forgejo-openapi/src/models/repo_transfer.rs deleted file mode 100644 index 808fb80..0000000 --- a/forgejo-openapi/src/models/repo_transfer.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// RepoTransfer : RepoTransfer represents a pending repo transfer -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RepoTransfer { - #[serde(rename = "doer", skip_serializing_if = "Option::is_none")] - pub doer: Option>, - #[serde(rename = "recipient", skip_serializing_if = "Option::is_none")] - pub recipient: Option>, - #[serde(rename = "teams", skip_serializing_if = "Option::is_none")] - pub teams: Option>, -} - -impl RepoTransfer { - /// RepoTransfer represents a pending repo transfer - pub fn new() -> RepoTransfer { - RepoTransfer { - doer: None, - recipient: None, - teams: None, - } - } -} diff --git a/forgejo-openapi/src/models/repository.rs b/forgejo-openapi/src/models/repository.rs deleted file mode 100644 index da06a59..0000000 --- a/forgejo-openapi/src/models/repository.rs +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Repository : Repository represents a repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Repository { - #[serde( - rename = "allow_fast_forward_only_merge", - skip_serializing_if = "Option::is_none" - )] - pub allow_fast_forward_only_merge: Option, - #[serde( - rename = "allow_merge_commits", - skip_serializing_if = "Option::is_none" - )] - pub allow_merge_commits: Option, - #[serde(rename = "allow_rebase", skip_serializing_if = "Option::is_none")] - pub allow_rebase: Option, - #[serde( - rename = "allow_rebase_explicit", - skip_serializing_if = "Option::is_none" - )] - pub allow_rebase_explicit: Option, - #[serde( - rename = "allow_rebase_update", - skip_serializing_if = "Option::is_none" - )] - pub allow_rebase_update: Option, - #[serde(rename = "allow_squash_merge", skip_serializing_if = "Option::is_none")] - pub allow_squash_merge: Option, - #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] - pub archived: Option, - #[serde(rename = "archived_at", skip_serializing_if = "Option::is_none")] - pub archived_at: Option, - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - #[serde(rename = "clone_url", skip_serializing_if = "Option::is_none")] - pub clone_url: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde( - rename = "default_allow_maintainer_edit", - skip_serializing_if = "Option::is_none" - )] - pub default_allow_maintainer_edit: Option, - #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] - pub default_branch: Option, - #[serde( - rename = "default_delete_branch_after_merge", - skip_serializing_if = "Option::is_none" - )] - pub default_delete_branch_after_merge: Option, - #[serde( - rename = "default_merge_style", - skip_serializing_if = "Option::is_none" - )] - pub default_merge_style: Option, - #[serde( - rename = "default_update_style", - skip_serializing_if = "Option::is_none" - )] - pub default_update_style: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "empty", skip_serializing_if = "Option::is_none")] - pub empty: Option, - #[serde(rename = "external_tracker", skip_serializing_if = "Option::is_none")] - pub external_tracker: Option>, - #[serde(rename = "external_wiki", skip_serializing_if = "Option::is_none")] - pub external_wiki: Option>, - #[serde(rename = "fork", skip_serializing_if = "Option::is_none")] - pub fork: Option, - #[serde(rename = "forks_count", skip_serializing_if = "Option::is_none")] - pub forks_count: Option, - #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] - pub full_name: Option, - #[serde( - rename = "globally_editable_wiki", - skip_serializing_if = "Option::is_none" - )] - pub globally_editable_wiki: Option, - #[serde(rename = "has_actions", skip_serializing_if = "Option::is_none")] - pub has_actions: Option, - #[serde(rename = "has_issues", skip_serializing_if = "Option::is_none")] - pub has_issues: Option, - #[serde(rename = "has_packages", skip_serializing_if = "Option::is_none")] - pub has_packages: Option, - #[serde(rename = "has_projects", skip_serializing_if = "Option::is_none")] - pub has_projects: Option, - #[serde(rename = "has_pull_requests", skip_serializing_if = "Option::is_none")] - pub has_pull_requests: Option, - #[serde(rename = "has_releases", skip_serializing_if = "Option::is_none")] - pub has_releases: Option, - #[serde(rename = "has_wiki", skip_serializing_if = "Option::is_none")] - pub has_wiki: Option, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde( - rename = "ignore_whitespace_conflicts", - skip_serializing_if = "Option::is_none" - )] - pub ignore_whitespace_conflicts: Option, - #[serde(rename = "internal", skip_serializing_if = "Option::is_none")] - pub internal: Option, - #[serde(rename = "internal_tracker", skip_serializing_if = "Option::is_none")] - pub internal_tracker: Option>, - #[serde(rename = "language", skip_serializing_if = "Option::is_none")] - pub language: Option, - #[serde(rename = "languages_url", skip_serializing_if = "Option::is_none")] - pub languages_url: Option, - #[serde(rename = "link", skip_serializing_if = "Option::is_none")] - pub link: Option, - #[serde(rename = "mirror", skip_serializing_if = "Option::is_none")] - pub mirror: Option, - #[serde(rename = "mirror_interval", skip_serializing_if = "Option::is_none")] - pub mirror_interval: Option, - #[serde(rename = "mirror_updated", skip_serializing_if = "Option::is_none")] - pub mirror_updated: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// ObjectFormatName of the underlying git repository - #[serde(rename = "object_format_name", skip_serializing_if = "Option::is_none")] - pub object_format_name: Option, - #[serde(rename = "open_issues_count", skip_serializing_if = "Option::is_none")] - pub open_issues_count: Option, - #[serde(rename = "open_pr_counter", skip_serializing_if = "Option::is_none")] - pub open_pr_counter: Option, - #[serde(rename = "original_url", skip_serializing_if = "Option::is_none")] - pub original_url: Option, - #[serde(rename = "owner", skip_serializing_if = "Option::is_none")] - pub owner: Option>, - #[serde(rename = "parent", skip_serializing_if = "Option::is_none")] - pub parent: Option>, - #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")] - pub permissions: Option>, - #[serde(rename = "private", skip_serializing_if = "Option::is_none")] - pub private: Option, - #[serde(rename = "release_counter", skip_serializing_if = "Option::is_none")] - pub release_counter: Option, - #[serde(rename = "repo_transfer", skip_serializing_if = "Option::is_none")] - pub repo_transfer: Option>, - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, - #[serde(rename = "ssh_url", skip_serializing_if = "Option::is_none")] - pub ssh_url: Option, - #[serde(rename = "stars_count", skip_serializing_if = "Option::is_none")] - pub stars_count: Option, - #[serde(rename = "template", skip_serializing_if = "Option::is_none")] - pub template: Option, - #[serde(rename = "topics", skip_serializing_if = "Option::is_none")] - pub topics: Option>, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, - #[serde(rename = "watchers_count", skip_serializing_if = "Option::is_none")] - pub watchers_count: Option, - #[serde(rename = "website", skip_serializing_if = "Option::is_none")] - pub website: Option, - #[serde(rename = "wiki_branch", skip_serializing_if = "Option::is_none")] - pub wiki_branch: Option, -} - -impl Repository { - /// Repository represents a repository - pub fn new() -> Repository { - Repository { - allow_fast_forward_only_merge: None, - allow_merge_commits: None, - allow_rebase: None, - allow_rebase_explicit: None, - allow_rebase_update: None, - allow_squash_merge: None, - archived: None, - archived_at: None, - avatar_url: None, - clone_url: None, - created_at: None, - default_allow_maintainer_edit: None, - default_branch: None, - default_delete_branch_after_merge: None, - default_merge_style: None, - default_update_style: None, - description: None, - empty: None, - external_tracker: None, - external_wiki: None, - fork: None, - forks_count: None, - full_name: None, - globally_editable_wiki: None, - has_actions: None, - has_issues: None, - has_packages: None, - has_projects: None, - has_pull_requests: None, - has_releases: None, - has_wiki: None, - html_url: None, - id: None, - ignore_whitespace_conflicts: None, - internal: None, - internal_tracker: None, - language: None, - languages_url: None, - link: None, - mirror: None, - mirror_interval: None, - mirror_updated: None, - name: None, - object_format_name: None, - open_issues_count: None, - open_pr_counter: None, - original_url: None, - owner: None, - parent: None, - permissions: None, - private: None, - release_counter: None, - repo_transfer: None, - size: None, - ssh_url: None, - stars_count: None, - template: None, - topics: None, - updated_at: None, - url: None, - watchers_count: None, - website: None, - wiki_branch: None, - } - } -} -/// ObjectFormatName of the underlying git repository -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ObjectFormatName { - #[serde(rename = "sha1")] - Sha1, - #[serde(rename = "sha256")] - Sha256, -} - -impl Default for ObjectFormatName { - fn default() -> ObjectFormatName { - Self::Sha1 - } -} diff --git a/forgejo-openapi/src/models/repository_meta.rs b/forgejo-openapi/src/models/repository_meta.rs deleted file mode 100644 index 99bfeef..0000000 --- a/forgejo-openapi/src/models/repository_meta.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// RepositoryMeta : RepositoryMeta basic repository information -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RepositoryMeta { - #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] - pub full_name: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "owner", skip_serializing_if = "Option::is_none")] - pub owner: Option, -} - -impl RepositoryMeta { - /// RepositoryMeta basic repository information - pub fn new() -> RepositoryMeta { - RepositoryMeta { - full_name: None, - id: None, - name: None, - owner: None, - } - } -} diff --git a/forgejo-openapi/src/models/search_results.rs b/forgejo-openapi/src/models/search_results.rs deleted file mode 100644 index c9d7fa0..0000000 --- a/forgejo-openapi/src/models/search_results.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// SearchResults : SearchResults results of a successful search -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SearchResults { - #[serde(rename = "data", skip_serializing_if = "Option::is_none")] - pub data: Option>, - #[serde(rename = "ok", skip_serializing_if = "Option::is_none")] - pub ok: Option, -} - -impl SearchResults { - /// SearchResults results of a successful search - pub fn new() -> SearchResults { - SearchResults { - data: None, - ok: None, - } - } -} diff --git a/forgejo-openapi/src/models/secret.rs b/forgejo-openapi/src/models/secret.rs deleted file mode 100644 index 5f18c8e..0000000 --- a/forgejo-openapi/src/models/secret.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Secret : Secret represents a secret -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Secret { - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - /// the secret's name - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, -} - -impl Secret { - /// Secret represents a secret - pub fn new() -> Secret { - Secret { - created_at: None, - name: None, - } - } -} diff --git a/forgejo-openapi/src/models/server_version.rs b/forgejo-openapi/src/models/server_version.rs deleted file mode 100644 index 08c6123..0000000 --- a/forgejo-openapi/src/models/server_version.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// ServerVersion : ServerVersion wraps the version of the server -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ServerVersion { - #[serde(rename = "version", skip_serializing_if = "Option::is_none")] - pub version: Option, -} - -impl ServerVersion { - /// ServerVersion wraps the version of the server - pub fn new() -> ServerVersion { - ServerVersion { version: None } - } -} diff --git a/forgejo-openapi/src/models/set_user_quota_groups_options.rs b/forgejo-openapi/src/models/set_user_quota_groups_options.rs deleted file mode 100644 index e6a4080..0000000 --- a/forgejo-openapi/src/models/set_user_quota_groups_options.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// SetUserQuotaGroupsOptions : SetUserQuotaGroupsOptions represents the quota groups of a user -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SetUserQuotaGroupsOptions { - /// Quota groups the user shall have - #[serde(rename = "groups")] - pub groups: Vec, -} - -impl SetUserQuotaGroupsOptions { - /// SetUserQuotaGroupsOptions represents the quota groups of a user - pub fn new(groups: Vec) -> SetUserQuotaGroupsOptions { - SetUserQuotaGroupsOptions { groups } - } -} diff --git a/forgejo-openapi/src/models/stop_watch.rs b/forgejo-openapi/src/models/stop_watch.rs deleted file mode 100644 index b581fe9..0000000 --- a/forgejo-openapi/src/models/stop_watch.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// StopWatch : StopWatch represent a running stopwatch -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StopWatch { - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - #[serde(rename = "duration", skip_serializing_if = "Option::is_none")] - pub duration: Option, - #[serde(rename = "issue_index", skip_serializing_if = "Option::is_none")] - pub issue_index: Option, - #[serde(rename = "issue_title", skip_serializing_if = "Option::is_none")] - pub issue_title: Option, - #[serde(rename = "repo_name", skip_serializing_if = "Option::is_none")] - pub repo_name: Option, - #[serde(rename = "repo_owner_name", skip_serializing_if = "Option::is_none")] - pub repo_owner_name: Option, - #[serde(rename = "seconds", skip_serializing_if = "Option::is_none")] - pub seconds: Option, -} - -impl StopWatch { - /// StopWatch represent a running stopwatch - pub fn new() -> StopWatch { - StopWatch { - created: None, - duration: None, - issue_index: None, - issue_title: None, - repo_name: None, - repo_owner_name: None, - seconds: None, - } - } -} diff --git a/forgejo-openapi/src/models/submit_pull_review_options.rs b/forgejo-openapi/src/models/submit_pull_review_options.rs deleted file mode 100644 index 85b7f1b..0000000 --- a/forgejo-openapi/src/models/submit_pull_review_options.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// SubmitPullReviewOptions : SubmitPullReviewOptions are options to submit a pending pull review -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SubmitPullReviewOptions { - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - /// ReviewStateType review state type - #[serde(rename = "event", skip_serializing_if = "Option::is_none")] - pub event: Option, -} - -impl SubmitPullReviewOptions { - /// SubmitPullReviewOptions are options to submit a pending pull review - pub fn new() -> SubmitPullReviewOptions { - SubmitPullReviewOptions { - body: None, - event: None, - } - } -} diff --git a/forgejo-openapi/src/models/sync_fork_info.rs b/forgejo-openapi/src/models/sync_fork_info.rs deleted file mode 100644 index c55d02f..0000000 --- a/forgejo-openapi/src/models/sync_fork_info.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// SyncForkInfo : SyncForkInfo information about syncing a fork -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SyncForkInfo { - #[serde(rename = "allowed", skip_serializing_if = "Option::is_none")] - pub allowed: Option, - #[serde(rename = "base_commit", skip_serializing_if = "Option::is_none")] - pub base_commit: Option, - #[serde(rename = "commits_behind", skip_serializing_if = "Option::is_none")] - pub commits_behind: Option, - #[serde(rename = "fork_commit", skip_serializing_if = "Option::is_none")] - pub fork_commit: Option, -} - -impl SyncForkInfo { - /// SyncForkInfo information about syncing a fork - pub fn new() -> SyncForkInfo { - SyncForkInfo { - allowed: None, - base_commit: None, - commits_behind: None, - fork_commit: None, - } - } -} diff --git a/forgejo-openapi/src/models/tag.rs b/forgejo-openapi/src/models/tag.rs deleted file mode 100644 index 9be8816..0000000 --- a/forgejo-openapi/src/models/tag.rs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Tag : Tag represents a repository tag -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Tag { - #[serde( - rename = "archive_download_count", - skip_serializing_if = "Option::is_none" - )] - pub archive_download_count: Option>, - #[serde(rename = "commit", skip_serializing_if = "Option::is_none")] - pub commit: Option>, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "tarball_url", skip_serializing_if = "Option::is_none")] - pub tarball_url: Option, - #[serde(rename = "zipball_url", skip_serializing_if = "Option::is_none")] - pub zipball_url: Option, -} - -impl Tag { - /// Tag represents a repository tag - pub fn new() -> Tag { - Tag { - archive_download_count: None, - commit: None, - id: None, - message: None, - name: None, - tarball_url: None, - zipball_url: None, - } - } -} diff --git a/forgejo-openapi/src/models/tag_archive_download_count.rs b/forgejo-openapi/src/models/tag_archive_download_count.rs deleted file mode 100644 index a8a0e11..0000000 --- a/forgejo-openapi/src/models/tag_archive_download_count.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// TagArchiveDownloadCount : TagArchiveDownloadCount counts how many times a archive was downloaded -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TagArchiveDownloadCount { - #[serde(rename = "tar_gz", skip_serializing_if = "Option::is_none")] - pub tar_gz: Option, - #[serde(rename = "zip", skip_serializing_if = "Option::is_none")] - pub zip: Option, -} - -impl TagArchiveDownloadCount { - /// TagArchiveDownloadCount counts how many times a archive was downloaded - pub fn new() -> TagArchiveDownloadCount { - TagArchiveDownloadCount { - tar_gz: None, - zip: None, - } - } -} diff --git a/forgejo-openapi/src/models/tag_protection.rs b/forgejo-openapi/src/models/tag_protection.rs deleted file mode 100644 index 00dda1c..0000000 --- a/forgejo-openapi/src/models/tag_protection.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// TagProtection : TagProtection represents a tag protection -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TagProtection { - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "name_pattern", skip_serializing_if = "Option::is_none")] - pub name_pattern: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "whitelist_teams", skip_serializing_if = "Option::is_none")] - pub whitelist_teams: Option>, - #[serde( - rename = "whitelist_usernames", - skip_serializing_if = "Option::is_none" - )] - pub whitelist_usernames: Option>, -} - -impl TagProtection { - /// TagProtection represents a tag protection - pub fn new() -> TagProtection { - TagProtection { - created_at: None, - id: None, - name_pattern: None, - updated_at: None, - whitelist_teams: None, - whitelist_usernames: None, - } - } -} diff --git a/forgejo-openapi/src/models/team.rs b/forgejo-openapi/src/models/team.rs deleted file mode 100644 index f2ef1b5..0000000 --- a/forgejo-openapi/src/models/team.rs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// Team : Team represents a team in an organization -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Team { - #[serde( - rename = "can_create_org_repo", - skip_serializing_if = "Option::is_none" - )] - pub can_create_org_repo: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde( - rename = "includes_all_repositories", - skip_serializing_if = "Option::is_none" - )] - pub includes_all_repositories: Option, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "organization", skip_serializing_if = "Option::is_none")] - pub organization: Option>, - #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] - pub permission: Option, - #[serde(rename = "units", skip_serializing_if = "Option::is_none")] - pub units: Option>, - #[serde(rename = "units_map", skip_serializing_if = "Option::is_none")] - pub units_map: Option>, -} - -impl Team { - /// Team represents a team in an organization - pub fn new() -> Team { - Team { - can_create_org_repo: None, - description: None, - id: None, - includes_all_repositories: None, - name: None, - organization: None, - permission: None, - units: None, - units_map: None, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Permission { - #[serde(rename = "none")] - None, - #[serde(rename = "read")] - Read, - #[serde(rename = "write")] - Write, - #[serde(rename = "admin")] - Admin, - #[serde(rename = "owner")] - Owner, -} - -impl Default for Permission { - fn default() -> Permission { - Self::None - } -} diff --git a/forgejo-openapi/src/models/team_search_results.rs b/forgejo-openapi/src/models/team_search_results.rs deleted file mode 100644 index 8961daf..0000000 --- a/forgejo-openapi/src/models/team_search_results.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TeamSearchResults { - #[serde(rename = "data", skip_serializing_if = "Option::is_none")] - pub data: Option>, - #[serde(rename = "ok", skip_serializing_if = "Option::is_none")] - pub ok: Option, -} - -impl TeamSearchResults { - pub fn new() -> TeamSearchResults { - TeamSearchResults { - data: None, - ok: None, - } - } -} diff --git a/forgejo-openapi/src/models/timeline_comment.rs b/forgejo-openapi/src/models/timeline_comment.rs deleted file mode 100644 index e4da161..0000000 --- a/forgejo-openapi/src/models/timeline_comment.rs +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// TimelineComment : TimelineComment represents a timeline comment (comment of any type) on a commit or issue -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TimelineComment { - #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")] - pub assignee: Option>, - #[serde(rename = "assignee_team", skip_serializing_if = "Option::is_none")] - pub assignee_team: Option>, - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "dependent_issue", skip_serializing_if = "Option::is_none")] - pub dependent_issue: Option>, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "issue_url", skip_serializing_if = "Option::is_none")] - pub issue_url: Option, - #[serde(rename = "label", skip_serializing_if = "Option::is_none")] - pub label: Option>, - #[serde(rename = "milestone", skip_serializing_if = "Option::is_none")] - pub milestone: Option>, - #[serde(rename = "new_ref", skip_serializing_if = "Option::is_none")] - pub new_ref: Option, - #[serde(rename = "new_title", skip_serializing_if = "Option::is_none")] - pub new_title: Option, - #[serde(rename = "old_milestone", skip_serializing_if = "Option::is_none")] - pub old_milestone: Option>, - #[serde(rename = "old_project_id", skip_serializing_if = "Option::is_none")] - pub old_project_id: Option, - #[serde(rename = "old_ref", skip_serializing_if = "Option::is_none")] - pub old_ref: Option, - #[serde(rename = "old_title", skip_serializing_if = "Option::is_none")] - pub old_title: Option, - #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")] - pub project_id: Option, - #[serde(rename = "pull_request_url", skip_serializing_if = "Option::is_none")] - pub pull_request_url: Option, - #[serde(rename = "ref_action", skip_serializing_if = "Option::is_none")] - pub ref_action: Option, - #[serde(rename = "ref_comment", skip_serializing_if = "Option::is_none")] - pub ref_comment: Option>, - /// commit SHA where issue/PR was referenced - #[serde(rename = "ref_commit_sha", skip_serializing_if = "Option::is_none")] - pub ref_commit_sha: Option, - #[serde(rename = "ref_issue", skip_serializing_if = "Option::is_none")] - pub ref_issue: Option>, - /// whether the assignees were removed or added - #[serde(rename = "removed_assignee", skip_serializing_if = "Option::is_none")] - pub removed_assignee: Option, - #[serde(rename = "resolve_doer", skip_serializing_if = "Option::is_none")] - pub resolve_doer: Option>, - #[serde(rename = "review_id", skip_serializing_if = "Option::is_none")] - pub review_id: Option, - #[serde(rename = "tracked_time", skip_serializing_if = "Option::is_none")] - pub tracked_time: Option>, - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] - pub updated_at: Option, - #[serde(rename = "user", skip_serializing_if = "Option::is_none")] - pub user: Option>, -} - -impl TimelineComment { - /// TimelineComment represents a timeline comment (comment of any type) on a commit or issue - pub fn new() -> TimelineComment { - TimelineComment { - assignee: None, - assignee_team: None, - body: None, - created_at: None, - dependent_issue: None, - html_url: None, - id: None, - issue_url: None, - label: None, - milestone: None, - new_ref: None, - new_title: None, - old_milestone: None, - old_project_id: None, - old_ref: None, - old_title: None, - project_id: None, - pull_request_url: None, - ref_action: None, - ref_comment: None, - ref_commit_sha: None, - ref_issue: None, - removed_assignee: None, - resolve_doer: None, - review_id: None, - tracked_time: None, - r#type: None, - updated_at: None, - user: None, - } - } -} diff --git a/forgejo-openapi/src/models/topic_name.rs b/forgejo-openapi/src/models/topic_name.rs deleted file mode 100644 index cfcbffa..0000000 --- a/forgejo-openapi/src/models/topic_name.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// TopicName : TopicName a list of repo topic names -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TopicName { - #[serde(rename = "topics", skip_serializing_if = "Option::is_none")] - pub topics: Option>, -} - -impl TopicName { - /// TopicName a list of repo topic names - pub fn new() -> TopicName { - TopicName { topics: None } - } -} diff --git a/forgejo-openapi/src/models/topic_response.rs b/forgejo-openapi/src/models/topic_response.rs deleted file mode 100644 index 0a7fbe0..0000000 --- a/forgejo-openapi/src/models/topic_response.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// TopicResponse : TopicResponse for returning topics -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TopicResponse { - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "repo_count", skip_serializing_if = "Option::is_none")] - pub repo_count: Option, - #[serde(rename = "topic_name", skip_serializing_if = "Option::is_none")] - pub topic_name: Option, - #[serde(rename = "updated", skip_serializing_if = "Option::is_none")] - pub updated: Option, -} - -impl TopicResponse { - /// TopicResponse for returning topics - pub fn new() -> TopicResponse { - TopicResponse { - created: None, - id: None, - repo_count: None, - topic_name: None, - updated: None, - } - } -} diff --git a/forgejo-openapi/src/models/topic_search_results.rs b/forgejo-openapi/src/models/topic_search_results.rs deleted file mode 100644 index e74965f..0000000 --- a/forgejo-openapi/src/models/topic_search_results.rs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TopicSearchResults { - #[serde(rename = "topics", skip_serializing_if = "Option::is_none")] - pub topics: Option>, -} - -impl TopicSearchResults { - pub fn new() -> TopicSearchResults { - TopicSearchResults { topics: None } - } -} diff --git a/forgejo-openapi/src/models/tracked_time.rs b/forgejo-openapi/src/models/tracked_time.rs deleted file mode 100644 index d38bd33..0000000 --- a/forgejo-openapi/src/models/tracked_time.rs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// TrackedTime : TrackedTime worked time for an issue / pr -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TrackedTime { - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "issue", skip_serializing_if = "Option::is_none")] - pub issue: Option>, - /// deprecated (only for backwards compatibility) - #[serde(rename = "issue_id", skip_serializing_if = "Option::is_none")] - pub issue_id: Option, - /// Time in seconds - #[serde(rename = "time", skip_serializing_if = "Option::is_none")] - pub time: Option, - /// deprecated (only for backwards compatibility) - #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")] - pub user_id: Option, - #[serde(rename = "user_name", skip_serializing_if = "Option::is_none")] - pub user_name: Option, -} - -impl TrackedTime { - /// TrackedTime worked time for an issue / pr - pub fn new() -> TrackedTime { - TrackedTime { - created: None, - id: None, - issue: None, - issue_id: None, - time: None, - user_id: None, - user_name: None, - } - } -} diff --git a/forgejo-openapi/src/models/transfer_repo_option.rs b/forgejo-openapi/src/models/transfer_repo_option.rs deleted file mode 100644 index 42ae4e6..0000000 --- a/forgejo-openapi/src/models/transfer_repo_option.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// TransferRepoOption : TransferRepoOption options when transfer a repository's ownership -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TransferRepoOption { - #[serde(rename = "new_owner")] - pub new_owner: String, - /// ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. - #[serde(rename = "team_ids", skip_serializing_if = "Option::is_none")] - pub team_ids: Option>, -} - -impl TransferRepoOption { - /// TransferRepoOption options when transfer a repository's ownership - pub fn new(new_owner: String) -> TransferRepoOption { - TransferRepoOption { - new_owner, - team_ids: None, - } - } -} diff --git a/forgejo-openapi/src/models/update_branch_repo_option.rs b/forgejo-openapi/src/models/update_branch_repo_option.rs deleted file mode 100644 index 93a7f65..0000000 --- a/forgejo-openapi/src/models/update_branch_repo_option.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// UpdateBranchRepoOption : UpdateBranchRepoOption options when updating a branch in a repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UpdateBranchRepoOption { - /// New branch name - #[serde(rename = "name")] - pub name: String, -} - -impl UpdateBranchRepoOption { - /// UpdateBranchRepoOption options when updating a branch in a repository - pub fn new(name: String) -> UpdateBranchRepoOption { - UpdateBranchRepoOption { name } - } -} diff --git a/forgejo-openapi/src/models/update_file_options.rs b/forgejo-openapi/src/models/update_file_options.rs deleted file mode 100644 index 3631513..0000000 --- a/forgejo-openapi/src/models/update_file_options.rs +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// UpdateFileOptions : UpdateFileOptions options for updating files 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) -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UpdateFileOptions { - #[serde(rename = "author", skip_serializing_if = "Option::is_none")] - pub author: Option>, - /// branch (optional) to base this file from. if not given, the default branch is used - #[serde(rename = "branch", skip_serializing_if = "Option::is_none")] - pub branch: Option, - #[serde(rename = "committer", skip_serializing_if = "Option::is_none")] - pub committer: Option>, - /// content must be base64 encoded - #[serde(rename = "content")] - pub content: String, - #[serde(rename = "dates", skip_serializing_if = "Option::is_none")] - pub dates: Option>, - /// from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL - #[serde(rename = "from_path", skip_serializing_if = "Option::is_none")] - pub from_path: Option, - /// message (optional) for the commit of this file. if not supplied, a default message will be used - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - /// new_branch (optional) will make a new branch from `branch` before creating the file - #[serde(rename = "new_branch", skip_serializing_if = "Option::is_none")] - pub new_branch: Option, - /// sha is the SHA for the file that already exists - #[serde(rename = "sha")] - pub sha: String, - /// Add a Signed-off-by trailer by the committer at the end of the commit log message. - #[serde(rename = "signoff", skip_serializing_if = "Option::is_none")] - pub signoff: Option, -} - -impl UpdateFileOptions { - /// UpdateFileOptions options for updating files 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) - pub fn new(content: String, sha: String) -> UpdateFileOptions { - UpdateFileOptions { - author: None, - branch: None, - committer: None, - content, - dates: None, - from_path: None, - message: None, - new_branch: None, - sha, - signoff: None, - } - } -} diff --git a/forgejo-openapi/src/models/update_repo_avatar_option.rs b/forgejo-openapi/src/models/update_repo_avatar_option.rs deleted file mode 100644 index 9be9719..0000000 --- a/forgejo-openapi/src/models/update_repo_avatar_option.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// UpdateRepoAvatarOption : UpdateRepoAvatarUserOption options when updating the repo avatar -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UpdateRepoAvatarOption { - /// image must be base64 encoded - #[serde(rename = "image", skip_serializing_if = "Option::is_none")] - pub image: Option, -} - -impl UpdateRepoAvatarOption { - /// UpdateRepoAvatarUserOption options when updating the repo avatar - pub fn new() -> UpdateRepoAvatarOption { - UpdateRepoAvatarOption { image: None } - } -} diff --git a/forgejo-openapi/src/models/update_user_avatar_option.rs b/forgejo-openapi/src/models/update_user_avatar_option.rs deleted file mode 100644 index 1ccc362..0000000 --- a/forgejo-openapi/src/models/update_user_avatar_option.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// UpdateUserAvatarOption : UpdateUserAvatarUserOption options when updating the user avatar -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UpdateUserAvatarOption { - /// image must be base64 encoded - #[serde(rename = "image", skip_serializing_if = "Option::is_none")] - pub image: Option, -} - -impl UpdateUserAvatarOption { - /// UpdateUserAvatarUserOption options when updating the user avatar - pub fn new() -> UpdateUserAvatarOption { - UpdateUserAvatarOption { image: None } - } -} diff --git a/forgejo-openapi/src/models/update_variable_option.rs b/forgejo-openapi/src/models/update_variable_option.rs deleted file mode 100644 index 3db366f..0000000 --- a/forgejo-openapi/src/models/update_variable_option.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// UpdateVariableOption : UpdateVariableOption the option when updating variable -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UpdateVariableOption { - /// New name for the variable. If the field is empty, the variable name won't be updated. - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// Value of the variable to update - #[serde(rename = "value")] - pub value: String, -} - -impl UpdateVariableOption { - /// UpdateVariableOption the option when updating variable - pub fn new(value: String) -> UpdateVariableOption { - UpdateVariableOption { name: None, value } - } -} diff --git a/forgejo-openapi/src/models/user.rs b/forgejo-openapi/src/models/user.rs deleted file mode 100644 index 1be8729..0000000 --- a/forgejo-openapi/src/models/user.rs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// User : User represents a user -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct User { - /// Is user active - #[serde(rename = "active", skip_serializing_if = "Option::is_none")] - pub active: Option, - /// URL to the user's avatar - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - #[serde(rename = "created", skip_serializing_if = "Option::is_none")] - pub created: Option, - /// the user's description - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - /// user counts - #[serde(rename = "followers_count", skip_serializing_if = "Option::is_none")] - pub followers_count: Option, - #[serde(rename = "following_count", skip_serializing_if = "Option::is_none")] - pub following_count: Option, - /// the user's full name - #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] - pub full_name: Option, - /// URL to the user's profile page - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - /// the user's id - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// Is the user an administrator - #[serde(rename = "is_admin", skip_serializing_if = "Option::is_none")] - pub is_admin: Option, - /// User locale - #[serde(rename = "language", skip_serializing_if = "Option::is_none")] - pub language: Option, - #[serde(rename = "last_login", skip_serializing_if = "Option::is_none")] - pub last_login: Option, - /// the user's location - #[serde(rename = "location", skip_serializing_if = "Option::is_none")] - pub location: Option, - /// the user's username - #[serde(rename = "login", skip_serializing_if = "Option::is_none")] - pub login: Option, - /// the user's authentication sign-in name. - #[serde(rename = "login_name", skip_serializing_if = "Option::is_none")] - pub login_name: Option, - /// Is user login prohibited - #[serde(rename = "prohibit_login", skip_serializing_if = "Option::is_none")] - pub prohibit_login: Option, - /// the user's pronouns - #[serde(rename = "pronouns", skip_serializing_if = "Option::is_none")] - pub pronouns: Option, - /// Is user restricted - #[serde(rename = "restricted", skip_serializing_if = "Option::is_none")] - pub restricted: Option, - /// The ID of the user's Authentication Source - #[serde(rename = "source_id", skip_serializing_if = "Option::is_none")] - pub source_id: Option, - #[serde( - rename = "starred_repos_count", - skip_serializing_if = "Option::is_none" - )] - pub starred_repos_count: Option, - /// User visibility level option: public, limited, private - #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] - pub visibility: Option, - /// the user's website - #[serde(rename = "website", skip_serializing_if = "Option::is_none")] - pub website: Option, -} - -impl User { - /// User represents a user - pub fn new() -> User { - User { - active: None, - avatar_url: None, - created: None, - description: None, - email: None, - followers_count: None, - following_count: None, - full_name: None, - html_url: None, - id: None, - is_admin: None, - language: None, - last_login: None, - location: None, - login: None, - login_name: None, - prohibit_login: None, - pronouns: None, - restricted: None, - source_id: None, - starred_repos_count: None, - visibility: None, - website: None, - } - } -} diff --git a/forgejo-openapi/src/models/user_heatmap_data.rs b/forgejo-openapi/src/models/user_heatmap_data.rs deleted file mode 100644 index 7dd2b85..0000000 --- a/forgejo-openapi/src/models/user_heatmap_data.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// UserHeatmapData : UserHeatmapData represents the data needed to create a heatmap -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UserHeatmapData { - #[serde(rename = "contributions", skip_serializing_if = "Option::is_none")] - pub contributions: Option, - /// TimeStamp defines a timestamp - #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] - pub timestamp: Option, -} - -impl UserHeatmapData { - /// UserHeatmapData represents the data needed to create a heatmap - pub fn new() -> UserHeatmapData { - UserHeatmapData { - contributions: None, - timestamp: None, - } - } -} diff --git a/forgejo-openapi/src/models/user_search_results.rs b/forgejo-openapi/src/models/user_search_results.rs deleted file mode 100644 index 8730091..0000000 --- a/forgejo-openapi/src/models/user_search_results.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UserSearchResults { - #[serde(rename = "data", skip_serializing_if = "Option::is_none")] - pub data: Option>, - #[serde(rename = "ok", skip_serializing_if = "Option::is_none")] - pub ok: Option, -} - -impl UserSearchResults { - pub fn new() -> UserSearchResults { - UserSearchResults { - data: None, - ok: None, - } - } -} diff --git a/forgejo-openapi/src/models/user_settings.rs b/forgejo-openapi/src/models/user_settings.rs deleted file mode 100644 index 22c0048..0000000 --- a/forgejo-openapi/src/models/user_settings.rs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// UserSettings : UserSettings represents user settings -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UserSettings { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "diff_view_style", skip_serializing_if = "Option::is_none")] - pub diff_view_style: Option, - #[serde( - rename = "enable_repo_unit_hints", - skip_serializing_if = "Option::is_none" - )] - pub enable_repo_unit_hints: Option, - #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] - pub full_name: Option, - #[serde(rename = "hide_activity", skip_serializing_if = "Option::is_none")] - pub hide_activity: Option, - /// Privacy - #[serde(rename = "hide_email", skip_serializing_if = "Option::is_none")] - pub hide_email: Option, - #[serde(rename = "hide_pronouns", skip_serializing_if = "Option::is_none")] - pub hide_pronouns: Option, - #[serde(rename = "language", skip_serializing_if = "Option::is_none")] - pub language: Option, - #[serde(rename = "location", skip_serializing_if = "Option::is_none")] - pub location: Option, - #[serde(rename = "pronouns", skip_serializing_if = "Option::is_none")] - pub pronouns: Option, - #[serde(rename = "theme", skip_serializing_if = "Option::is_none")] - pub theme: Option, - #[serde(rename = "website", skip_serializing_if = "Option::is_none")] - pub website: Option, -} - -impl UserSettings { - /// UserSettings represents user settings - pub fn new() -> UserSettings { - UserSettings { - description: None, - diff_view_style: None, - enable_repo_unit_hints: None, - full_name: None, - hide_activity: None, - hide_email: None, - hide_pronouns: None, - language: None, - location: None, - pronouns: None, - theme: None, - website: None, - } - } -} diff --git a/forgejo-openapi/src/models/user_settings_options.rs b/forgejo-openapi/src/models/user_settings_options.rs deleted file mode 100644 index 8f1f2d5..0000000 --- a/forgejo-openapi/src/models/user_settings_options.rs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// UserSettingsOptions : UserSettingsOptions represents options to change user settings -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UserSettingsOptions { - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "diff_view_style", skip_serializing_if = "Option::is_none")] - pub diff_view_style: Option, - #[serde( - rename = "enable_repo_unit_hints", - skip_serializing_if = "Option::is_none" - )] - pub enable_repo_unit_hints: Option, - #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")] - pub full_name: Option, - #[serde(rename = "hide_activity", skip_serializing_if = "Option::is_none")] - pub hide_activity: Option, - /// Privacy - #[serde(rename = "hide_email", skip_serializing_if = "Option::is_none")] - pub hide_email: Option, - #[serde(rename = "hide_pronouns", skip_serializing_if = "Option::is_none")] - pub hide_pronouns: Option, - #[serde(rename = "language", skip_serializing_if = "Option::is_none")] - pub language: Option, - #[serde(rename = "location", skip_serializing_if = "Option::is_none")] - pub location: Option, - #[serde(rename = "pronouns", skip_serializing_if = "Option::is_none")] - pub pronouns: Option, - #[serde(rename = "theme", skip_serializing_if = "Option::is_none")] - pub theme: Option, - #[serde(rename = "website", skip_serializing_if = "Option::is_none")] - pub website: Option, -} - -impl UserSettingsOptions { - /// UserSettingsOptions represents options to change user settings - pub fn new() -> UserSettingsOptions { - UserSettingsOptions { - description: None, - diff_view_style: None, - enable_repo_unit_hints: None, - full_name: None, - hide_activity: None, - hide_email: None, - hide_pronouns: None, - language: None, - location: None, - pronouns: None, - theme: None, - website: None, - } - } -} diff --git a/forgejo-openapi/src/models/verify_gpg_key_option.rs b/forgejo-openapi/src/models/verify_gpg_key_option.rs deleted file mode 100644 index 8fe5357..0000000 --- a/forgejo-openapi/src/models/verify_gpg_key_option.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// VerifyGpgKeyOption : VerifyGPGKeyOption options verifies user GPG key -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct VerifyGpgKeyOption { - #[serde(rename = "armored_signature", skip_serializing_if = "Option::is_none")] - pub armored_signature: Option, - /// An Signature for a GPG key token - #[serde(rename = "key_id")] - pub key_id: String, -} - -impl VerifyGpgKeyOption { - /// VerifyGPGKeyOption options verifies user GPG key - pub fn new(key_id: String) -> VerifyGpgKeyOption { - VerifyGpgKeyOption { - armored_signature: None, - key_id, - } - } -} diff --git a/forgejo-openapi/src/models/watch_info.rs b/forgejo-openapi/src/models/watch_info.rs deleted file mode 100644 index 04d85d5..0000000 --- a/forgejo-openapi/src/models/watch_info.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// WatchInfo : WatchInfo represents an API watch status of one repository -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct WatchInfo { - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "ignored", skip_serializing_if = "Option::is_none")] - pub ignored: Option, - #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] - pub reason: Option, - #[serde(rename = "repository_url", skip_serializing_if = "Option::is_none")] - pub repository_url: Option, - #[serde(rename = "subscribed", skip_serializing_if = "Option::is_none")] - pub subscribed: Option, - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, -} - -impl WatchInfo { - /// WatchInfo represents an API watch status of one repository - pub fn new() -> WatchInfo { - WatchInfo { - created_at: None, - ignored: None, - reason: None, - repository_url: None, - subscribed: None, - url: None, - } - } -} diff --git a/forgejo-openapi/src/models/wiki_commit.rs b/forgejo-openapi/src/models/wiki_commit.rs deleted file mode 100644 index 0f45cc8..0000000 --- a/forgejo-openapi/src/models/wiki_commit.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// WikiCommit : WikiCommit page commit/revision -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct WikiCommit { - #[serde(rename = "author", skip_serializing_if = "Option::is_none")] - pub author: Option>, - #[serde(rename = "commiter", skip_serializing_if = "Option::is_none")] - pub commiter: Option>, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "sha", skip_serializing_if = "Option::is_none")] - pub sha: Option, -} - -impl WikiCommit { - /// WikiCommit page commit/revision - pub fn new() -> WikiCommit { - WikiCommit { - author: None, - commiter: None, - message: None, - sha: None, - } - } -} diff --git a/forgejo-openapi/src/models/wiki_commit_list.rs b/forgejo-openapi/src/models/wiki_commit_list.rs deleted file mode 100644 index 8270c6e..0000000 --- a/forgejo-openapi/src/models/wiki_commit_list.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// WikiCommitList : WikiCommitList commit/revision list -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct WikiCommitList { - #[serde(rename = "commits", skip_serializing_if = "Option::is_none")] - pub commits: Option>, - #[serde(rename = "count", skip_serializing_if = "Option::is_none")] - pub count: Option, -} - -impl WikiCommitList { - /// WikiCommitList commit/revision list - pub fn new() -> WikiCommitList { - WikiCommitList { - commits: None, - count: None, - } - } -} diff --git a/forgejo-openapi/src/models/wiki_page.rs b/forgejo-openapi/src/models/wiki_page.rs deleted file mode 100644 index 5ade510..0000000 --- a/forgejo-openapi/src/models/wiki_page.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// WikiPage : WikiPage a wiki page -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct WikiPage { - #[serde(rename = "commit_count", skip_serializing_if = "Option::is_none")] - pub commit_count: Option, - /// Page content, base64 encoded - #[serde(rename = "content_base64", skip_serializing_if = "Option::is_none")] - pub content_base64: Option, - #[serde(rename = "footer", skip_serializing_if = "Option::is_none")] - pub footer: Option, - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "last_commit", skip_serializing_if = "Option::is_none")] - pub last_commit: Option>, - #[serde(rename = "sidebar", skip_serializing_if = "Option::is_none")] - pub sidebar: Option, - #[serde(rename = "sub_url", skip_serializing_if = "Option::is_none")] - pub sub_url: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, -} - -impl WikiPage { - /// WikiPage a wiki page - pub fn new() -> WikiPage { - WikiPage { - commit_count: None, - content_base64: None, - footer: None, - html_url: None, - last_commit: None, - sidebar: None, - sub_url: None, - title: None, - } - } -} diff --git a/forgejo-openapi/src/models/wiki_page_meta_data.rs b/forgejo-openapi/src/models/wiki_page_meta_data.rs deleted file mode 100644 index 2c319a5..0000000 --- a/forgejo-openapi/src/models/wiki_page_meta_data.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Forgejo API - * - * This documentation describes the Forgejo API. - * - * The version of the OpenAPI document: 14.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// WikiPageMetaData : WikiPageMetaData wiki page meta information -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct WikiPageMetaData { - #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")] - pub html_url: Option, - #[serde(rename = "last_commit", skip_serializing_if = "Option::is_none")] - pub last_commit: Option>, - #[serde(rename = "sub_url", skip_serializing_if = "Option::is_none")] - pub sub_url: Option, - #[serde(rename = "title", skip_serializing_if = "Option::is_none")] - pub title: Option, -} - -impl WikiPageMetaData { - /// WikiPageMetaData wiki page meta information - pub fn new() -> WikiPageMetaData { - WikiPageMetaData { - html_url: None, - last_commit: None, - sub_url: None, - title: None, - } - } -} diff --git a/forgejo-openapi/swagger.v1.json b/forgejo-openapi/swagger.v1.json deleted file mode 100644 index e62790c..0000000 --- a/forgejo-openapi/swagger.v1.json +++ /dev/null @@ -1,28347 +0,0 @@ -{ - "consumes": ["application/json", "text/plain"], - "produces": ["application/json", "text/html"], - "schemes": ["https", "http"], - "swagger": "2.0", - "info": { - "description": "This documentation describes the Forgejo API.", - "title": "Forgejo API", - "license": { - "name": "This file is distributed under the MIT license for the purpose of interoperability", - "url": "http://opensource.org/licenses/MIT" - }, - "version": "14.0.0" - }, - "basePath": "/api/v1", - "paths": { - "/activitypub/actor": { - "get": { - "produces": ["application/json"], - "tags": ["activitypub"], - "summary": "Returns the instance's Actor", - "operationId": "activitypubInstanceActor", - "responses": { - "200": { - "$ref": "#/responses/ActivityPub" - } - } - } - }, - "/activitypub/actor/inbox": { - "post": { - "produces": ["application/json"], - "tags": ["activitypub"], - "summary": "Send to the inbox", - "operationId": "activitypubInstanceActorInbox", - "responses": { - "204": { - "$ref": "#/responses/empty" - } - } - } - }, - "/activitypub/actor/outbox": { - "post": { - "produces": ["application/ld+json"], - "tags": ["activitypub"], - "summary": "Display the outbox (always empty)", - "operationId": "activitypubInstanceActorOutbox", - "responses": { - "200": { - "$ref": "#/responses/Outbox" - } - } - } - }, - "/activitypub/repository-id/{repository-id}": { - "get": { - "produces": ["application/json"], - "tags": ["activitypub"], - "summary": "Returns the Repository actor for a repo", - "operationId": "activitypubRepository", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "repository ID of the repo", - "name": "repository-id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActivityPub" - } - } - } - }, - "/activitypub/repository-id/{repository-id}/inbox": { - "post": { - "produces": ["application/json"], - "tags": ["activitypub"], - "summary": "Send to the inbox", - "operationId": "activitypubRepositoryInbox", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "repository ID of the repo", - "name": "repository-id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/ForgeLike" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - } - } - } - }, - "/activitypub/repository-id/{repository-id}/outbox": { - "post": { - "produces": ["application/ld+json"], - "tags": ["activitypub"], - "summary": "Display the outbox", - "operationId": "activitypubRepositoryOutbox", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "repository ID of the repo", - "name": "repository-id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Outbox" - } - } - } - }, - "/activitypub/user-id/{user-id}": { - "get": { - "produces": ["application/json"], - "tags": ["activitypub"], - "summary": "Returns the Person actor for a user", - "operationId": "activitypubPerson", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "user ID of the user", - "name": "user-id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActivityPub" - } - } - } - }, - "/activitypub/user-id/{user-id}/activities/{activity-id}": { - "get": { - "produces": ["application/json"], - "tags": ["activitypub"], - "summary": "Get a specific activity object of the user", - "operationId": "activitypubPersonActivityNote", - "parameters": [ - { - "type": "integer", - "description": "user ID of the user", - "name": "user-id", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "activity ID of the sought activity", - "name": "activity-id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActivityPub" - } - } - } - }, - "/activitypub/user-id/{user-id}/activities/{activity-id}/activity": { - "get": { - "produces": ["application/json"], - "tags": ["activitypub"], - "summary": "Get a specific activity of the user", - "operationId": "activitypubPersonActivity", - "parameters": [ - { - "type": "integer", - "description": "user ID of the user", - "name": "user-id", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "activity ID of the sought activity", - "name": "activity-id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActivityPub" - } - } - } - }, - "/activitypub/user-id/{user-id}/inbox": { - "post": { - "produces": ["application/json"], - "tags": ["activitypub"], - "summary": "Send to the inbox", - "operationId": "activitypubPersonInbox", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "user ID of the user", - "name": "user-id", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "$ref": "#/responses/empty" - } - } - } - }, - "/activitypub/user-id/{user-id}/outbox": { - "get": { - "produces": ["application/json"], - "tags": ["activitypub"], - "summary": "List the user's recorded activity", - "operationId": "activitypubPersonFeed", - "parameters": [ - { - "type": "integer", - "description": "user ID of the user", - "name": "user-id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Outbox" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/admin/cron": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "List cron tasks", - "operationId": "adminCronList", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CronList" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/admin/cron/{task}": { - "post": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Run cron task", - "operationId": "adminCronRun", - "parameters": [ - { - "type": "string", - "description": "task to run", - "name": "task", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/admin/emails": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "List all users' email addresses", - "operationId": "adminGetAllEmails", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/EmailList" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/admin/emails/search": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Search users' email addresses", - "operationId": "adminSearchEmails", - "parameters": [ - { - "type": "string", - "description": "keyword", - "name": "q", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/EmailList" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/admin/hooks": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "List global (system) webhooks", - "operationId": "adminListHooks", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/HookList" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Create a hook", - "operationId": "adminCreateHook", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateHookOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Hook" - } - } - } - }, - "/admin/hooks/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Get a hook", - "operationId": "adminGetHook", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Delete a hook", - "operationId": "adminDeleteHook", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the hook to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Update a hook", - "operationId": "adminEditHook", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the hook to update", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditHookOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - } - } - } - }, - "/admin/orgs": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "List all organizations", - "operationId": "adminGetAllOrgs", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/OrganizationList" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/admin/quota/groups": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "List the available quota groups", - "operationId": "adminListQuotaGroups", - "responses": { - "200": { - "$ref": "#/responses/QuotaGroupList" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Create a new quota group", - "operationId": "adminCreateQuotaGroup", - "parameters": [ - { - "description": "Definition of the quota group", - "name": "group", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateQuotaGroupOptions" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/QuotaGroup" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/admin/quota/groups/{quotagroup}": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Get information about the quota group", - "operationId": "adminGetQuotaGroup", - "parameters": [ - { - "type": "string", - "description": "quota group to query", - "name": "quotagroup", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/QuotaGroup" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Delete a quota group", - "operationId": "adminDeleteQuotaGroup", - "parameters": [ - { - "type": "string", - "description": "quota group to delete", - "name": "quotagroup", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/admin/quota/groups/{quotagroup}/rules/{quotarule}": { - "put": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Adds a rule to a quota group", - "operationId": "adminAddRuleToQuotaGroup", - "parameters": [ - { - "type": "string", - "description": "quota group to add a rule to", - "name": "quotagroup", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "the name of the quota rule to add to the group", - "name": "quotarule", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Removes a rule from a quota group", - "operationId": "adminRemoveRuleFromQuotaGroup", - "parameters": [ - { - "type": "string", - "description": "quota group to remove a rule from", - "name": "quotagroup", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "the name of the quota rule to remove from the group", - "name": "quotarule", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/admin/quota/groups/{quotagroup}/users": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "List users in a quota group", - "operationId": "adminListUsersInQuotaGroup", - "parameters": [ - { - "type": "string", - "description": "quota group to list members of", - "name": "quotagroup", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/admin/quota/groups/{quotagroup}/users/{username}": { - "put": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Add a user to a quota group", - "operationId": "adminAddUserToQuotaGroup", - "parameters": [ - { - "type": "string", - "description": "quota group to add the user to", - "name": "quotagroup", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the user to add to the quota group", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Remove a user from a quota group", - "operationId": "adminRemoveUserFromQuotaGroup", - "parameters": [ - { - "type": "string", - "description": "quota group to remove a user from", - "name": "quotagroup", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the user to remove from the quota group", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/admin/quota/rules": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "List the available quota rules", - "operationId": "adminListQuotaRules", - "responses": { - "200": { - "$ref": "#/responses/QuotaRuleInfoList" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Create a new quota rule", - "operationId": "adminCreateQuotaRule", - "parameters": [ - { - "description": "Definition of the quota rule", - "name": "rule", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateQuotaRuleOptions" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/QuotaRuleInfo" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/admin/quota/rules/{quotarule}": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Get information about a quota rule", - "operationId": "adminGetQuotaRule", - "parameters": [ - { - "type": "string", - "description": "quota rule to query", - "name": "quotarule", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/QuotaRuleInfo" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Deletes a quota rule", - "operationId": "adminDeleteQuotaRule", - "parameters": [ - { - "type": "string", - "description": "quota rule to delete", - "name": "quotarule", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Change an existing quota rule", - "operationId": "adminEditQuotaRule", - "parameters": [ - { - "type": "string", - "description": "Quota rule to change", - "name": "quotarule", - "in": "path", - "required": true - }, - { - "name": "rule", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/EditQuotaRuleOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/QuotaRuleInfo" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/admin/runners/jobs": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Search action jobs according filter conditions", - "operationId": "adminSearchRunJobs", - "parameters": [ - { - "type": "string", - "description": "a comma separated list of run job labels to search for", - "name": "labels", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RunJobList" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/admin/runners/registration-token": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Get an global actions runner registration token", - "operationId": "adminGetRunnerRegistrationToken", - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - } - } - } - }, - "/admin/unadopted": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "List unadopted repositories", - "operationId": "adminUnadoptedList", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "type": "string", - "description": "pattern of repositories to search for", - "name": "pattern", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/StringSlice" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/admin/unadopted/{owner}/{repo}": { - "post": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Adopt unadopted files as a repository", - "operationId": "adminAdoptRepository", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Delete unadopted files", - "operationId": "adminDeleteUnadoptedRepository", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/admin/users": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Search users according filter conditions", - "operationId": "adminSearchUsers", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "ID of the user's login source to search for", - "name": "source_id", - "in": "query" - }, - { - "type": "string", - "description": "user's login name to search for", - "name": "login_name", - "in": "query" - }, - { - "enum": [ - "oldest", - "newest", - "alphabetically", - "reversealphabetically", - "recentupdate", - "leastupdate" - ], - "type": "string", - "description": "sort order of results", - "name": "sort", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Create a user account", - "operationId": "adminCreateUser", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateUserOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/User" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/admin/users/{username}": { - "delete": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Delete user account", - "operationId": "adminDeleteUser", - "parameters": [ - { - "type": "string", - "description": "username of user to delete", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "purge the user from the system completely", - "name": "purge", - "in": "query" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Edit an existing user", - "operationId": "adminEditUser", - "parameters": [ - { - "type": "string", - "description": "username of user to edit", - "name": "username", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditUserOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/User" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/admin/users/{username}/emails": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "List all email addresses for a user", - "operationId": "adminListUserEmails", - "parameters": [ - { - "type": "string", - "description": "username of user to get email addresses of", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/EmailList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Delete email addresses from a user's account", - "operationId": "adminDeleteUserEmails", - "parameters": [ - { - "type": "string", - "description": "username of user to delete email addresses from", - "name": "username", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/DeleteEmailOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/admin/users/{username}/keys": { - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Add an SSH public key to user's account", - "operationId": "adminCreatePublicKey", - "parameters": [ - { - "type": "string", - "description": "username of the user", - "name": "username", - "in": "path", - "required": true - }, - { - "name": "key", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateKeyOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/PublicKey" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/admin/users/{username}/keys/{id}": { - "delete": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Remove a public key from user's account", - "operationId": "adminDeleteUserPublicKey", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the key to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/admin/users/{username}/orgs": { - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Create an organization", - "operationId": "adminCreateOrg", - "parameters": [ - { - "type": "string", - "description": "username of the user that will own the created organization", - "name": "username", - "in": "path", - "required": true - }, - { - "name": "organization", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrgOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Organization" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/admin/users/{username}/quota": { - "get": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Get the user's quota info", - "operationId": "adminGetUserQuota", - "parameters": [ - { - "type": "string", - "description": "username of user to query", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/QuotaInfo" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/admin/users/{username}/quota/groups": { - "post": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Set the user's quota groups to a given list.", - "operationId": "adminSetUserQuotaGroups", - "parameters": [ - { - "type": "string", - "description": "username of the user to modify the quota groups from", - "name": "username", - "in": "path", - "required": true - }, - { - "description": "list of groups that the user should be a member of", - "name": "groups", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SetUserQuotaGroupsOptions" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/admin/users/{username}/rename": { - "post": { - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Rename a user", - "operationId": "adminRenameUser", - "parameters": [ - { - "type": "string", - "description": "existing username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RenameUserOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/admin/users/{username}/repos": { - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["admin"], - "summary": "Create a repository on behalf of a user", - "operationId": "adminCreateRepo", - "parameters": [ - { - "type": "string", - "description": "username of the user. This user will own the created repository", - "name": "username", - "in": "path", - "required": true - }, - { - "name": "repository", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateRepoOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Repository" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/gitignore/templates": { - "get": { - "produces": ["application/json"], - "tags": ["miscellaneous"], - "summary": "Returns a list of all gitignore templates", - "operationId": "listGitignoresTemplates", - "responses": { - "200": { - "$ref": "#/responses/GitignoreTemplateList" - } - } - } - }, - "/gitignore/templates/{name}": { - "get": { - "produces": ["application/json"], - "tags": ["miscellaneous"], - "summary": "Returns information about a gitignore template", - "operationId": "getGitignoreTemplateInfo", - "parameters": [ - { - "type": "string", - "description": "name of the template", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitignoreTemplateInfo" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/label/templates": { - "get": { - "produces": ["application/json"], - "tags": ["miscellaneous"], - "summary": "Returns a list of all label templates", - "operationId": "listLabelTemplates", - "responses": { - "200": { - "$ref": "#/responses/LabelTemplateList" - } - } - } - }, - "/label/templates/{name}": { - "get": { - "produces": ["application/json"], - "tags": ["miscellaneous"], - "summary": "Returns all labels in a template", - "operationId": "getLabelTemplateInfo", - "parameters": [ - { - "type": "string", - "description": "name of the template", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/LabelTemplateInfo" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/licenses": { - "get": { - "produces": ["application/json"], - "tags": ["miscellaneous"], - "summary": "Returns a list of all license templates", - "operationId": "listLicenseTemplates", - "responses": { - "200": { - "$ref": "#/responses/LicenseTemplateList" - } - } - } - }, - "/licenses/{name}": { - "get": { - "produces": ["application/json"], - "tags": ["miscellaneous"], - "summary": "Returns information about a license template", - "operationId": "getLicenseTemplateInfo", - "parameters": [ - { - "type": "string", - "description": "name of the license", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/LicenseTemplateInfo" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/markdown": { - "post": { - "consumes": ["application/json"], - "produces": ["text/html"], - "tags": ["miscellaneous"], - "summary": "Render a markdown document as HTML", - "operationId": "renderMarkdown", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/MarkdownOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/MarkdownRender" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/markdown/raw": { - "post": { - "consumes": ["text/plain"], - "produces": ["text/html"], - "tags": ["miscellaneous"], - "summary": "Render raw markdown as HTML", - "operationId": "renderMarkdownRaw", - "parameters": [ - { - "description": "Request body to render", - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/MarkdownRender" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/markup": { - "post": { - "consumes": ["application/json"], - "produces": ["text/html"], - "tags": ["miscellaneous"], - "summary": "Render a markup document as HTML", - "operationId": "renderMarkup", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/MarkupOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/MarkupRender" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/nodeinfo": { - "get": { - "produces": ["application/json"], - "tags": ["miscellaneous"], - "summary": "Returns the nodeinfo of the Forgejo application", - "operationId": "getNodeInfo", - "responses": { - "200": { - "$ref": "#/responses/NodeInfo" - } - } - } - }, - "/notifications": { - "get": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["notification"], - "summary": "List users's notification threads", - "operationId": "notifyGetList", - "parameters": [ - { - "type": "boolean", - "description": "If true, show notifications marked as read. Default value is false", - "name": "all", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi", - "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned.", - "name": "status-types", - "in": "query" - }, - { - "type": "array", - "items": { - "enum": ["issue", "pull", "repository"], - "type": "string" - }, - "collectionFormat": "multi", - "description": "filter notifications by subject type", - "name": "subject-type", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", - "name": "since", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", - "name": "before", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/NotificationThreadList" - } - } - }, - "put": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["notification"], - "summary": "Mark notification threads as read, pinned or unread", - "operationId": "notifyReadList", - "parameters": [ - { - "type": "string", - "format": "date-time", - "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.", - "name": "last_read_at", - "in": "query" - }, - { - "type": "boolean", - "description": "If true, mark all notifications on this repo. Default value is false", - "name": "all", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi", - "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.", - "name": "status-types", - "in": "query" - }, - { - "type": "string", - "description": "Status to mark notifications as, Defaults to read.", - "name": "to-status", - "in": "query" - } - ], - "responses": { - "205": { - "$ref": "#/responses/NotificationThreadList" - } - } - } - }, - "/notifications/new": { - "get": { - "tags": ["notification"], - "summary": "Check if unread notifications exist", - "operationId": "notifyNewAvailable", - "responses": { - "200": { - "$ref": "#/responses/NotificationCount" - } - } - } - }, - "/notifications/threads/{id}": { - "get": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["notification"], - "summary": "Get notification thread by ID", - "operationId": "notifyGetThread", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of notification thread", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/NotificationThread" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["notification"], - "summary": "Mark notification thread as read by ID", - "operationId": "notifyReadThread", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of notification thread", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "string", - "default": "read", - "description": "Status to mark notifications as", - "name": "to-status", - "in": "query" - } - ], - "responses": { - "205": { - "$ref": "#/responses/NotificationThread" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/org/{org}/repos": { - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Create a repository in an organization", - "operationId": "createOrgRepoDeprecated", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "name of organization", - "name": "org", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateRepoOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/orgs": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List all organizations", - "operationId": "orgGetAll", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/OrganizationList" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Create an organization", - "operationId": "orgCreate", - "parameters": [ - { - "name": "organization", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrgOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Organization" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/orgs/{org}": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Get an organization", - "operationId": "orgGet", - "parameters": [ - { - "type": "string", - "description": "name of the organization to get", - "name": "org", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Organization" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Delete an organization", - "operationId": "orgDelete", - "parameters": [ - { - "type": "string", - "description": "organization that is to be deleted", - "name": "org", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Edit an organization", - "operationId": "orgEdit", - "parameters": [ - { - "type": "string", - "description": "name of the organization to edit", - "name": "org", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/EditOrgOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Organization" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - } - } - } - }, - "/orgs/{org}/actions/runners/jobs": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Search for organization's action jobs according filter conditions", - "operationId": "orgSearchRunJobs", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "a comma separated list of run job labels to search for", - "name": "labels", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RunJobList" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/orgs/{org}/actions/runners/registration-token": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Get an organization's actions runner registration token", - "operationId": "orgGetRunnerRegistrationToken", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - } - } - } - }, - "/orgs/{org}/actions/secrets": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List actions secrets of an organization", - "operationId": "orgListActionsSecrets", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/SecretList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/actions/secrets/{secretname}": { - "put": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Create or Update a secret value in an organization", - "operationId": "updateOrgSecret", - "parameters": [ - { - "type": "string", - "description": "name of organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateOrUpdateSecretOption" - } - } - ], - "responses": { - "201": { - "description": "response when creating a secret" - }, - "204": { - "description": "response when updating a secret" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Delete a secret in an organization", - "operationId": "deleteOrgSecret", - "parameters": [ - { - "type": "string", - "description": "name of organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "delete one secret of the organization" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/actions/variables": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List variables of an organization", - "operationId": "getOrgVariablesList", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/VariableList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/actions/variables/{variablename}": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Get organization's variable by name", - "operationId": "getOrgVariable", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActionVariable" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Update variable in organization", - "operationId": "updateOrgVariable", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - } - } - ], - "responses": { - "201": { - "description": "response when updating an org-level variable" - }, - "204": { - "description": "response when updating an org-level variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Create a new variable in organization", - "operationId": "createOrgVariable", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateVariableOption" - } - } - ], - "responses": { - "201": { - "description": "response when creating an org-level variable" - }, - "204": { - "description": "response when creating an org-level variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Delete organization's variable by name", - "operationId": "deleteOrgVariable", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "response when deleting a variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/activities/feeds": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List an organization's activity feeds", - "operationId": "orgListActivityFeeds", - "parameters": [ - { - "type": "string", - "description": "name of the org", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "date", - "description": "the date of the activities to be found", - "name": "date", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActivityFeedsList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/avatar": { - "post": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Update an organization's avatar", - "operationId": "orgUpdateAvatar", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateUserAvatarOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Delete an organization's avatar. It will be replaced by a default one", - "operationId": "orgDeleteAvatar", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/block/{username}": { - "put": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Blocks a user from the organization", - "operationId": "orgBlockUser", - "parameters": [ - { - "type": "string", - "description": "name of the org", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the user", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/orgs/{org}/hooks": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List an organization's webhooks", - "operationId": "orgListHooks", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/HookList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Create a hook", - "operationId": "orgCreateHook", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateHookOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/hooks/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Get a hook", - "operationId": "orgGetHook", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Delete a hook", - "operationId": "orgDeleteHook", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the hook to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Update a hook", - "operationId": "orgEditHook", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the hook to update", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditHookOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/labels": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List an organization's labels", - "operationId": "orgListLabels", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "enum": [ - "mostissues", - "leastissues", - "reversealphabetically" - ], - "type": "string", - "description": "Specifies the sorting method: mostissues, leastissues, or reversealphabetically.", - "name": "sort", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Create a label for an organization", - "operationId": "orgCreateLabel", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateLabelOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/orgs/{org}/labels/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Get a single label", - "operationId": "orgGetLabel", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the label to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["organization"], - "summary": "Delete a label", - "operationId": "orgDeleteLabel", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the label to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Update a label", - "operationId": "orgEditLabel", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the label to edit", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditLabelOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/orgs/{org}/list_blocked": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List the organization's blocked users", - "operationId": "orgListBlockedUsers", - "parameters": [ - { - "type": "string", - "description": "name of the org", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/BlockedUserList" - } - } - } - }, - "/orgs/{org}/members": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List an organization's members", - "operationId": "orgListMembers", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/members/{username}": { - "get": { - "tags": ["organization"], - "summary": "Check if a user is a member of an organization", - "operationId": "orgIsMember", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the user", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "user is a member" - }, - "303": { - "description": "redirection to /orgs/{org}/public_members/{username}" - }, - "404": { - "description": "user is not a member" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Remove a member from an organization", - "operationId": "orgDeleteMember", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the user", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "member removed" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/public_members": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List an organization's public members", - "operationId": "orgListPublicMembers", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/public_members/{username}": { - "get": { - "tags": ["organization"], - "summary": "Check if a user is a public member of an organization", - "operationId": "orgIsPublicMember", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the user", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "user is a public member" - }, - "404": { - "description": "user is not a public member" - } - } - }, - "put": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Publicize a user's membership", - "operationId": "orgPublicizeMember", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the user", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "membership publicized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Conceal a user's membership", - "operationId": "orgConcealMember", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the user", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/quota": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Get quota information for an organization", - "operationId": "orgGetQuota", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/QuotaInfo" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/quota/artifacts": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List the artifacts affecting the organization's quota", - "operationId": "orgListQuotaArtifacts", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/QuotaUsedArtifactList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/quota/attachments": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List the attachments affecting the organization's quota", - "operationId": "orgListQuotaAttachments", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/QuotaUsedAttachmentList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/quota/check": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Check if the organization is over quota for a given subject", - "operationId": "orgCheckQuota", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "subject of the quota", - "name": "subject", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "Returns true if the action is accepted.", - "schema": { - "type": "boolean" - } - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/orgs/{org}/quota/packages": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List the packages affecting the organization's quota", - "operationId": "orgListQuotaPackages", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/QuotaUsedPackageList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/rename": { - "post": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Rename an organization", - "operationId": "renameOrg", - "parameters": [ - { - "type": "string", - "description": "existing org name", - "name": "org", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RenameOrgOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/orgs/{org}/repos": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List an organization's repos", - "operationId": "orgListRepos", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Create a repository in an organization", - "operationId": "createOrgRepo", - "parameters": [ - { - "type": "string", - "description": "name of organization", - "name": "org", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateRepoOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Repository" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/teams": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List an organization's teams", - "operationId": "orgListTeams", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TeamList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Create a team", - "operationId": "orgCreateTeam", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateTeamOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Team" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/orgs/{org}/teams/search": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Search for teams within an organization", - "operationId": "teamSearch", - "parameters": [ - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "keywords to search", - "name": "q", - "in": "query" - }, - { - "type": "boolean", - "description": "include search within team description (defaults to true)", - "name": "include_desc", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "description": "SearchResults of a successful search", - "schema": { - "type": "object", - "title": "TeamSearchResults", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/Team" - } - }, - "ok": { - "type": "boolean" - } - } - } - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/orgs/{org}/unblock/{username}": { - "put": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Unblock a user from the organization", - "operationId": "orgUnblockUser", - "parameters": [ - { - "type": "string", - "description": "name of the org", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the user", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/packages/{owner}": { - "get": { - "produces": ["application/json"], - "tags": ["package"], - "summary": "Gets all packages of an owner", - "operationId": "listPackages", - "parameters": [ - { - "type": "string", - "description": "owner of the packages", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "enum": [ - "alpine", - "cargo", - "chef", - "composer", - "conan", - "conda", - "container", - "cran", - "debian", - "generic", - "go", - "helm", - "maven", - "npm", - "nuget", - "pub", - "pypi", - "rpm", - "rubygems", - "swift", - "vagrant" - ], - "type": "string", - "description": "package type filter", - "name": "type", - "in": "query" - }, - { - "type": "string", - "description": "name filter", - "name": "q", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PackageList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/packages/{owner}/{type}/{name}/-/link/{repo_name}": { - "post": { - "tags": ["package"], - "summary": "Link a package to a repository", - "operationId": "linkPackage", - "parameters": [ - { - "type": "string", - "description": "owner of the package", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "type of the package", - "name": "type", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the package", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repository to link.", - "name": "repo_name", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/packages/{owner}/{type}/{name}/-/unlink": { - "post": { - "tags": ["package"], - "summary": "Unlink a package from a repository", - "operationId": "unlinkPackage", - "parameters": [ - { - "type": "string", - "description": "owner of the package", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "type of the package", - "name": "type", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the package", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/packages/{owner}/{type}/{name}/{version}": { - "get": { - "produces": ["application/json"], - "tags": ["package"], - "summary": "Gets a package", - "operationId": "getPackage", - "parameters": [ - { - "type": "string", - "description": "owner of the package", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "type of the package", - "name": "type", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the package", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "version of the package", - "name": "version", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Package" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["package"], - "summary": "Delete a package", - "operationId": "deletePackage", - "parameters": [ - { - "type": "string", - "description": "owner of the package", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "type of the package", - "name": "type", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the package", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "version of the package", - "name": "version", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/packages/{owner}/{type}/{name}/{version}/files": { - "get": { - "produces": ["application/json"], - "tags": ["package"], - "summary": "Gets all files of a package", - "operationId": "listPackageFiles", - "parameters": [ - { - "type": "string", - "description": "owner of the package", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "type of the package", - "name": "type", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the package", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "version of the package", - "name": "version", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PackageFileList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/issues/search": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Search for issues across the repositories that the user has access to", - "operationId": "issueSearchIssues", - "parameters": [ - { - "enum": ["open", "closed", "all"], - "type": "string", - "default": "open", - "description": "State of the issue", - "name": "state", - "in": "query" - }, - { - "type": "string", - "description": "Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded.", - "name": "labels", - "in": "query" - }, - { - "type": "string", - "description": "Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded.", - "name": "milestones", - "in": "query" - }, - { - "type": "string", - "description": "Search string", - "name": "q", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Repository ID to prioritize in the results", - "name": "priority_repo_id", - "in": "query" - }, - { - "enum": ["issues", "pulls"], - "type": "string", - "description": "Filter by issue type", - "name": "type", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show issues updated after the given time (RFC 3339 format)", - "name": "since", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show issues updated before the given time (RFC 3339 format)", - "name": "before", - "in": "query" - }, - { - "type": "boolean", - "default": false, - "description": "Filter issues or pulls assigned to the authenticated user", - "name": "assigned", - "in": "query" - }, - { - "type": "boolean", - "default": false, - "description": "Filter issues or pulls created by the authenticated user", - "name": "created", - "in": "query" - }, - { - "type": "boolean", - "default": false, - "description": "Filter issues or pulls mentioning the authenticated user", - "name": "mentioned", - "in": "query" - }, - { - "type": "boolean", - "default": false, - "description": "Filter pull requests where the authenticated user's review was requested", - "name": "review_requested", - "in": "query" - }, - { - "type": "boolean", - "default": false, - "description": "Filter pull requests reviewed by the authenticated user", - "name": "reviewed", - "in": "query" - }, - { - "type": "string", - "description": "Filter by repository owner", - "name": "owner", - "in": "query" - }, - { - "type": "string", - "description": "Filter by team (requires organization owner parameter)", - "name": "team", - "in": "query" - }, - { - "minimum": 1, - "type": "integer", - "default": 1, - "description": "Page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "minimum": 0, - "type": "integer", - "description": "Number of items per page", - "name": "limit", - "in": "query" - }, - { - "enum": [ - "relevance", - "latest", - "oldest", - "recentupdate", - "leastupdate", - "mostcomment", - "leastcomment", - "nearduedate", - "farduedate" - ], - "type": "string", - "default": "latest", - "description": "Type of sort", - "name": "sort", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "400": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/migrate": { - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Migrate a remote git repository", - "operationId": "repoMigrate", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/MigrateRepoOptions" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "409": { - "description": "The repository with the same name already exists." - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/search": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Search for repositories", - "operationId": "repoSearch", - "parameters": [ - { - "type": "string", - "description": "keyword", - "name": "q", - "in": "query" - }, - { - "type": "boolean", - "description": "Limit search to repositories with keyword as topic", - "name": "topic", - "in": "query" - }, - { - "type": "boolean", - "description": "include search of keyword within repository description", - "name": "includeDesc", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "search only for repos that the user with the given id owns or contributes to", - "name": "uid", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "repo owner to prioritize in the results", - "name": "priority_owner_id", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "search only for repos that belong to the given team id", - "name": "team_id", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "search only for repos that the user with the given id has starred", - "name": "starredBy", - "in": "query" - }, - { - "type": "boolean", - "description": "include private repositories this user has access to (defaults to true)", - "name": "private", - "in": "query" - }, - { - "type": "boolean", - "description": "show only public, private or all repositories (defaults to all)", - "name": "is_private", - "in": "query" - }, - { - "type": "boolean", - "description": "include template repositories this user has access to (defaults to true)", - "name": "template", - "in": "query" - }, - { - "type": "boolean", - "description": "show only archived, non-archived or all repositories (defaults to all)", - "name": "archived", - "in": "query" - }, - { - "type": "string", - "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"", - "name": "mode", - "in": "query" - }, - { - "type": "boolean", - "description": "if `uid` is given, search only for repos that the user owns", - "name": "exclusive", - "in": "query" - }, - { - "enum": [ - "alpha", - "created", - "updated", - "size", - "git_size", - "lfs_size", - "id", - "stars", - "forks" - ], - "type": "string", - "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" and \"id\". Default is \"alpha\"", - "name": "sort", - "in": "query" - }, - { - "enum": ["asc", "desc"], - "type": "string", - "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.", - "name": "order", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/SearchResults" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a repository", - "operationId": "repoGet", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a repository", - "operationId": "repoDelete", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to delete", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to delete", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Edit a repository's properties. Only fields that are set will be changed.", - "operationId": "repoEdit", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to edit", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to edit", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "Properties of a repo that you can edit", - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditRepoOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/actions/runners/jobs": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Search for repository's action jobs according filter conditions", - "operationId": "repoSearchRunJobs", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "a comma separated list of run job labels to search for", - "name": "labels", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RunJobList" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/repos/{owner}/{repo}/actions/runners/registration-token": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a repository's actions runner registration token", - "operationId": "repoGetRunnerRegistrationToken", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - } - } - } - }, - "/repos/{owner}/{repo}/actions/runs": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repository's action runs", - "operationId": "ListActionRuns", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results, default maximum page size is 50", - "name": "limit", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "description": "Returns workflow run triggered by the specified events. For example, `push`, `pull_request` or `workflow_dispatch`.", - "name": "event", - "in": "query" - }, - { - "type": "array", - "items": { - "enum": [ - "unknown", - "waiting", - "running", - "success", - "failure", - "cancelled", - "skipped", - "blocked" - ], - "type": "string" - }, - "description": "Returns workflow runs with the check run status or conclusion that is specified. For example, a conclusion can be success or a status can be in_progress. Only Forgejo Actions can set a status of waiting, pending, or requested.\n", - "name": "status", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Returns the workflow run associated with the run number.\n", - "name": "run_number", - "in": "query" - }, - { - "type": "string", - "description": "Only returns workflow runs that are associated with the specified head_sha.", - "name": "head_sha", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActionRunList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/repos/{owner}/{repo}/actions/runs/{run_id}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get an action run", - "operationId": "ActionRun", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the action run", - "name": "run_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActionRun" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/actions/secrets": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List an repo's actions secrets", - "operationId": "repoListActionsSecrets", - "parameters": [ - { - "type": "string", - "description": "owner of the repository", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/SecretList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/actions/secrets/{secretname}": { - "put": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create or Update a secret value in a repository", - "operationId": "updateRepoSecret", - "parameters": [ - { - "type": "string", - "description": "owner of the repository", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateOrUpdateSecretOption" - } - } - ], - "responses": { - "201": { - "description": "response when creating a secret" - }, - "204": { - "description": "response when updating a secret" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a secret in a repository", - "operationId": "deleteRepoSecret", - "parameters": [ - { - "type": "string", - "description": "owner of the repository", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "delete one secret of the organization" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/actions/tasks": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repository's action tasks", - "operationId": "ListActionTasks", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results, default maximum page size is 50", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TasksList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/actions/variables": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get repo-level variables list", - "operationId": "getRepoVariablesList", - "parameters": [ - { - "type": "string", - "description": "name of the owner", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/VariableList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/actions/variables/{variablename}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a repo-level variable", - "operationId": "getRepoVariable", - "parameters": [ - { - "type": "string", - "description": "name of the owner", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActionVariable" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Update a repo-level variable", - "operationId": "updateRepoVariable", - "parameters": [ - { - "type": "string", - "description": "name of the owner", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - } - } - ], - "responses": { - "201": { - "description": "response when updating a repo-level variable" - }, - "204": { - "description": "response when updating a repo-level variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a repo-level variable", - "operationId": "createRepoVariable", - "parameters": [ - { - "type": "string", - "description": "name of the owner", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateVariableOption" - } - } - ], - "responses": { - "201": { - "description": "response when creating a repo-level variable" - }, - "204": { - "description": "response when creating a repo-level variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a repo-level variable", - "operationId": "deleteRepoVariable", - "parameters": [ - { - "type": "string", - "description": "name of the owner", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repository", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "response when deleting a variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches": { - "post": { - "consumes": ["application/json"], - "tags": ["repository"], - "summary": "Dispatches a workflow", - "operationId": "DispatchWorkflow", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the workflow", - "name": "workflowfilename", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/DispatchWorkflowOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/DispatchWorkflowRun" - }, - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/activities/feeds": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repository's activity feeds", - "operationId": "repoListActivityFeeds", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "date", - "description": "the date of the activities to be found", - "name": "date", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActivityFeedsList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/archive/{archive}": { - "get": { - "produces": [ - "application/octet-stream", - "application/zip", - "application/gzip" - ], - "tags": ["repository"], - "summary": "Get an archive of a repository", - "operationId": "repoGetArchive", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "the git reference for download with attached archive format (e.g. master.zip)", - "name": "archive", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "success" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/assignees": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Return all users that have write access and can be assigned to issues", - "operationId": "repoGetAssignees", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/avatar": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Update a repository's avatar", - "operationId": "repoUpdateAvatar", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateRepoAvatarOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a repository's avatar", - "operationId": "repoDeleteAvatar", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/branch_protections": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List branch protections for a repository", - "operationId": "repoListBranchProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtectionList" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a branch protections for a repository", - "operationId": "repoCreateBranchProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateBranchProtectionOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/BranchProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/branch_protections/{name}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a specific branch protection for the repository", - "operationId": "repoGetBranchProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of protected branch", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a specific branch protection for the repository", - "operationId": "repoDeleteBranchProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of protected branch", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Edit a branch protections for a repository. Only fields that are set will be changed", - "operationId": "repoEditBranchProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of protected branch", - "name": "name", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditBranchProtectionOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchProtection" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/branches": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repository's branches", - "operationId": "repoListBranches", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/BranchList" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a branch", - "operationId": "repoCreateBranch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateBranchRepoOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Branch" - }, - "403": { - "description": "The branch is archived or a mirror." - }, - "404": { - "description": "The old branch does not exist." - }, - "409": { - "description": "The branch with the same name already exists." - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/branches/{branch}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Retrieve a specific branch from a repository, including its effective branch protection", - "operationId": "repoGetBranch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "branch to get", - "name": "branch", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Branch" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a specific branch from a repository", - "operationId": "repoDeleteBranch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "branch to delete", - "name": "branch", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Update a branch", - "operationId": "repoUpdateBranch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the branch", - "name": "branch", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateBranchRepoOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/collaborators": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repository's collaborators", - "operationId": "repoListCollaborators", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/collaborators/{collaborator}": { - "get": { - "description": "If the user is a collaborator, return 204. If the user is not a collaborator, return 404.", - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Check if a user is a collaborator of a repository", - "operationId": "repoCheckCollaborator", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the collaborator", - "name": "collaborator", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "put": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Add a collaborator to a repository", - "operationId": "repoAddCollaborator", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the collaborator to add", - "name": "collaborator", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/AddCollaboratorOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a collaborator from a repository", - "operationId": "repoDeleteCollaborator", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the collaborator to delete", - "name": "collaborator", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/collaborators/{collaborator}/permission": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get repository permissions for a user", - "operationId": "repoGetRepoPermissions", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the collaborator", - "name": "collaborator", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoCollaboratorPermission" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/commits": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a list of all commits from a repository", - "operationId": "repoGetAllCommits", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "SHA or branch to start listing commits from (usually 'master')", - "name": "sha", - "in": "query" - }, - { - "type": "string", - "description": "filepath of a file/dir", - "name": "path", - "in": "query" - }, - { - "type": "boolean", - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "name": "stat", - "in": "query" - }, - { - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification", - "in": "query" - }, - { - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results (ignored if used with 'path')", - "name": "limit", - "in": "query" - }, - { - "type": "string", - "description": "commits that match the given specifier will not be listed.", - "name": "not", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommitList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/EmptyRepository" - } - } - } - }, - "/repos/{owner}/{repo}/commits/{ref}/status": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a commit's combined status, by branch/tag/commit reference", - "operationId": "repoGetCombinedStatusByRef", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of branch/tag/commit", - "name": "ref", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CombinedStatus" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/commits/{ref}/statuses": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a commit's statuses, by branch/tag/commit reference", - "operationId": "repoListStatusesByRef", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of branch/tag/commit", - "name": "ref", - "in": "path", - "required": true - }, - { - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "type": "string", - "description": "type of sort", - "name": "sort", - "in": "query" - }, - { - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ], - "type": "string", - "description": "type of state", - "name": "state", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/commits/{sha}/pull": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get the pull request of the commit", - "operationId": "repoGetCommitPullRequest", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "SHA of the commit to get", - "name": "sha", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/compare/{basehead}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get commit comparison information", - "operationId": "repoCompareDiff", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "compare two branches or commits", - "name": "basehead", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Compare" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/contents": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Gets the metadata of all the entries of the root dir", - "operationId": "repoGetContentsList", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", - "name": "ref", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsListResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Modify multiple files in a repository", - "operationId": "repoChangeFiles", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ChangeFilesOptions" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/FilesResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/contents/{filepath}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir", - "operationId": "repoGetContents", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "path of the dir, file, symlink or submodule in the repo", - "name": "filepath", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", - "name": "ref", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ContentsResponse" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Update a file in a repository", - "operationId": "repoUpdateFile", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "path of the file to update", - "name": "filepath", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateFileOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/FileResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a file in a repository", - "operationId": "repoCreateFile", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "path of the file to create", - "name": "filepath", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateFileOptions" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/FileResponse" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "delete": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a file in a repository", - "operationId": "repoDeleteFile", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "path of the file to delete", - "name": "filepath", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteFileOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/FileDeleteResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/convert": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Convert a mirror repo to a normal repo.", - "operationId": "repoConvert", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to convert", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to convert", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/diffpatch": { - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Apply diff patch to repository", - "operationId": "repoApplyDiffPatch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateFileOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/FileResponse" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/editorconfig/{filepath}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get the EditorConfig definitions of a file in a repository", - "operationId": "repoGetEditorConfig", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "filepath of file to get", - "name": "filepath", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", - "name": "ref", - "in": "query" - } - ], - "responses": { - "200": { - "description": "definitions", - "schema": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/flags": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repository's flags", - "operationId": "repoListFlags", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/StringSlice" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Replace all flags of a repository", - "operationId": "repoReplaceAllFlags", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/ReplaceFlagsOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Remove all flags from a repository", - "operationId": "repoDeleteAllFlags", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/flags/{flag}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Check if a repository has a given flag", - "operationId": "repoCheckFlag", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the flag", - "name": "flag", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Add a flag to a repository", - "operationId": "repoAddFlag", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the flag", - "name": "flag", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Remove a flag from a repository", - "operationId": "repoDeleteFlag", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the flag", - "name": "flag", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/forks": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repository's forks", - "operationId": "listForks", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Fork a repository", - "operationId": "createFork", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to fork", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to fork", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateForkOption" - } - } - ], - "responses": { - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "description": "The repository with the same name already exists." - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/git/blobs": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Gets multiple blobs of a repository.", - "operationId": "GetBlobs", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "a comma separated list of blob-sha (mind the overall URL-length limit of ~2,083 chars)", - "name": "shas", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitBlobList" - }, - "400": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/{repo}/git/blobs/{sha}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Gets the blob of a repository.", - "operationId": "GetBlob", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "sha of the blob to retrieve", - "name": "sha", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitBlob" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/git/commits/{sha}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a single commit from a repository", - "operationId": "repoGetSingleCommit", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "a git ref or commit sha", - "name": "sha", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "include diff stats for every commit (disable for speedup, default 'true')", - "name": "stat", - "in": "query" - }, - { - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification", - "in": "query" - }, - { - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Commit" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/git/commits/{sha}.{diffType}": { - "get": { - "produces": ["text/plain"], - "tags": ["repository"], - "summary": "Get a commit's diff or patch", - "operationId": "repoDownloadCommitDiffOrPatch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "SHA of the commit to get", - "name": "sha", - "in": "path", - "required": true - }, - { - "enum": ["diff", "patch"], - "type": "string", - "description": "whether the output is diff or patch", - "name": "diffType", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/string" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/git/notes/{sha}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a note corresponding to a single commit from a repository", - "operationId": "repoGetNote", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "a git ref or commit sha", - "name": "sha", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification", - "in": "query" - }, - { - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/Note" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Set a note corresponding to a single commit from a repository", - "operationId": "repoSetNote", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "a git ref or commit sha", - "name": "sha", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/NoteOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Note" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Removes a note corresponding to a single commit from a repository", - "operationId": "repoRemoveNote", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "a git ref or commit sha", - "name": "sha", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/git/refs": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListAllGitRefs", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReferenceList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/git/refs/{ref}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get specified ref or filtered repository's refs", - "operationId": "repoListGitRefs", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "part or full name of the ref", - "name": "ref", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReferenceList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/git/tags/{sha}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Gets the tag object of an annotated tag (not lightweight tags)", - "operationId": "GetAnnotatedTag", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.", - "name": "sha", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/AnnotatedTag" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/git/trees/{sha}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Gets the tree of a repository.", - "operationId": "GetTree", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "show all directories and files", - "name": "recursive", - "in": "query" - }, - { - "type": "integer", - "description": "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", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "number of items per page", - "name": "per_page", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitTreeResponse" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/hooks": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List the hooks in a repository", - "operationId": "repoListHooks", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/HookList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a hook", - "operationId": "repoCreateHook", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateHookOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/hooks/git": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List the Git hooks in a repository", - "operationId": "repoListGitHooks", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitHookList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/hooks/git/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a Git hook", - "operationId": "repoGetGitHook", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitHook" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a Git hook in a repository", - "operationId": "repoDeleteGitHook", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Edit a Git hook in a repository", - "operationId": "repoEditGitHook", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditGitHookOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/GitHook" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/hooks/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a hook", - "operationId": "repoGetHook", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a hook in a repository", - "operationId": "repoDeleteHook", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the hook to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Edit a hook in a repository", - "operationId": "repoEditHook", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the hook", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditHookOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/hooks/{id}/tests": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Test a push webhook", - "operationId": "repoTestHook", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the hook to test", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", - "name": "ref", - "in": "query" - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issue_config": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Returns the issue config for a repo", - "operationId": "repoGetIssueConfig", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoIssueConfig" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issue_config/validate": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Returns the validation information for a issue config", - "operationId": "repoValidateIssueConfig", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoIssueConfigValidation" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issue_templates": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get available issue templates for a repository", - "operationId": "repoGetIssueTemplates", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueTemplates" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "List a repository's issues", - "operationId": "issueListIssues", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "enum": ["closed", "open", "all"], - "type": "string", - "description": "whether issue is open or closed", - "name": "state", - "in": "query" - }, - { - "type": "string", - "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded", - "name": "labels", - "in": "query" - }, - { - "type": "string", - "description": "search string", - "name": "q", - "in": "query" - }, - { - "enum": ["issues", "pulls"], - "type": "string", - "description": "filter by type (issues / pulls) if set", - "name": "type", - "in": "query" - }, - { - "type": "string", - "description": "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", - "name": "milestones", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format", - "name": "since", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format", - "name": "before", - "in": "query" - }, - { - "type": "string", - "description": "Only show items which were created by the given user", - "name": "created_by", - "in": "query" - }, - { - "type": "string", - "description": "Only show items for which the given user is assigned", - "name": "assigned_by", - "in": "query" - }, - { - "type": "string", - "description": "Only show items in which the given user was mentioned", - "name": "mentioned_by", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "enum": [ - "relevance", - "latest", - "oldest", - "recentupdate", - "leastupdate", - "mostcomment", - "leastcomment", - "nearduedate", - "farduedate" - ], - "type": "string", - "default": "latest", - "description": "Type of sort", - "name": "sort", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "issueCreateIssue", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateIssueOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/comments": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "List all comments in a repository", - "operationId": "issueGetRepoComments", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the provided time are returned.", - "name": "since", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated before the provided time are returned.", - "name": "before", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommentList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/comments/{id}": { - "get": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get a comment", - "operationId": "issueGetComment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": ["issue"], - "summary": "Delete a comment", - "operationId": "issueDeleteComment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of comment to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Edit a comment", - "operationId": "issueEditComment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditIssueCommentOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/comments/{id}/assets": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "List comment's attachments", - "operationId": "issueListIssueCommentAttachments", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/AttachmentList" - }, - "404": { - "$ref": "#/responses/error" - } - } - }, - "post": { - "consumes": ["multipart/form-data"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Create a comment attachment", - "operationId": "issueCreateIssueCommentAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the attachment", - "name": "name", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "time of the attachment's creation. This is a timestamp in RFC 3339 format", - "name": "updated_at", - "in": "query" - }, - { - "type": "file", - "description": "attachment to upload", - "name": "attachment", - "in": "formData", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get a comment attachment", - "operationId": "issueGetIssueCommentAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Delete a comment attachment", - "operationId": "issueDeleteIssueCommentAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Edit a comment attachment", - "operationId": "issueEditIssueCommentAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/comments/{id}/reactions": { - "get": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get a list of reactions from a comment of an issue", - "operationId": "issueGetCommentReactions", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Add a reaction to a comment of an issue", - "operationId": "issuePostCommentReaction", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "content", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Remove a reaction from a comment of an issue", - "operationId": "issueDeleteCommentReaction", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "content", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/pinned": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repo's pinned issues", - "operationId": "repoListPinnedIssues", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get an issue", - "operationId": "issueGetIssue", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue to get", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["issue"], - "summary": "Delete an issue", - "operationId": "issueDelete", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of issue to delete", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "issueEditIssue", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue to edit", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditIssueOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "412": { - "$ref": "#/responses/error" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/assets": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "List issue's attachments", - "operationId": "issueListIssueAttachments", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/AttachmentList" - }, - "404": { - "$ref": "#/responses/error" - } - } - }, - "post": { - "consumes": ["multipart/form-data"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Create an issue attachment", - "operationId": "issueCreateIssueAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the attachment", - "name": "name", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "time of the attachment's creation. This is a timestamp in RFC 3339 format", - "name": "updated_at", - "in": "query" - }, - { - "type": "file", - "description": "attachment to upload", - "name": "attachment", - "in": "formData", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get an issue attachment", - "operationId": "issueGetIssueAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Delete an issue attachment", - "operationId": "issueDeleteIssueAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/error" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Edit an issue attachment", - "operationId": "issueEditIssueAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/blocks": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "List issues that are blocked by this issue", - "operationId": "issueListBlocks", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Block the issue given in the body by the issue in path", - "operationId": "issueCreateIssueBlocking", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "404": { - "description": "the issue does not exist" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Unblock the issue given in the body by the issue in path", - "operationId": "issueRemoveIssueBlocking", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/comments": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "List all comments on an issue", - "operationId": "issueGetComments", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the specified time are returned.", - "name": "since", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated before the provided time are returned.", - "name": "before", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommentList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Add a comment to an issue", - "operationId": "issueCreateComment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateIssueCommentOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Comment" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/comments/{id}": { - "delete": { - "tags": ["issue"], - "summary": "Delete a comment", - "operationId": "issueDeleteCommentDeprecated", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "this parameter is ignored", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of comment to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Edit a comment", - "operationId": "issueEditCommentDeprecated", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "this parameter is ignored", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment to edit", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditIssueCommentOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Comment" - }, - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/deadline": { - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "issueEditIssueDeadline", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue to create or update a deadline on", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditDeadlineOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/IssueDeadline" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/dependencies": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "List an issue's dependencies, i.e all issues that block this issue.", - "operationId": "issueListIssueDependencies", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/IssueList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Make the issue in the url depend on the issue in the form.", - "operationId": "issueCreateIssueDependencies", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Issue" - }, - "404": { - "description": "the issue does not exist" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Remove an issue dependency", - "operationId": "issueRemoveIssueDependencies", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueMeta" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Issue" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/labels": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get an issue's labels", - "operationId": "issueGetLabels", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Replace an issue's labels", - "operationId": "issueReplaceLabels", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Add a label to an issue", - "operationId": "issueAddLabel", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/IssueLabelsOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Remove all labels from an issue", - "operationId": "issueClearLabels", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/DeleteLabelsOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/labels/{identifier}": { - "delete": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Remove a label from an issue", - "operationId": "issueRemoveLabel", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name or id of the label to remove", - "name": "identifier", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/DeleteLabelsOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/pin": { - "post": { - "tags": ["issue"], - "summary": "Pin an Issue", - "operationId": "pinIssue", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of issue to pin", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["issue"], - "summary": "Unpin an Issue", - "operationId": "unpinIssue", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of issue to unpin", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/pin/{position}": { - "patch": { - "tags": ["issue"], - "summary": "Moves the Pin to the given Position", - "operationId": "moveIssuePin", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "the new position", - "name": "position", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/reactions": { - "get": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get a list reactions of an issue", - "operationId": "issueGetIssueReactions", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReactionList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Add a reaction to an issue", - "operationId": "issuePostIssueReaction", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "content", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Reaction" - }, - "201": { - "$ref": "#/responses/Reaction" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Remove a reaction from an issue", - "operationId": "issueDeleteIssueReaction", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "content", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReactionOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": { - "delete": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Delete an issue's existing stopwatch.", - "operationId": "issueDeleteStopWatch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "description": "Cannot cancel a non existent stopwatch" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": { - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Start stopwatch on an issue.", - "operationId": "issueStartStopWatch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue to create the stopwatch on", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/empty" - }, - "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "description": "Cannot start a stopwatch again if it already exists" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": { - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Stop an issue's existing stopwatch.", - "operationId": "issueStopStopWatch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue to stop the stopwatch on", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/empty" - }, - "403": { - "description": "Not repo writer, user does not have rights to toggle stopwatch" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "description": "Cannot stop a non existent stopwatch" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/subscriptions": { - "get": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get users who subscribed on an issue.", - "operationId": "issueSubscriptions", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/subscriptions/check": { - "get": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Check if user is subscribed to an issue", - "operationId": "issueCheckSubscription", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": { - "put": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Subscribe user to issue", - "operationId": "issueAddSubscription", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "user to subscribe", - "name": "user", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "Already subscribed" - }, - "201": { - "description": "Successfully Subscribed" - }, - "304": { - "description": "User can only subscribe itself if he is no admin" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Unsubscribe user from issue", - "operationId": "issueDeleteSubscription", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "user witch unsubscribe", - "name": "user", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "Already unsubscribed" - }, - "201": { - "description": "Successfully Unsubscribed" - }, - "304": { - "description": "User can only subscribe itself if he is no admin" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/timeline": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "List all comments and events on an issue", - "operationId": "issueGetCommentsAndTimeline", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated since the specified time are returned.", - "name": "since", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "if provided, only comments updated before the provided time are returned.", - "name": "before", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TimelineList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/times": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "List an issue's tracked times", - "operationId": "issueTrackedTimes", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "optional filter by user (available for issue managers)", - "name": "user", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", - "name": "since", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", - "name": "before", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Add tracked time to a issue", - "operationId": "issueAddTime", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/AddTimeOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTime" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Reset a tracked time of an issue", - "operationId": "issueResetTime", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue to add tracked time to", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/issues/{index}/times/{id}": { - "delete": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Delete specific tracked time", - "operationId": "issueDeleteTime", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the issue", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of time to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/keys": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repository's keys", - "operationId": "repoListKeys", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "the key_id to search for", - "name": "key_id", - "in": "query" - }, - { - "type": "string", - "description": "fingerprint of the key", - "name": "fingerprint", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/DeployKeyList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Add a key to a repository", - "operationId": "repoCreateKey", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateKeyOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/keys/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a repository's key by id", - "operationId": "repoGetKey", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the key to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/DeployKey" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["repository"], - "summary": "Delete a key from a repository", - "operationId": "repoDeleteKey", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the key to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/labels": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get all of a repository's labels", - "operationId": "issueListLabels", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "enum": [ - "mostissues", - "leastissues", - "reversealphabetically" - ], - "type": "string", - "description": "Specifies the sorting method: mostissues, leastissues, or reversealphabetically.", - "name": "sort", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/LabelList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Create a label", - "operationId": "issueCreateLabel", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateLabelOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/labels/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get a single label", - "operationId": "issueGetLabel", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the label to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["issue"], - "summary": "Delete a label", - "operationId": "issueDeleteLabel", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the label to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Update a label", - "operationId": "issueEditLabel", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the label to edit", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditLabelOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Label" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/languages": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get languages and number of bytes of code written", - "operationId": "repoGetLanguages", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/LanguageStatistics" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/media/{filepath}": { - "get": { - "produces": ["application/octet-stream"], - "tags": ["repository"], - "summary": "Get a file or it's LFS object from a repository", - "operationId": "repoGetRawFileOrLFS", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "filepath of the file to get", - "name": "filepath", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", - "name": "ref", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/milestones": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get all of a repository's opened milestones", - "operationId": "issueGetMilestonesList", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"", - "name": "state", - "in": "query" - }, - { - "type": "string", - "description": "filter by milestone name", - "name": "name", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/MilestoneList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Create a milestone", - "operationId": "issueCreateMilestone", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateMilestoneOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/milestones/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Get a milestone", - "operationId": "issueGetMilestone", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "the milestone to get, identified by ID and if not available by name", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["issue"], - "summary": "Delete a milestone", - "operationId": "issueDeleteMilestone", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "the milestone to delete, identified by ID and if not available by name", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["issue"], - "summary": "Update a milestone", - "operationId": "issueEditMilestone", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "the milestone to edit, identified by ID and if not available by name", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditMilestoneOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Milestone" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/mirror-sync": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Sync a mirrored repository", - "operationId": "repoMirrorSync", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to sync", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to sync", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - } - } - } - }, - "/repos/{owner}/{repo}/new_pin_allowed": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Returns if new Issue Pins are allowed", - "operationId": "repoNewPinAllowed", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepoNewIssuePinsAllowed" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/notifications": { - "get": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["notification"], - "summary": "List users's notification threads on a specific repo", - "operationId": "notifyGetRepoList", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "If true, show notifications marked as read. Default value is false", - "name": "all", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi", - "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned", - "name": "status-types", - "in": "query" - }, - { - "type": "array", - "items": { - "enum": ["issue", "pull", "repository"], - "type": "string" - }, - "collectionFormat": "multi", - "description": "filter notifications by subject type", - "name": "subject-type", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", - "name": "since", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", - "name": "before", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/NotificationThreadList" - } - } - }, - "put": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["notification"], - "summary": "Mark notification threads as read, pinned or unread on a specific repo", - "operationId": "notifyReadRepoList", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "If true, mark all notifications on this repo. Default value is false", - "name": "all", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi", - "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.", - "name": "status-types", - "in": "query" - }, - { - "type": "string", - "description": "Status to mark notifications as. Defaults to read.", - "name": "to-status", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.", - "name": "last_read_at", - "in": "query" - } - ], - "responses": { - "205": { - "$ref": "#/responses/NotificationThreadList" - } - } - } - }, - "/repos/{owner}/{repo}/pulls": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results.", - "operationId": "repoListPullRequests", - "parameters": [ - { - "type": "string", - "description": "Owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "Name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "enum": ["open", "closed", "all"], - "type": "string", - "default": "open", - "description": "State of pull request", - "name": "state", - "in": "query" - }, - { - "enum": [ - "oldest", - "recentupdate", - "recentclose", - "leastupdate", - "mostcomment", - "leastcomment", - "priority" - ], - "type": "string", - "description": "Type of sort", - "name": "sort", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "ID of the milestone", - "name": "milestone", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "collectionFormat": "multi", - "description": "Label IDs", - "name": "labels", - "in": "query" - }, - { - "type": "string", - "description": "Filter by pull request author", - "name": "poster", - "in": "query" - }, - { - "minimum": 1, - "type": "integer", - "default": 1, - "description": "Page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "minimum": 0, - "type": "integer", - "description": "Page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequestList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a pull request", - "operationId": "repoCreatePullRequest", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreatePullRequestOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/pinned": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repo's pinned pull requests", - "operationId": "repoListPinnedPullRequests", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequestList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{base}/{head}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a pull request by base and head", - "operationId": "repoGetPullRequestByBaseHead", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "base of the pull request to get", - "name": "base", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "head of the pull request to get", - "name": "head", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a pull request", - "operationId": "repoGetPullRequest", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullRequest" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.", - "operationId": "repoEditPullRequest", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request to edit", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditPullRequestOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/PullRequest" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "412": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}.{diffType}": { - "get": { - "produces": ["text/plain"], - "tags": ["repository"], - "summary": "Get a pull request diff or patch", - "operationId": "repoDownloadPullDiffOrPatch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path", - "required": true - }, - { - "enum": ["diff", "patch"], - "type": "string", - "description": "whether the output is diff or patch", - "name": "diffType", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`", - "name": "binary", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/string" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}/commits": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get commits for a pull request", - "operationId": "repoGetPullRequestCommits", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "type": "boolean", - "description": "include verification for every commit (disable for speedup, default 'true')", - "name": "verification", - "in": "query" - }, - { - "type": "boolean", - "description": "include a list of affected files for every commit (disable for speedup, default 'true')", - "name": "files", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommitList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}/files": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get changed files for a pull request", - "operationId": "repoGetPullRequestFiles", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "skip to given file", - "name": "skip-to", - "in": "query" - }, - { - "enum": [ - "ignore-all", - "ignore-change", - "ignore-eol", - "show-all" - ], - "type": "string", - "description": "whitespace behavior", - "name": "whitespace", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ChangedFileList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}/merge": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Check if a pull request has been merged", - "operationId": "repoPullRequestIsMerged", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "pull request has been merged" - }, - "404": { - "description": "pull request has not been merged" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Merge a pull request", - "operationId": "repoMergePullRequest", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request to merge", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/MergePullRequestOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Cancel the scheduled auto merge for the given pull request", - "operationId": "repoCancelScheduledAutoMerge", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request to merge", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}/requested_reviewers": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create review requests for a pull request", - "operationId": "repoCreatePullReviewRequests", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/PullReviewList" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Cancel review requests for a pull request", - "operationId": "repoDeletePullReviewRequests", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}/reviews": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List all reviews for a pull request", - "operationId": "repoListPullReviews", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a review to an pull request", - "operationId": "repoCreatePullReview", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreatePullReviewOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a specific review for a pull request", - "operationId": "repoGetPullReview", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Submit a pending review to an pull request", - "operationId": "repoSubmitPullReview", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SubmitPullReviewOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a specific review from a pull request", - "operationId": "repoDeletePullReview", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a specific review for a pull request", - "operationId": "repoGetPullReviewComments", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewCommentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Add a new comment to a pull request review", - "operationId": "repoCreatePullReviewComment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreatePullReviewCommentOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewComment" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a pull review comment", - "operationId": "repoGetPullReviewComment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "comment", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReviewComment" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a pull review comment", - "operationId": "repoDeletePullReviewComment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the comment", - "name": "comment", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Dismiss a review for a pull request", - "operationId": "repoDismissPullReview", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DismissPullReviewOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Cancel to dismiss a review for a pull request", - "operationId": "repoUnDismissPullReview", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request", - "name": "index", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the review", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PullReview" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}/update": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Merge PR's baseBranch into headBranch", - "operationId": "repoUpdatePullRequest", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", - "in": "path", - "required": true - }, - { - "enum": ["merge", "rebase"], - "type": "string", - "description": "how to update pull request", - "name": "style", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/push_mirrors": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get all push mirrors of the repository", - "operationId": "repoListPushMirrors", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PushMirrorList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Set up a new push mirror in a repository", - "operationId": "repoAddPushMirror", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreatePushMirrorOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - } - } - } - }, - "/repos/{owner}/{repo}/push_mirrors-sync": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Sync all push mirrored repository", - "operationId": "repoPushMirrorSync", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to sync", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to sync", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - } - } - } - }, - "/repos/{owner}/{repo}/push_mirrors/{name}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get push mirror of the repository by remoteName", - "operationId": "repoGetPushMirrorByRemoteName", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "remote name of push mirror", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PushMirror" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Remove a push mirror from a repository by remoteName", - "operationId": "repoDeletePushMirror", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "remote name of the pushMirror", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/raw/{filepath}": { - "get": { - "produces": ["application/octet-stream"], - "tags": ["repository"], - "summary": "Get a file from a repository", - "operationId": "repoGetRawFile", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "filepath of the file to get", - "name": "filepath", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", - "name": "ref", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Returns raw file content.", - "schema": { - "type": "file" - } - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/releases": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repo's releases", - "operationId": "repoListReleases", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", - "name": "draft", - "in": "query" - }, - { - "type": "boolean", - "description": "filter (exclude / include) pre-releases", - "name": "pre-release", - "in": "query" - }, - { - "type": "string", - "description": "Search string", - "name": "q", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ReleaseList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a release", - "operationId": "repoCreateRelease", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateReleaseOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/releases/latest": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", - "operationId": "repoGetLatestRelease", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/releases/tags/{tag}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a release by tag name", - "operationId": "repoGetReleaseByTag", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "tag name of the release to get", - "name": "tag", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["repository"], - "summary": "Delete a release by tag name", - "operationId": "repoDeleteReleaseByTag", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "tag name of the release to delete", - "name": "tag", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/releases/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a release", - "operationId": "repoGetRelease", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["repository"], - "summary": "Delete a release", - "operationId": "repoDeleteRelease", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Update a release", - "operationId": "repoEditRelease", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release to edit", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditReleaseOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Release" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/releases/{id}/assets": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List release's attachments", - "operationId": "repoListReleaseAttachments", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/AttachmentList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["multipart/form-data", "application/octet-stream"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a release attachment", - "operationId": "repoCreateReleaseAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the attachment", - "name": "name", - "in": "query" - }, - { - "type": "file", - "description": "attachment to upload (this parameter is incompatible with `external_url`)", - "name": "attachment", - "in": "formData" - }, - { - "type": "string", - "description": "url to external asset (this parameter is incompatible with `attachment`)", - "name": "external_url", - "in": "formData" - } - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - } - } - } - }, - "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a release attachment", - "operationId": "repoGetReleaseAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the attachment to get", - "name": "attachment_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a release attachment", - "operationId": "repoDeleteReleaseAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the attachment to delete", - "name": "attachment_id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Edit a release attachment", - "operationId": "repoEditReleaseAttachment", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the release", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the attachment to edit", - "name": "attachment_id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditAttachmentOptions" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Attachment" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - } - } - } - }, - "/repos/{owner}/{repo}/reviewers": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Return all users that can be requested to review in this repo", - "operationId": "repoGetReviewers", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/signing-key.gpg": { - "get": { - "produces": ["text/plain"], - "tags": ["repository"], - "summary": "Get signing-key.gpg for given repository", - "operationId": "repoSigningKey", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "GPG armored public key", - "schema": { - "type": "string" - } - } - } - } - }, - "/repos/{owner}/{repo}/stargazers": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repo's stargazers", - "operationId": "repoListStargazers", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/statuses/{sha}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a commit's statuses", - "operationId": "repoListStatuses", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path", - "required": true - }, - { - "enum": [ - "oldest", - "recentupdate", - "leastupdate", - "leastindex", - "highestindex" - ], - "type": "string", - "description": "type of sort", - "name": "sort", - "in": "query" - }, - { - "enum": [ - "pending", - "success", - "error", - "failure", - "warning" - ], - "type": "string", - "description": "type of state", - "name": "state", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/CommitStatusList" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a commit status", - "operationId": "repoCreateStatus", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "sha of the commit", - "name": "sha", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateStatusOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/CommitStatus" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/subscribers": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repo's watchers", - "operationId": "repoListSubscribers", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/subscription": { - "get": { - "tags": ["repository"], - "summary": "Check if the current user is watching a repo", - "operationId": "userCurrentCheckSubscription", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "404": { - "description": "User is not watching this repo or repo do not exist" - } - } - }, - "put": { - "tags": ["repository"], - "summary": "Watch a repo", - "operationId": "userCurrentPutSubscription", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/WatchInfo" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["repository"], - "summary": "Unwatch a repo", - "operationId": "userCurrentDeleteSubscription", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/sync_fork": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Gets information about syncing the fork default branch with the base branch", - "operationId": "repoSyncForkDefaultInfo", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/SyncForkInfo" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Syncs the default branch of a fork with the base branch", - "operationId": "repoSyncForkDefault", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/sync_fork/{branch}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Gets information about syncing a fork branch with the base branch", - "operationId": "repoSyncForkBranchInfo", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "The branch", - "name": "branch", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/SyncForkInfo" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Syncs a fork branch with the base branch", - "operationId": "repoSyncForkBranch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "The branch", - "name": "branch", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "400": { - "$ref": "#/responses/error" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/tag_protections": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List tag protections for a repository", - "operationId": "repoListTagProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtectionList" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a tag protections for a repository", - "operationId": "repoCreateTagProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateTagProtectionOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/TagProtection" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/tag_protections/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a specific tag protection for the repository", - "operationId": "repoGetTagProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the tag protect to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtection" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a specific tag protection for the repository", - "operationId": "repoDeleteTagProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of protected tag", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Edit a tag protections for a repository. Only fields that are set will be changed", - "operationId": "repoEditTagProtection", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of protected tag", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditTagProtectionOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagProtection" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/tags": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repository's tags", - "operationId": "repoListTags", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results, default maximum page size is 50", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TagList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a new git tag in a repository", - "operationId": "repoCreateTag", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateTagOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Tag" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/tags/{tag}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get the tag of a repository by tag name", - "operationId": "repoGetTag", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of tag", - "name": "tag", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Tag" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a repository's tag by name", - "operationId": "repoDeleteTag", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of tag to delete", - "name": "tag", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/empty" - }, - "409": { - "$ref": "#/responses/conflict" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/teams": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repository's teams", - "operationId": "repoListTeams", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/TeamList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/teams/{team}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Check if a team is assigned to a repository", - "operationId": "repoCheckTeam", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "team name", - "name": "team", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Team" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - } - } - }, - "put": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Add a team to a repository", - "operationId": "repoAddTeam", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "team name", - "name": "team", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a team from a repository", - "operationId": "repoDeleteTeam", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "team name", - "name": "team", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "405": { - "$ref": "#/responses/error" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/times": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a repo's tracked times", - "operationId": "repoTrackedTimes", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "optional filter by user (available for issue managers)", - "name": "user", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", - "name": "since", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", - "name": "before", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/times/{user}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "List a user's tracked times in a repo", - "operationId": "userTrackedTimes", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of user", - "name": "user", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/topics": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get list of topics that a repository has", - "operationId": "repoListTopics", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TopicNames" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Replace list of topics for a repository", - "operationId": "repoUpdateTopics", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/RepoTopicOptions" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - } - } - }, - "/repos/{owner}/{repo}/topics/{topic}": { - "put": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Add a topic to a repository", - "operationId": "repoAddTopic", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the topic to add", - "name": "topic", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Delete a topic from a repository", - "operationId": "repoDeleteTopic", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the topic to delete", - "name": "topic", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/invalidTopicsError" - } - } - } - }, - "/repos/{owner}/{repo}/transfer": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Transfer a repo ownership", - "operationId": "repoTransfer", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to transfer", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to transfer", - "name": "repo", - "in": "path", - "required": true - }, - { - "description": "Transfer Options", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/TransferRepoOption" - } - } - ], - "responses": { - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repos/{owner}/{repo}/transfer/accept": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Accept a repo transfer", - "operationId": "acceptRepoTransfer", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to transfer", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to transfer", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - } - } - } - }, - "/repos/{owner}/{repo}/transfer/reject": { - "post": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Reject a repo transfer", - "operationId": "rejectRepoTransfer", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to transfer", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to transfer", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/wiki/new": { - "post": { - "consumes": ["application/json"], - "tags": ["repository"], - "summary": "Create a wiki page", - "operationId": "repoCreateWikiPage", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/wiki/page/{pageName}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a wiki page", - "operationId": "repoGetWikiPage", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the page", - "name": "pageName", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/WikiPage" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["repository"], - "summary": "Delete a wiki page", - "operationId": "repoDeleteWikiPage", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the page", - "name": "pageName", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - }, - "patch": { - "consumes": ["application/json"], - "tags": ["repository"], - "summary": "Edit a wiki page", - "operationId": "repoEditWikiPage", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the page", - "name": "pageName", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateWikiPageOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/WikiPage" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "423": { - "$ref": "#/responses/repoArchivedError" - } - } - } - }, - "/repos/{owner}/{repo}/wiki/pages": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get all wiki pages", - "operationId": "repoGetWikiPages", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WikiPageList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/wiki/revisions/{pageName}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get revisions of a wiki page", - "operationId": "repoGetWikiPageRevisions", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the page", - "name": "pageName", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/WikiCommitList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{template_owner}/{template_repo}/generate": { - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Create a repository using a template", - "operationId": "generateRepo", - "parameters": [ - { - "type": "string", - "description": "name of the template repository owner", - "name": "template_owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the template repository", - "name": "template_repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/GenerateRepoOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "409": { - "description": "The repository with the same name already exists." - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/repositories/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Get a repository by id", - "operationId": "repoGetByID", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the repo to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/settings/api": { - "get": { - "produces": ["application/json"], - "tags": ["settings"], - "summary": "Get instance's global settings for api", - "operationId": "getGeneralAPISettings", - "responses": { - "200": { - "$ref": "#/responses/GeneralAPISettings" - } - } - } - }, - "/settings/attachment": { - "get": { - "produces": ["application/json"], - "tags": ["settings"], - "summary": "Get instance's global settings for Attachment", - "operationId": "getGeneralAttachmentSettings", - "responses": { - "200": { - "$ref": "#/responses/GeneralAttachmentSettings" - } - } - } - }, - "/settings/repository": { - "get": { - "produces": ["application/json"], - "tags": ["settings"], - "summary": "Get instance's global settings for repositories", - "operationId": "getGeneralRepositorySettings", - "responses": { - "200": { - "$ref": "#/responses/GeneralRepoSettings" - } - } - } - }, - "/settings/ui": { - "get": { - "produces": ["application/json"], - "tags": ["settings"], - "summary": "Get instance's global settings for ui", - "operationId": "getGeneralUISettings", - "responses": { - "200": { - "$ref": "#/responses/GeneralUISettings" - } - } - } - }, - "/signing-key.gpg": { - "get": { - "produces": ["text/plain"], - "tags": ["miscellaneous"], - "summary": "Get default signing-key.gpg", - "operationId": "getSigningKey", - "responses": { - "200": { - "description": "GPG armored public key", - "schema": { - "type": "string" - } - } - } - } - }, - "/signing-key.ssh": { - "get": { - "produces": ["text/plain"], - "tags": ["miscellaneous"], - "summary": "Get default signing-key.ssh", - "operationId": "getSSHSigningKey", - "responses": { - "200": { - "description": "SSH public key in OpenSSH authorized key format", - "schema": { - "type": "string" - } - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/teams/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Get a team", - "operationId": "orgGetTeam", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Team" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["organization"], - "summary": "Delete a team", - "operationId": "orgDeleteTeam", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "team deleted" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Edit a team", - "operationId": "orgEditTeam", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team to edit", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditTeamOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Team" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/teams/{id}/activities/feeds": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List a team's activity feeds", - "operationId": "orgListTeamActivityFeeds", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "date", - "description": "the date of the activities to be found", - "name": "date", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActivityFeedsList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/teams/{id}/members": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List a team's members", - "operationId": "orgListTeamMembers", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/teams/{id}/members/{username}": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List a particular member of team", - "operationId": "orgListTeamMember", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the member to list", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/User" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Add a team member", - "operationId": "orgAddTeamMember", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the user to add", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Remove a team member", - "operationId": "orgRemoveTeamMember", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of the user to remove", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/teams/{id}/repos": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List a team's repos", - "operationId": "orgListTeamRepos", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/teams/{id}/repos/{org}/{repo}": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List a particular repo of team", - "operationId": "orgListTeamRepo", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "organization that owns the repo to list", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to list", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Repository" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Add a repository to a team", - "operationId": "orgAddTeamRepository", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "organization that owns the repo to add", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to add", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "description": "This does not delete the repository, it only removes the repository from the team.", - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Remove a repository from a team", - "operationId": "orgRemoveTeamRepository", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the team", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "organization that owns the repo to remove", - "name": "org", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to remove", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/topics/search": { - "get": { - "produces": ["application/json"], - "tags": ["repository"], - "summary": "Search for topics by keyword", - "operationId": "topicSearch", - "parameters": [ - { - "type": "string", - "description": "keyword to search for", - "name": "q", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "description": "SearchResults of a successful search", - "schema": { - "type": "object", - "title": "TopicSearchResults", - "properties": { - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/TopicResponse" - } - } - } - } - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get the authenticated user", - "operationId": "userGetCurrent", - "responses": { - "200": { - "$ref": "#/responses/User" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/actions/runners/jobs": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Search for user's action jobs according filter conditions", - "operationId": "userSearchRunJobs", - "parameters": [ - { - "type": "string", - "description": "a comma separated list of run job labels to search for", - "name": "labels", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RunJobList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/actions/runners/registration-token": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get an user's actions runner registration token", - "operationId": "userGetRunnerRegistrationToken", - "responses": { - "200": { - "$ref": "#/responses/RegistrationToken" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/actions/secrets/{secretname}": { - "put": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["user"], - "summary": "Create or Update a secret value in a user scope", - "operationId": "updateUserSecret", - "parameters": [ - { - "type": "string", - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateOrUpdateSecretOption" - } - } - ], - "responses": { - "201": { - "description": "response when creating a secret" - }, - "204": { - "description": "response when updating a secret" - }, - "400": { - "$ref": "#/responses/error" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["user"], - "summary": "Delete a secret in a user scope", - "operationId": "deleteUserSecret", - "parameters": [ - { - "type": "string", - "description": "name of the secret", - "name": "secretname", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "delete one secret of the user" - }, - "400": { - "$ref": "#/responses/error" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user/actions/variables": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get the user-level list of variables which is created by current doer", - "operationId": "getUserVariablesList", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/VariableList" - }, - "400": { - "$ref": "#/responses/error" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user/actions/variables/{variablename}": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get a user-level variable which is created by current doer", - "operationId": "getUserVariable", - "parameters": [ - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActionVariable" - }, - "400": { - "$ref": "#/responses/error" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["user"], - "summary": "Update a user-level variable which is created by current doer", - "operationId": "updateUserVariable", - "parameters": [ - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateVariableOption" - } - } - ], - "responses": { - "201": { - "description": "response when updating a variable" - }, - "204": { - "description": "response when updating a variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["user"], - "summary": "Create a user-level variable", - "operationId": "createUserVariable", - "parameters": [ - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateVariableOption" - } - } - ], - "responses": { - "201": { - "description": "response when creating a variable" - }, - "204": { - "description": "response when creating a variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Delete a user-level variable which is created by current doer", - "operationId": "deleteUserVariable", - "parameters": [ - { - "type": "string", - "description": "name of the variable", - "name": "variablename", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "description": "response when deleting a variable" - }, - "204": { - "description": "response when deleting a variable" - }, - "400": { - "$ref": "#/responses/error" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user/applications/oauth2": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the authenticated user's oauth2 applications", - "operationId": "userGetOAuth2Applications", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/OAuth2ApplicationList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Creates a new OAuth2 application", - "operationId": "userCreateOAuth2Application", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOAuth2ApplicationOptions" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/OAuth2Application" - }, - "400": { - "$ref": "#/responses/error" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/applications/oauth2/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get an OAuth2 application", - "operationId": "userGetOAuth2Application", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Application ID to be found", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/OAuth2Application" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Delete an OAuth2 application", - "operationId": "userDeleteOAuth2Application", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "token to be deleted", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "patch": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Update an OAuth2 application, this includes regenerating the client secret", - "operationId": "userUpdateOAuth2Application", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "application to be updated", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOAuth2ApplicationOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/OAuth2Application" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user/avatar": { - "post": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Update avatar of the current user", - "operationId": "userUpdateAvatar", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateUserAvatarOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Delete avatar of the current user. It will be replaced by a default one", - "operationId": "userDeleteAvatar", - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/block/{username}": { - "put": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Blocks a user from the doer", - "operationId": "userBlockUser", - "parameters": [ - { - "type": "string", - "description": "username of the user", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/user/emails": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List all email addresses of the current user", - "operationId": "userListEmails", - "responses": { - "200": { - "$ref": "#/responses/EmailList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "post": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Add an email addresses to the current user's account", - "operationId": "userAddEmail", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateEmailOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/EmailList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Delete email addresses from the current user's account", - "operationId": "userDeleteEmail", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/DeleteEmailOption" - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user/followers": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the authenticated user's followers", - "operationId": "userCurrentListFollowers", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/following": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the users that the authenticated user is following", - "operationId": "userCurrentListFollowing", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/following/{username}": { - "get": { - "tags": ["user"], - "summary": "Check whether a user is followed by the authenticated user", - "operationId": "userCurrentCheckFollowing", - "parameters": [ - { - "type": "string", - "description": "username of followed user", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "tags": ["user"], - "summary": "Follow a user", - "operationId": "userCurrentPutFollow", - "parameters": [ - { - "type": "string", - "description": "username of user to follow", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["user"], - "summary": "Unfollow a user", - "operationId": "userCurrentDeleteFollow", - "parameters": [ - { - "type": "string", - "description": "username of user to unfollow", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user/gpg_key_token": { - "get": { - "produces": ["text/plain"], - "tags": ["user"], - "summary": "Get a Token to verify", - "operationId": "getVerificationToken", - "responses": { - "200": { - "$ref": "#/responses/string" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user/gpg_key_verify": { - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["user"], - "summary": "Verify a GPG key", - "operationId": "userVerifyGPGKey", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/VerifyGPGKeyOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/GPGKey" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/user/gpg_keys": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the authenticated user's GPG keys", - "operationId": "userCurrentListGPGKeys", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/GPGKeyList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["user"], - "summary": "Add a GPG public key to current user's account", - "operationId": "userCurrentPostGPGKey", - "parameters": [ - { - "name": "Form", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateGPGKeyOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/GPGKey" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/user/gpg_keys/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get a GPG key", - "operationId": "userCurrentGetGPGKey", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of key to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/GPGKey" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Remove a GPG public key from current user's account", - "operationId": "userCurrentDeleteGPGKey", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of key to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user/hooks": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the authenticated user's webhooks", - "operationId": "userListHooks", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/HookList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["user"], - "summary": "Create a hook", - "operationId": "userCreateHook", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateHookOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Hook" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/hooks/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get a hook", - "operationId": "userGetHook", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the hook to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Delete a hook", - "operationId": "userDeleteHook", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the hook to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "patch": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["user"], - "summary": "Update a hook", - "operationId": "userEditHook", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of the hook to update", - "name": "id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/EditHookOption" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/Hook" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/keys": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the authenticated user's public keys", - "operationId": "userCurrentListKeys", - "parameters": [ - { - "type": "string", - "description": "fingerprint of the key", - "name": "fingerprint", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PublicKeyList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["user"], - "summary": "Create a public key", - "operationId": "userCurrentPostKey", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateKeyOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/PublicKey" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/user/keys/{id}": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get a public key", - "operationId": "userCurrentGetKey", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of key to get", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/PublicKey" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Delete a public key", - "operationId": "userCurrentDeleteKey", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "id of key to delete", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user/list_blocked": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the authenticated user's blocked users", - "operationId": "userListBlockedUsers", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/BlockedUserList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/orgs": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List the current user's organizations", - "operationId": "orgListCurrentUserOrgs", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/OrganizationList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user/quota": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get quota information for the authenticated user", - "operationId": "userGetQuota", - "responses": { - "200": { - "$ref": "#/responses/QuotaInfo" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/quota/artifacts": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the artifacts affecting the authenticated user's quota", - "operationId": "userListQuotaArtifacts", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/QuotaUsedArtifactList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/quota/attachments": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the attachments affecting the authenticated user's quota", - "operationId": "userListQuotaAttachments", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/QuotaUsedAttachmentList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/quota/check": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Check if the authenticated user is over quota for a given subject", - "operationId": "userCheckQuota", - "parameters": [ - { - "type": "string", - "description": "subject of the quota", - "name": "subject", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "Returns true if the action is accepted.", - "schema": { - "type": "boolean" - } - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/user/quota/packages": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the packages affecting the authenticated user's quota", - "operationId": "userListQuotaPackages", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/QuotaUsedPackageList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/repos": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the repos that the authenticated user owns", - "operationId": "userCurrentListRepos", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "enum": [ - "name", - "id", - "newest", - "oldest", - "recentupdate", - "leastupdate", - "reversealphabetically", - "alphabetically", - "reversesize", - "size", - "reversegitsize", - "gitsize", - "reverselfssize", - "lfssize", - "moststars", - "feweststars", - "mostforks", - "fewestforks" - ], - "type": "string", - "description": "order the repositories", - "name": "order_by", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["repository", "user"], - "summary": "Create a repository", - "operationId": "createCurrentUserRepo", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateRepoOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/Repository" - }, - "400": { - "$ref": "#/responses/error" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "409": { - "description": "The repository with the same name already exists." - }, - "413": { - "$ref": "#/responses/quotaExceeded" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/user/settings": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get current user's account settings", - "operationId": "getUserSettings", - "responses": { - "200": { - "$ref": "#/responses/UserSettings" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - }, - "patch": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Update settings in current user's account", - "operationId": "updateUserSettings", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UserSettingsOptions" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserSettings" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/starred": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "The repos that the authenticated user has starred", - "operationId": "userCurrentListStarred", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/starred/{owner}/{repo}": { - "get": { - "tags": ["user"], - "summary": "Whether the authenticated is starring the repo", - "operationId": "userCurrentCheckStarring", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "put": { - "tags": ["user"], - "summary": "Star the given repo", - "operationId": "userCurrentPutStar", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to star", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to star", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "delete": { - "tags": ["user"], - "summary": "Unstar the given repo", - "operationId": "userCurrentDeleteStar", - "parameters": [ - { - "type": "string", - "description": "owner of the repo to unstar", - "name": "owner", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the repo to unstar", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/user/stopwatches": { - "get": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get list of all existing stopwatches", - "operationId": "userGetStopWatches", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/StopWatchList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/subscriptions": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List repositories watched by the authenticated user", - "operationId": "userCurrentListSubscriptions", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/teams": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List all the teams a user belongs to", - "operationId": "userListTeams", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TeamList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/times": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the current user's tracked times", - "operationId": "userCurrentTrackedTimes", - "parameters": [ - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", - "name": "since", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", - "name": "before", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - } - } - } - }, - "/user/unblock/{username}": { - "put": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Unblocks a user from the doer", - "operationId": "userUnblockUser", - "parameters": [ - { - "type": "string", - "description": "username of the user", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "401": { - "$ref": "#/responses/unauthorized" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - } - } - } - }, - "/users/search": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Search for users", - "operationId": "userSearch", - "parameters": [ - { - "type": "string", - "description": "keyword", - "name": "q", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "ID of the user to search for", - "name": "uid", - "in": "query" - }, - { - "enum": [ - "oldest", - "newest", - "alphabetically", - "reversealphabetically", - "recentupdate", - "leastupdate" - ], - "type": "string", - "description": "sort order of results", - "name": "sort", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "description": "SearchResults of a successful search", - "schema": { - "type": "object", - "title": "UserSearchResults", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/User" - } - }, - "ok": { - "type": "boolean" - } - } - } - } - } - } - }, - "/users/{username}": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get a user", - "operationId": "userGet", - "parameters": [ - { - "type": "string", - "description": "username of user to get", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/User" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/activities/feeds": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List a user's activity feeds", - "operationId": "userListActivityFeeds", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "if true, only show actions performed by the requested user", - "name": "only-performed-by", - "in": "query" - }, - { - "type": "string", - "format": "date", - "description": "the date of the activities to be found", - "name": "date", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/ActivityFeedsList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/followers": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the given user's followers", - "operationId": "userListFollowers", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/following": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the users that the given user is following", - "operationId": "userListFollowing", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/following/{target}": { - "get": { - "tags": ["user"], - "summary": "Check if one user is following another user", - "operationId": "userCheckFollowing", - "parameters": [ - { - "type": "string", - "description": "username of following user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of followed user", - "name": "target", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/gpg_keys": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the given user's GPG keys", - "operationId": "userListGPGKeys", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/GPGKeyList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/heatmap": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Get a user's heatmap", - "operationId": "userGetHeatmapData", - "parameters": [ - { - "type": "string", - "description": "username of user to get", - "name": "username", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/UserHeatmapData" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/keys": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the given user's public keys", - "operationId": "userListKeys", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "fingerprint of the key", - "name": "fingerprint", - "in": "query" - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/PublicKeyList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/orgs": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "List a user's organizations", - "operationId": "orgListUserOrgs", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/OrganizationList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/orgs/{org}/permissions": { - "get": { - "produces": ["application/json"], - "tags": ["organization"], - "summary": "Get user permissions in organization", - "operationId": "orgGetUserPermissions", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "name of the organization", - "name": "org", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/OrganizationPermissions" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/repos": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the repos owned by the given user", - "operationId": "userListRepos", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/starred": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "The repos that the given user has starred", - "operationId": "userListStarred", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/subscriptions": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the repositories watched by a user", - "operationId": "userListSubscriptions", - "parameters": [ - { - "type": "string", - "description": "username of the user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/RepositoryList" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/tokens": { - "get": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "List the specified user's access tokens", - "operationId": "userGetTokens", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "page number of results to return (1-based)", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "page size of results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/AccessTokenList" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - }, - "post": { - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["user"], - "summary": "Generate an access token for the specified user", - "operationId": "userCreateToken", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateAccessTokenOption" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/AccessToken" - }, - "400": { - "$ref": "#/responses/error" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/users/{username}/tokens/{token}": { - "delete": { - "produces": ["application/json"], - "tags": ["user"], - "summary": "Delete an access token from the specified user's account", - "operationId": "userDeleteAccessToken", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "token to be deleted, identified by ID and if not available by name", - "name": "token", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/error" - } - } - } - }, - "/version": { - "get": { - "produces": ["application/json"], - "tags": ["miscellaneous"], - "summary": "Returns the version of the running application", - "operationId": "getVersion", - "responses": { - "200": { - "$ref": "#/responses/ServerVersion" - } - } - } - } - }, - "definitions": { - "APIError": { - "description": "APIError is an api error with a message", - "type": "object", - "properties": { - "message": { - "type": "string", - "x-go-name": "Message" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "APIForbiddenError": { - "type": "object", - "properties": { - "message": { - "type": "string", - "x-go-name": "Message" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/services/context" - }, - "APIInternalServerError": { - "type": "object", - "properties": { - "message": { - "type": "string", - "x-go-name": "Message" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/services/context" - }, - "APIInvalidTopicsError": { - "type": "object", - "properties": { - "invalidTopics": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "InvalidTopics" - }, - "message": { - "type": "string", - "x-go-name": "Message" - } - }, - "x-go-package": "forgejo.org/services/context" - }, - "APINotFound": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Errors" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/services/context" - }, - "APIRepoArchivedError": { - "type": "object", - "properties": { - "message": { - "type": "string", - "x-go-name": "Message" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/services/context" - }, - "APIUnauthorizedError": { - "type": "object", - "properties": { - "message": { - "type": "string", - "x-go-name": "Message" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/services/context" - }, - "APIValidationError": { - "type": "object", - "properties": { - "message": { - "type": "string", - "x-go-name": "Message" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/services/context" - }, - "AccessToken": { - "type": "object", - "title": "AccessToken represents an API access token.", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "scopes": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Scopes" - }, - "sha1": { - "type": "string", - "x-go-name": "Token" - }, - "token_last_eight": { - "type": "string", - "x-go-name": "TokenLastEight" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ActionRun": { - "description": "ActionRun represents an action run", - "type": "object", - "properties": { - "ScheduleID": { - "description": "the cron id for the schedule trigger", - "type": "integer", - "format": "int64" - }, - "approved_by": { - "description": "who approved this action run", - "type": "integer", - "format": "int64", - "x-go-name": "ApprovedBy" - }, - "commit_sha": { - "description": "the commit sha the action run ran on", - "type": "string", - "x-go-name": "CommitSHA" - }, - "created": { - "description": "when the action run was created", - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "duration": { - "$ref": "#/definitions/Duration" - }, - "event": { - "description": "the webhook event that causes the workflow to run", - "type": "string", - "x-go-name": "Event" - }, - "event_payload": { - "description": "the payload of the webhook event that causes the workflow to run", - "type": "string", - "x-go-name": "EventPayload" - }, - "html_url": { - "description": "the url of this action run", - "type": "string", - "x-go-name": "HTMLURL" - }, - "id": { - "description": "the action run id", - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "index_in_repo": { - "description": "a unique number for each run of a repository", - "type": "integer", - "format": "int64", - "x-go-name": "Index" - }, - "is_fork_pull_request": { - "description": "If this is triggered by a PR from a forked repository or an untrusted user, we need to check if it is approved and limit permissions when running the workflow.", - "type": "boolean", - "x-go-name": "IsForkPullRequest" - }, - "is_ref_deleted": { - "description": "has the commit/tag/… the action run ran on been deleted", - "type": "boolean", - "x-go-name": "IsRefDeleted" - }, - "need_approval": { - "description": "may need approval if it's a fork pull request", - "type": "boolean", - "x-go-name": "NeedApproval" - }, - "prettyref": { - "description": "the commit/tag/… the action run ran on", - "type": "string", - "x-go-name": "PrettyRef" - }, - "repository": { - "$ref": "#/definitions/Repository" - }, - "started": { - "description": "when the action run was started", - "type": "string", - "format": "date-time", - "x-go-name": "Started" - }, - "status": { - "description": "the current status of this run", - "type": "string", - "x-go-name": "Status" - }, - "stopped": { - "description": "when the action run was stopped", - "type": "string", - "format": "date-time", - "x-go-name": "Stopped" - }, - "title": { - "description": "the action run's title", - "type": "string", - "x-go-name": "Title" - }, - "trigger_event": { - "description": "the trigger event defined in the `on` configuration of the triggered workflow", - "type": "string", - "x-go-name": "TriggerEvent" - }, - "trigger_user": { - "$ref": "#/definitions/User" - }, - "updated": { - "description": "when the action run was last updated", - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "workflow_id": { - "description": "the name of workflow file", - "type": "string", - "x-go-name": "WorkflowID" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ActionRunJob": { - "description": "ActionRunJob represents a job of a run", - "type": "object", - "properties": { - "id": { - "description": "the action run job id", - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "name": { - "description": "the action run job name", - "type": "string", - "x-go-name": "Name" - }, - "needs": { - "description": "the action run job needed ids", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Needs" - }, - "owner_id": { - "description": "the owner id", - "type": "integer", - "format": "int64", - "x-go-name": "OwnerID" - }, - "repo_id": { - "description": "the repository id", - "type": "integer", - "format": "int64", - "x-go-name": "RepoID" - }, - "runs_on": { - "description": "the action run job labels to run on", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "RunsOn" - }, - "status": { - "description": "the action run job status", - "type": "string", - "x-go-name": "Status" - }, - "task_id": { - "description": "the action run job latest task id", - "type": "integer", - "format": "int64", - "x-go-name": "TaskID" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ActionTask": { - "description": "ActionTask represents a ActionTask", - "type": "object", - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "CreatedAt" - }, - "display_title": { - "type": "string", - "x-go-name": "DisplayTitle" - }, - "event": { - "type": "string", - "x-go-name": "Event" - }, - "head_branch": { - "type": "string", - "x-go-name": "HeadBranch" - }, - "head_sha": { - "type": "string", - "x-go-name": "HeadSHA" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "run_number": { - "type": "integer", - "format": "int64", - "x-go-name": "RunNumber" - }, - "run_started_at": { - "type": "string", - "format": "date-time", - "x-go-name": "RunStartedAt" - }, - "status": { - "type": "string", - "x-go-name": "Status" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "UpdatedAt" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "workflow_id": { - "type": "string", - "x-go-name": "WorkflowID" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ActionTaskResponse": { - "description": "ActionTaskResponse returns a ActionTask", - "type": "object", - "properties": { - "total_count": { - "type": "integer", - "format": "int64", - "x-go-name": "TotalCount" - }, - "workflow_runs": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionTask" - }, - "x-go-name": "Entries" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ActionVariable": { - "description": "ActionVariable return value of the query API", - "type": "object", - "properties": { - "data": { - "description": "the value of the variable", - "type": "string", - "x-go-name": "Data" - }, - "name": { - "description": "the name of the variable", - "type": "string", - "x-go-name": "Name" - }, - "owner_id": { - "description": "the owner to which the variable belongs", - "type": "integer", - "format": "int64", - "x-go-name": "OwnerID" - }, - "repo_id": { - "description": "the repository to which the variable belongs", - "type": "integer", - "format": "int64", - "x-go-name": "RepoID" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Activity": { - "type": "object", - "properties": { - "act_user": { - "$ref": "#/definitions/User" - }, - "act_user_id": { - "type": "integer", - "format": "int64", - "x-go-name": "ActUserID" - }, - "comment": { - "$ref": "#/definitions/Comment" - }, - "comment_id": { - "type": "integer", - "format": "int64", - "x-go-name": "CommentID" - }, - "content": { - "type": "string", - "x-go-name": "Content" - }, - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "is_private": { - "type": "boolean", - "x-go-name": "IsPrivate" - }, - "op_type": { - "description": "the type of action", - "type": "string", - "enum": [ - "create_repo", - "rename_repo", - "star_repo", - "watch_repo", - "commit_repo", - "create_issue", - "create_pull_request", - "transfer_repo", - "push_tag", - "comment_issue", - "merge_pull_request", - "close_issue", - "reopen_issue", - "close_pull_request", - "reopen_pull_request", - "delete_tag", - "delete_branch", - "mirror_sync_push", - "mirror_sync_create", - "mirror_sync_delete", - "approve_pull_request", - "reject_pull_request", - "comment_pull", - "publish_release", - "pull_review_dismissed", - "pull_request_ready_for_review", - "auto_merge_pull_request" - ], - "x-go-name": "OpType" - }, - "ref_name": { - "type": "string", - "x-go-name": "RefName" - }, - "repo": { - "$ref": "#/definitions/Repository" - }, - "repo_id": { - "type": "integer", - "format": "int64", - "x-go-name": "RepoID" - }, - "user_id": { - "type": "integer", - "format": "int64", - "x-go-name": "UserID" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ActivityPub": { - "description": "ActivityPub type", - "type": "object", - "properties": { - "@context": { - "type": "string", - "x-go-name": "Context" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "AddCollaboratorOption": { - "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository", - "type": "object", - "properties": { - "permission": { - "type": "string", - "enum": ["read", "write", "admin"], - "x-go-name": "Permission" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "AddTimeOption": { - "description": "AddTimeOption options for adding time to an issue", - "type": "object", - "required": ["time"], - "properties": { - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "time": { - "description": "time in seconds", - "type": "integer", - "format": "int64", - "x-go-name": "Time" - }, - "user_name": { - "description": "User who spent the time (optional)", - "type": "string", - "x-go-name": "User" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "AnnotatedTag": { - "description": "AnnotatedTag represents an annotated tag", - "type": "object", - "properties": { - "archive_download_count": { - "$ref": "#/definitions/TagArchiveDownloadCount" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, - "object": { - "$ref": "#/definitions/AnnotatedTagObject" - }, - "sha": { - "type": "string", - "x-go-name": "SHA" - }, - "tag": { - "type": "string", - "x-go-name": "Tag" - }, - "tagger": { - "$ref": "#/definitions/CommitUser" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "verification": { - "$ref": "#/definitions/PayloadCommitVerification" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "AnnotatedTagObject": { - "description": "AnnotatedTagObject contains meta information of the tag object", - "type": "object", - "properties": { - "sha": { - "type": "string", - "x-go-name": "SHA" - }, - "type": { - "type": "string", - "x-go-name": "Type" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Attachment": { - "description": "Attachment a generic attachment", - "type": "object", - "properties": { - "browser_download_url": { - "type": "string", - "x-go-name": "DownloadURL" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "download_count": { - "type": "integer", - "format": "int64", - "x-go-name": "DownloadCount" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "size": { - "type": "integer", - "format": "int64", - "x-go-name": "Size" - }, - "type": { - "type": "string", - "enum": ["attachment", "external"], - "x-go-name": "Type" - }, - "uuid": { - "type": "string", - "x-go-name": "UUID" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "BlockedUser": { - "type": "object", - "title": "BlockedUser represents a blocked user.", - "properties": { - "block_id": { - "type": "integer", - "format": "int64", - "x-go-name": "BlockID" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Branch": { - "description": "Branch represents a repository branch", - "type": "object", - "properties": { - "commit": { - "$ref": "#/definitions/PayloadCommit" - }, - "effective_branch_protection_name": { - "type": "string", - "x-go-name": "EffectiveBranchProtectionName" - }, - "enable_status_check": { - "type": "boolean", - "x-go-name": "EnableStatusCheck" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "protected": { - "type": "boolean", - "x-go-name": "Protected" - }, - "required_approvals": { - "type": "integer", - "format": "int64", - "x-go-name": "RequiredApprovals" - }, - "status_check_contexts": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "StatusCheckContexts" - }, - "user_can_merge": { - "type": "boolean", - "x-go-name": "UserCanMerge" - }, - "user_can_push": { - "type": "boolean", - "x-go-name": "UserCanPush" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "BranchProtection": { - "description": "BranchProtection represents a branch protection for a repository", - "type": "object", - "properties": { - "apply_to_admins": { - "type": "boolean", - "x-go-name": "ApplyToAdmins" - }, - "approvals_whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "ApprovalsWhitelistTeams" - }, - "approvals_whitelist_username": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "ApprovalsWhitelistUsernames" - }, - "block_on_official_review_requests": { - "type": "boolean", - "x-go-name": "BlockOnOfficialReviewRequests" - }, - "block_on_outdated_branch": { - "type": "boolean", - "x-go-name": "BlockOnOutdatedBranch" - }, - "block_on_rejected_reviews": { - "type": "boolean", - "x-go-name": "BlockOnRejectedReviews" - }, - "branch_name": { - "description": "Deprecated: true", - "type": "string", - "x-go-name": "BranchName" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "dismiss_stale_approvals": { - "type": "boolean", - "x-go-name": "DismissStaleApprovals" - }, - "enable_approvals_whitelist": { - "type": "boolean", - "x-go-name": "EnableApprovalsWhitelist" - }, - "enable_merge_whitelist": { - "type": "boolean", - "x-go-name": "EnableMergeWhitelist" - }, - "enable_push": { - "type": "boolean", - "x-go-name": "EnablePush" - }, - "enable_push_whitelist": { - "type": "boolean", - "x-go-name": "EnablePushWhitelist" - }, - "enable_status_check": { - "type": "boolean", - "x-go-name": "EnableStatusCheck" - }, - "ignore_stale_approvals": { - "type": "boolean", - "x-go-name": "IgnoreStaleApprovals" - }, - "merge_whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "MergeWhitelistTeams" - }, - "merge_whitelist_usernames": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "MergeWhitelistUsernames" - }, - "protected_file_patterns": { - "type": "string", - "x-go-name": "ProtectedFilePatterns" - }, - "push_whitelist_deploy_keys": { - "type": "boolean", - "x-go-name": "PushWhitelistDeployKeys" - }, - "push_whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "PushWhitelistTeams" - }, - "push_whitelist_usernames": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "PushWhitelistUsernames" - }, - "require_signed_commits": { - "type": "boolean", - "x-go-name": "RequireSignedCommits" - }, - "required_approvals": { - "type": "integer", - "format": "int64", - "x-go-name": "RequiredApprovals" - }, - "rule_name": { - "type": "string", - "x-go-name": "RuleName" - }, - "status_check_contexts": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "StatusCheckContexts" - }, - "unprotected_file_patterns": { - "type": "string", - "x-go-name": "UnprotectedFilePatterns" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ChangeFileOperation": { - "description": "ChangeFileOperation for creating, updating or deleting a file", - "type": "object", - "required": ["operation", "path"], - "properties": { - "content": { - "description": "new or updated file content, must be base64 encoded", - "type": "string", - "x-go-name": "ContentBase64" - }, - "from_path": { - "description": "old path of the file to move", - "type": "string", - "x-go-name": "FromPath" - }, - "operation": { - "description": "indicates what to do with the file", - "type": "string", - "enum": ["create", "update", "delete"], - "x-go-name": "Operation" - }, - "path": { - "description": "path to the existing or new file", - "type": "string", - "x-go-name": "Path" - }, - "sha": { - "description": "sha is the SHA for the file that already exists, required for update or delete", - "type": "string", - "x-go-name": "SHA" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ChangeFilesOptions": { - "description": "ChangeFilesOptions options for creating, updating or deleting multiple files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", - "type": "object", - "required": ["files"], - "properties": { - "author": { - "$ref": "#/definitions/Identity" - }, - "branch": { - "description": "branch (optional) to base this file from. if not given, the default branch is used", - "type": "string", - "x-go-name": "BranchName" - }, - "committer": { - "$ref": "#/definitions/Identity" - }, - "dates": { - "$ref": "#/definitions/CommitDateOptions" - }, - "files": { - "description": "list of file operations", - "type": "array", - "items": { - "$ref": "#/definitions/ChangeFileOperation" - }, - "x-go-name": "Files" - }, - "message": { - "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", - "type": "string", - "x-go-name": "Message" - }, - "new_branch": { - "description": "new_branch (optional) will make a new branch from `branch` before creating the file", - "type": "string", - "x-go-name": "NewBranchName" - }, - "signoff": { - "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", - "type": "boolean", - "x-go-name": "Signoff" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ChangedFile": { - "description": "ChangedFile store information about files affected by the pull request", - "type": "object", - "properties": { - "additions": { - "type": "integer", - "format": "int64", - "x-go-name": "Additions" - }, - "changes": { - "type": "integer", - "format": "int64", - "x-go-name": "Changes" - }, - "contents_url": { - "type": "string", - "x-go-name": "ContentsURL" - }, - "deletions": { - "type": "integer", - "format": "int64", - "x-go-name": "Deletions" - }, - "filename": { - "type": "string", - "x-go-name": "Filename" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "previous_filename": { - "type": "string", - "x-go-name": "PreviousFilename" - }, - "raw_url": { - "type": "string", - "x-go-name": "RawURL" - }, - "status": { - "type": "string", - "x-go-name": "Status" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CombinedStatus": { - "description": "CombinedStatus holds the combined state of several statuses for a single commit", - "type": "object", - "properties": { - "commit_url": { - "type": "string", - "x-go-name": "CommitURL" - }, - "repository": { - "$ref": "#/definitions/Repository" - }, - "sha": { - "type": "string", - "x-go-name": "SHA" - }, - "state": { - "$ref": "#/definitions/CommitStatusState" - }, - "statuses": { - "type": "array", - "items": { - "$ref": "#/definitions/CommitStatus" - }, - "x-go-name": "Statuses" - }, - "total_count": { - "type": "integer", - "format": "int64", - "x-go-name": "TotalCount" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Comment": { - "description": "Comment represents a comment on a commit or issue", - "type": "object", - "properties": { - "assets": { - "type": "array", - "items": { - "$ref": "#/definitions/Attachment" - }, - "x-go-name": "Attachments" - }, - "body": { - "type": "string", - "x-go-name": "Body" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "issue_url": { - "type": "string", - "x-go-name": "IssueURL" - }, - "original_author": { - "type": "string", - "x-go-name": "OriginalAuthor" - }, - "original_author_id": { - "type": "integer", - "format": "int64", - "x-go-name": "OriginalAuthorID" - }, - "pull_request_url": { - "type": "string", - "x-go-name": "PRURL" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "user": { - "$ref": "#/definitions/User" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Commit": { - "type": "object", - "title": "Commit contains information generated from a Git commit.", - "properties": { - "author": { - "$ref": "#/definitions/User" - }, - "commit": { - "$ref": "#/definitions/RepoCommit" - }, - "committer": { - "$ref": "#/definitions/User" - }, - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "files": { - "type": "array", - "items": { - "$ref": "#/definitions/CommitAffectedFiles" - }, - "x-go-name": "Files" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "parents": { - "type": "array", - "items": { - "$ref": "#/definitions/CommitMeta" - }, - "x-go-name": "Parents" - }, - "sha": { - "type": "string", - "x-go-name": "SHA" - }, - "stats": { - "$ref": "#/definitions/CommitStats" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CommitAffectedFiles": { - "description": "CommitAffectedFiles store information about files affected by the commit", - "type": "object", - "properties": { - "filename": { - "type": "string", - "x-go-name": "Filename" - }, - "status": { - "type": "string", - "x-go-name": "Status" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CommitDateOptions": { - "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE", - "type": "object", - "properties": { - "author": { - "type": "string", - "format": "date-time", - "x-go-name": "Author" - }, - "committer": { - "type": "string", - "format": "date-time", - "x-go-name": "Committer" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CommitMeta": { - "type": "object", - "title": "CommitMeta contains meta information of a commit in terms of API.", - "properties": { - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "sha": { - "type": "string", - "x-go-name": "SHA" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CommitStats": { - "description": "CommitStats is statistics for a RepoCommit", - "type": "object", - "properties": { - "additions": { - "type": "integer", - "format": "int64", - "x-go-name": "Additions" - }, - "deletions": { - "type": "integer", - "format": "int64", - "x-go-name": "Deletions" - }, - "total": { - "type": "integer", - "format": "int64", - "x-go-name": "Total" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CommitStatus": { - "description": "CommitStatus holds a single status of a single Commit", - "type": "object", - "properties": { - "context": { - "type": "string", - "x-go-name": "Context" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "creator": { - "$ref": "#/definitions/User" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "status": { - "$ref": "#/definitions/CommitStatusState" - }, - "target_url": { - "type": "string", - "x-go-name": "TargetURL" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CommitStatusState": { - "description": "CommitStatusState holds the state of a CommitStatus\nIt can be \"pending\", \"success\", \"error\", \"failure\" and \"warning\"", - "type": "string", - "x-go-package": "forgejo.org/modules/structs" - }, - "CommitUser": { - "type": "object", - "title": "CommitUser contains information of a user in the context of a commit.", - "properties": { - "date": { - "type": "string", - "x-go-name": "Date" - }, - "email": { - "type": "string", - "format": "email", - "x-go-name": "Email" - }, - "name": { - "type": "string", - "x-go-name": "Name" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Compare": { - "type": "object", - "title": "Compare represents a comparison between two commits.", - "properties": { - "commits": { - "type": "array", - "items": { - "$ref": "#/definitions/Commit" - }, - "x-go-name": "Commits" - }, - "files": { - "type": "array", - "items": { - "$ref": "#/definitions/CommitAffectedFiles" - }, - "x-go-name": "Files" - }, - "total_commits": { - "type": "integer", - "format": "int64", - "x-go-name": "TotalCommits" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ContentsResponse": { - "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content", - "type": "object", - "properties": { - "_links": { - "$ref": "#/definitions/FileLinksResponse" - }, - "content": { - "description": "`content` is populated when `type` is `file`, otherwise null", - "type": "string", - "x-go-name": "Content" - }, - "download_url": { - "type": "string", - "x-go-name": "DownloadURL" - }, - "encoding": { - "description": "`encoding` is populated when `type` is `file`, otherwise null", - "type": "string", - "x-go-name": "Encoding" - }, - "git_url": { - "type": "string", - "x-go-name": "GitURL" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "last_commit_sha": { - "type": "string", - "x-go-name": "LastCommitSHA" - }, - "last_commit_when": { - "type": "string", - "format": "date-time", - "x-go-name": "LastCommitWhen" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "path": { - "type": "string", - "x-go-name": "Path" - }, - "sha": { - "type": "string", - "x-go-name": "SHA" - }, - "size": { - "type": "integer", - "format": "int64", - "x-go-name": "Size" - }, - "submodule_git_url": { - "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null", - "type": "string", - "x-go-name": "SubmoduleGitURL" - }, - "target": { - "description": "`target` is populated when `type` is `symlink`, otherwise null", - "type": "string", - "x-go-name": "Target" - }, - "type": { - "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`", - "type": "string", - "x-go-name": "Type" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateAccessTokenOption": { - "description": "CreateAccessTokenOption options when create access token", - "type": "object", - "required": ["name"], - "properties": { - "name": { - "type": "string", - "x-go-name": "Name" - }, - "scopes": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Scopes", - "example": [ - "all", - "read:activitypub", - "read:issue", - "write:misc", - "read:notification", - "read:organization", - "read:package", - "read:repository", - "read:user" - ] - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateBranchProtectionOption": { - "description": "CreateBranchProtectionOption options for creating a branch protection", - "type": "object", - "properties": { - "apply_to_admins": { - "type": "boolean", - "x-go-name": "ApplyToAdmins" - }, - "approvals_whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "ApprovalsWhitelistTeams" - }, - "approvals_whitelist_username": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "ApprovalsWhitelistUsernames" - }, - "block_on_official_review_requests": { - "type": "boolean", - "x-go-name": "BlockOnOfficialReviewRequests" - }, - "block_on_outdated_branch": { - "type": "boolean", - "x-go-name": "BlockOnOutdatedBranch" - }, - "block_on_rejected_reviews": { - "type": "boolean", - "x-go-name": "BlockOnRejectedReviews" - }, - "branch_name": { - "description": "Deprecated: true", - "type": "string", - "x-go-name": "BranchName" - }, - "dismiss_stale_approvals": { - "type": "boolean", - "x-go-name": "DismissStaleApprovals" - }, - "enable_approvals_whitelist": { - "type": "boolean", - "x-go-name": "EnableApprovalsWhitelist" - }, - "enable_merge_whitelist": { - "type": "boolean", - "x-go-name": "EnableMergeWhitelist" - }, - "enable_push": { - "type": "boolean", - "x-go-name": "EnablePush" - }, - "enable_push_whitelist": { - "type": "boolean", - "x-go-name": "EnablePushWhitelist" - }, - "enable_status_check": { - "type": "boolean", - "x-go-name": "EnableStatusCheck" - }, - "ignore_stale_approvals": { - "type": "boolean", - "x-go-name": "IgnoreStaleApprovals" - }, - "merge_whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "MergeWhitelistTeams" - }, - "merge_whitelist_usernames": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "MergeWhitelistUsernames" - }, - "protected_file_patterns": { - "type": "string", - "x-go-name": "ProtectedFilePatterns" - }, - "push_whitelist_deploy_keys": { - "type": "boolean", - "x-go-name": "PushWhitelistDeployKeys" - }, - "push_whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "PushWhitelistTeams" - }, - "push_whitelist_usernames": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "PushWhitelistUsernames" - }, - "require_signed_commits": { - "type": "boolean", - "x-go-name": "RequireSignedCommits" - }, - "required_approvals": { - "type": "integer", - "format": "int64", - "x-go-name": "RequiredApprovals" - }, - "rule_name": { - "type": "string", - "x-go-name": "RuleName" - }, - "status_check_contexts": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "StatusCheckContexts" - }, - "unprotected_file_patterns": { - "type": "string", - "x-go-name": "UnprotectedFilePatterns" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateBranchRepoOption": { - "description": "CreateBranchRepoOption options when creating a branch in a repository", - "type": "object", - "required": ["new_branch_name"], - "properties": { - "new_branch_name": { - "description": "Name of the branch to create", - "type": "string", - "uniqueItems": true, - "x-go-name": "BranchName" - }, - "old_branch_name": { - "description": "Deprecated: true\nName of the old branch to create from", - "type": "string", - "uniqueItems": true, - "x-go-name": "OldBranchName" - }, - "old_ref_name": { - "description": "Name of the old branch/tag/commit to create from", - "type": "string", - "uniqueItems": true, - "x-go-name": "OldRefName" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateEmailOption": { - "description": "CreateEmailOption options when creating email addresses", - "type": "object", - "properties": { - "emails": { - "description": "email addresses to add", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Emails" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateFileOptions": { - "description": "CreateFileOptions options for creating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", - "type": "object", - "required": ["content"], - "properties": { - "author": { - "$ref": "#/definitions/Identity" - }, - "branch": { - "description": "branch (optional) to base this file from. if not given, the default branch is used", - "type": "string", - "x-go-name": "BranchName" - }, - "committer": { - "$ref": "#/definitions/Identity" - }, - "content": { - "description": "content must be base64 encoded", - "type": "string", - "x-go-name": "ContentBase64" - }, - "dates": { - "$ref": "#/definitions/CommitDateOptions" - }, - "message": { - "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", - "type": "string", - "x-go-name": "Message" - }, - "new_branch": { - "description": "new_branch (optional) will make a new branch from `branch` before creating the file", - "type": "string", - "x-go-name": "NewBranchName" - }, - "signoff": { - "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", - "type": "boolean", - "x-go-name": "Signoff" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateForkOption": { - "description": "CreateForkOption options for creating a fork", - "type": "object", - "properties": { - "name": { - "description": "name of the forked repository", - "type": "string", - "x-go-name": "Name" - }, - "organization": { - "description": "organization name, if forking into an organization", - "type": "string", - "x-go-name": "Organization" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateGPGKeyOption": { - "description": "CreateGPGKeyOption options create user GPG key", - "type": "object", - "required": ["armored_public_key"], - "properties": { - "armored_public_key": { - "description": "An armored GPG key to add", - "type": "string", - "uniqueItems": true, - "x-go-name": "ArmoredKey" - }, - "armored_signature": { - "type": "string", - "x-go-name": "Signature" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateHookOption": { - "description": "CreateHookOption options when create a hook", - "type": "object", - "required": ["type", "config"], - "properties": { - "active": { - "type": "boolean", - "default": false, - "x-go-name": "Active" - }, - "authorization_header": { - "type": "string", - "x-go-name": "AuthorizationHeader" - }, - "branch_filter": { - "type": "string", - "x-go-name": "BranchFilter" - }, - "config": { - "$ref": "#/definitions/CreateHookOptionConfig" - }, - "events": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Events" - }, - "type": { - "type": "string", - "enum": [ - "forgejo", - "dingtalk", - "discord", - "gitea", - "gogs", - "msteams", - "slack", - "telegram", - "feishu", - "wechatwork", - "packagist" - ], - "x-go-name": "Type" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateHookOptionConfig": { - "description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateIssueCommentOption": { - "description": "CreateIssueCommentOption options for creating a comment on an issue", - "type": "object", - "required": ["body"], - "properties": { - "body": { - "type": "string", - "x-go-name": "Body" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateIssueOption": { - "description": "CreateIssueOption options to create one issue", - "type": "object", - "required": ["title"], - "properties": { - "assignee": { - "description": "deprecated", - "type": "string", - "x-go-name": "Assignee" - }, - "assignees": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Assignees" - }, - "body": { - "type": "string", - "x-go-name": "Body" - }, - "closed": { - "type": "boolean", - "x-go-name": "Closed" - }, - "due_date": { - "type": "string", - "format": "date-time", - "x-go-name": "Deadline" - }, - "labels": { - "description": "list of label ids", - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "x-go-name": "Labels" - }, - "milestone": { - "description": "milestone id", - "type": "integer", - "format": "int64", - "x-go-name": "Milestone" - }, - "ref": { - "type": "string", - "x-go-name": "Ref" - }, - "title": { - "type": "string", - "x-go-name": "Title" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateKeyOption": { - "description": "CreateKeyOption options when creating a key", - "type": "object", - "required": ["title", "key"], - "properties": { - "key": { - "description": "An armored SSH key to add", - "type": "string", - "uniqueItems": true, - "x-go-name": "Key" - }, - "read_only": { - "description": "Describe if the key has only read access or read/write", - "type": "boolean", - "x-go-name": "ReadOnly" - }, - "title": { - "description": "Title of the key to add", - "type": "string", - "uniqueItems": true, - "x-go-name": "Title" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateLabelOption": { - "description": "CreateLabelOption options for creating a label", - "type": "object", - "required": ["name", "color"], - "properties": { - "color": { - "type": "string", - "x-go-name": "Color", - "example": "#00aabb" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "exclusive": { - "type": "boolean", - "x-go-name": "Exclusive", - "example": false - }, - "is_archived": { - "type": "boolean", - "x-go-name": "IsArchived", - "example": false - }, - "name": { - "type": "string", - "x-go-name": "Name" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateMilestoneOption": { - "description": "CreateMilestoneOption options for creating a milestone", - "type": "object", - "properties": { - "description": { - "type": "string", - "x-go-name": "Description" - }, - "due_on": { - "type": "string", - "format": "date-time", - "x-go-name": "Deadline" - }, - "state": { - "type": "string", - "enum": ["open", "closed"], - "x-go-name": "State" - }, - "title": { - "type": "string", - "x-go-name": "Title" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateOAuth2ApplicationOptions": { - "description": "CreateOAuth2ApplicationOptions holds options to create an oauth2 application", - "type": "object", - "properties": { - "confidential_client": { - "type": "boolean", - "x-go-name": "ConfidentialClient" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "redirect_uris": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "RedirectURIs" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateOrUpdateSecretOption": { - "description": "CreateOrUpdateSecretOption options when creating or updating secret", - "type": "object", - "required": ["data"], - "properties": { - "data": { - "description": "Data of the secret to update", - "type": "string", - "x-go-name": "Data" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateOrgOption": { - "description": "CreateOrgOption options for creating an organization", - "type": "object", - "required": ["username"], - "properties": { - "description": { - "type": "string", - "x-go-name": "Description" - }, - "email": { - "type": "string", - "x-go-name": "Email" - }, - "full_name": { - "type": "string", - "x-go-name": "FullName" - }, - "location": { - "type": "string", - "x-go-name": "Location" - }, - "repo_admin_change_team_access": { - "type": "boolean", - "x-go-name": "RepoAdminChangeTeamAccess" - }, - "username": { - "type": "string", - "x-go-name": "UserName" - }, - "visibility": { - "description": "possible values are `public` (default), `limited` or `private`", - "type": "string", - "enum": ["public", "limited", "private"], - "x-go-name": "Visibility" - }, - "website": { - "type": "string", - "x-go-name": "Website" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreatePullRequestOption": { - "description": "CreatePullRequestOption options when creating a pull request", - "type": "object", - "properties": { - "assignee": { - "type": "string", - "x-go-name": "Assignee" - }, - "assignees": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Assignees" - }, - "base": { - "type": "string", - "x-go-name": "Base" - }, - "body": { - "type": "string", - "x-go-name": "Body" - }, - "due_date": { - "type": "string", - "format": "date-time", - "x-go-name": "Deadline" - }, - "head": { - "type": "string", - "x-go-name": "Head" - }, - "labels": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "x-go-name": "Labels" - }, - "milestone": { - "type": "integer", - "format": "int64", - "x-go-name": "Milestone" - }, - "title": { - "type": "string", - "x-go-name": "Title" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreatePullReviewComment": { - "description": "CreatePullReviewComment represent a review comment for creation api", - "type": "object", - "properties": { - "body": { - "type": "string", - "x-go-name": "Body" - }, - "new_position": { - "description": "if comment to new file line or 0", - "type": "integer", - "format": "int64", - "x-go-name": "NewLineNum" - }, - "old_position": { - "description": "if comment to old file line or 0", - "type": "integer", - "format": "int64", - "x-go-name": "OldLineNum" - }, - "path": { - "description": "the tree path", - "type": "string", - "x-go-name": "Path" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreatePullReviewCommentOptions": { - "$ref": "#/definitions/CreatePullReviewComment" - }, - "CreatePullReviewOptions": { - "description": "CreatePullReviewOptions are options to create a pull review", - "type": "object", - "properties": { - "body": { - "type": "string", - "x-go-name": "Body" - }, - "comments": { - "type": "array", - "items": { - "$ref": "#/definitions/CreatePullReviewComment" - }, - "x-go-name": "Comments" - }, - "commit_id": { - "type": "string", - "x-go-name": "CommitID" - }, - "event": { - "$ref": "#/definitions/ReviewStateType" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreatePushMirrorOption": { - "type": "object", - "title": "CreatePushMirrorOption represents need information to create a push mirror of a repository.", - "properties": { - "branch_filter": { - "type": "string", - "x-go-name": "BranchFilter" - }, - "interval": { - "type": "string", - "x-go-name": "Interval" - }, - "remote_address": { - "type": "string", - "x-go-name": "RemoteAddress" - }, - "remote_password": { - "type": "string", - "x-go-name": "RemotePassword" - }, - "remote_username": { - "type": "string", - "x-go-name": "RemoteUsername" - }, - "sync_on_commit": { - "type": "boolean", - "x-go-name": "SyncOnCommit" - }, - "use_ssh": { - "type": "boolean", - "x-go-name": "UseSSH" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateQuotaGroupOptions": { - "description": "CreateQutaGroupOptions represents the options for creating a quota group", - "type": "object", - "properties": { - "name": { - "description": "Name of the quota group to create", - "type": "string", - "x-go-name": "Name" - }, - "rules": { - "description": "Rules to add to the newly created group.\nIf a rule does not exist, it will be created.", - "type": "array", - "items": { - "$ref": "#/definitions/CreateQuotaRuleOptions" - }, - "x-go-name": "Rules" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateQuotaRuleOptions": { - "description": "CreateQuotaRuleOptions represents the options for creating a quota rule", - "type": "object", - "properties": { - "limit": { - "description": "The limit set by the rule", - "type": "integer", - "format": "int64", - "x-go-name": "Limit" - }, - "name": { - "description": "Name of the rule to create", - "type": "string", - "x-go-name": "Name" - }, - "subjects": { - "description": "The subjects affected by the rule", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Subjects" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateReleaseOption": { - "description": "CreateReleaseOption options when creating a release", - "type": "object", - "required": ["tag_name"], - "properties": { - "body": { - "type": "string", - "x-go-name": "Note" - }, - "draft": { - "type": "boolean", - "x-go-name": "IsDraft" - }, - "hide_archive_links": { - "type": "boolean", - "x-go-name": "HideArchiveLinks" - }, - "name": { - "type": "string", - "x-go-name": "Title" - }, - "prerelease": { - "type": "boolean", - "x-go-name": "IsPrerelease" - }, - "tag_name": { - "type": "string", - "x-go-name": "TagName" - }, - "target_commitish": { - "type": "string", - "x-go-name": "Target" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateRepoOption": { - "description": "CreateRepoOption options when creating repository", - "type": "object", - "required": ["name"], - "properties": { - "auto_init": { - "description": "Whether the repository should be auto-initialized?", - "type": "boolean", - "x-go-name": "AutoInit" - }, - "default_branch": { - "description": "DefaultBranch of the repository (used when initializes and in template)", - "type": "string", - "x-go-name": "DefaultBranch" - }, - "description": { - "description": "Description of the repository to create", - "type": "string", - "x-go-name": "Description" - }, - "gitignores": { - "description": "Gitignores to use", - "type": "string", - "x-go-name": "Gitignores" - }, - "issue_labels": { - "description": "Label-Set to use", - "type": "string", - "x-go-name": "IssueLabels" - }, - "license": { - "description": "License to use", - "type": "string", - "x-go-name": "License" - }, - "name": { - "description": "Name of the repository to create", - "type": "string", - "uniqueItems": true, - "x-go-name": "Name" - }, - "object_format_name": { - "description": "ObjectFormatName of the underlying git repository", - "type": "string", - "enum": ["sha1", "sha256"], - "x-go-name": "ObjectFormatName" - }, - "private": { - "description": "Whether the repository is private", - "type": "boolean", - "x-go-name": "Private" - }, - "readme": { - "description": "Readme of the repository to create", - "type": "string", - "x-go-name": "Readme" - }, - "template": { - "description": "Whether the repository is template", - "type": "boolean", - "x-go-name": "Template" - }, - "trust_model": { - "description": "TrustModel of the repository", - "type": "string", - "enum": [ - "default", - "collaborator", - "committer", - "collaboratorcommitter" - ], - "x-go-name": "TrustModel" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateStatusOption": { - "description": "CreateStatusOption holds the information needed to create a new CommitStatus for a Commit", - "type": "object", - "properties": { - "context": { - "type": "string", - "x-go-name": "Context" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "state": { - "$ref": "#/definitions/CommitStatusState" - }, - "target_url": { - "type": "string", - "x-go-name": "TargetURL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateTagOption": { - "description": "CreateTagOption options when creating a tag", - "type": "object", - "required": ["tag_name"], - "properties": { - "message": { - "type": "string", - "x-go-name": "Message" - }, - "tag_name": { - "type": "string", - "x-go-name": "TagName" - }, - "target": { - "type": "string", - "x-go-name": "Target" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateTagProtectionOption": { - "description": "CreateTagProtectionOption options for creating a tag protection", - "type": "object", - "properties": { - "name_pattern": { - "type": "string", - "x-go-name": "NamePattern" - }, - "whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "WhitelistTeams" - }, - "whitelist_usernames": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "WhitelistUsernames" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateTeamOption": { - "description": "CreateTeamOption options for creating a team", - "type": "object", - "required": ["name"], - "properties": { - "can_create_org_repo": { - "type": "boolean", - "x-go-name": "CanCreateOrgRepo" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "includes_all_repositories": { - "type": "boolean", - "x-go-name": "IncludesAllRepositories" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "permission": { - "type": "string", - "enum": ["read", "write", "admin"], - "x-go-name": "Permission" - }, - "units": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Units", - "example": [ - "repo.actions", - "repo.code", - "repo.issues", - "repo.ext_issues", - "repo.wiki", - "repo.ext_wiki", - "repo.pulls", - "repo.releases", - "repo.projects", - "repo.ext_wiki" - ] - }, - "units_map": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-go-name": "UnitsMap", - "example": "{\"repo.actions\",\"repo.packages\",\"repo.code\":\"read\",\"repo.issues\":\"write\",\"repo.ext_issues\":\"none\",\"repo.wiki\":\"admin\",\"repo.pulls\":\"owner\",\"repo.releases\":\"none\",\"repo.projects\":\"none\",\"repo.ext_wiki\":\"none\"}" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateUserOption": { - "description": "CreateUserOption create user options", - "type": "object", - "required": ["username", "email"], - "properties": { - "created_at": { - "description": "For explicitly setting the user creation timestamp. Useful when users are\nmigrated from other systems. When omitted, the user's creation timestamp\nwill be set to \"now\".", - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "email": { - "type": "string", - "format": "email", - "x-go-name": "Email" - }, - "full_name": { - "type": "string", - "x-go-name": "FullName" - }, - "login_name": { - "type": "string", - "x-go-name": "LoginName" - }, - "must_change_password": { - "type": "boolean", - "x-go-name": "MustChangePassword" - }, - "password": { - "type": "string", - "x-go-name": "Password" - }, - "restricted": { - "type": "boolean", - "x-go-name": "Restricted" - }, - "send_notify": { - "type": "boolean", - "x-go-name": "SendNotify" - }, - "source_id": { - "type": "integer", - "format": "int64", - "x-go-name": "SourceID" - }, - "username": { - "type": "string", - "x-go-name": "Username" - }, - "visibility": { - "type": "string", - "x-go-name": "Visibility" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateVariableOption": { - "description": "CreateVariableOption the option when creating variable", - "type": "object", - "required": ["value"], - "properties": { - "value": { - "description": "Value of the variable to create", - "type": "string", - "x-go-name": "Value" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "CreateWikiPageOptions": { - "description": "CreateWikiPageOptions form for creating wiki", - "type": "object", - "properties": { - "content_base64": { - "description": "content must be base64 encoded", - "type": "string", - "x-go-name": "ContentBase64" - }, - "message": { - "description": "optional commit message summarizing the change", - "type": "string", - "x-go-name": "Message" - }, - "title": { - "description": "page title. leave empty to keep unchanged", - "type": "string", - "x-go-name": "Title" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Cron": { - "description": "Cron represents a Cron task", - "type": "object", - "properties": { - "exec_times": { - "type": "integer", - "format": "int64", - "x-go-name": "ExecTimes" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "next": { - "type": "string", - "format": "date-time", - "x-go-name": "Next" - }, - "prev": { - "type": "string", - "format": "date-time", - "x-go-name": "Prev" - }, - "schedule": { - "type": "string", - "x-go-name": "Schedule" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "DeleteEmailOption": { - "description": "DeleteEmailOption options when deleting email addresses", - "type": "object", - "properties": { - "emails": { - "description": "email addresses to delete", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Emails" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "DeleteFileOptions": { - "description": "DeleteFileOptions options for deleting files (used for other File structs below)\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", - "type": "object", - "required": ["sha"], - "properties": { - "author": { - "$ref": "#/definitions/Identity" - }, - "branch": { - "description": "branch (optional) to base this file from. if not given, the default branch is used", - "type": "string", - "x-go-name": "BranchName" - }, - "committer": { - "$ref": "#/definitions/Identity" - }, - "dates": { - "$ref": "#/definitions/CommitDateOptions" - }, - "message": { - "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", - "type": "string", - "x-go-name": "Message" - }, - "new_branch": { - "description": "new_branch (optional) will make a new branch from `branch` before creating the file", - "type": "string", - "x-go-name": "NewBranchName" - }, - "sha": { - "description": "sha is the SHA for the file that already exists", - "type": "string", - "x-go-name": "SHA" - }, - "signoff": { - "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", - "type": "boolean", - "x-go-name": "Signoff" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "DeleteLabelsOption": { - "description": "DeleteLabelOption options for deleting a label", - "type": "object", - "properties": { - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "DeployKey": { - "description": "DeployKey a deploy key", - "type": "object", - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "fingerprint": { - "type": "string", - "x-go-name": "Fingerprint" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "key": { - "type": "string", - "x-go-name": "Key" - }, - "key_id": { - "type": "integer", - "format": "int64", - "x-go-name": "KeyID" - }, - "read_only": { - "type": "boolean", - "x-go-name": "ReadOnly" - }, - "repository": { - "$ref": "#/definitions/Repository" - }, - "title": { - "type": "string", - "x-go-name": "Title" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "DismissPullReviewOptions": { - "description": "DismissPullReviewOptions are options to dismiss a pull review", - "type": "object", - "properties": { - "message": { - "type": "string", - "x-go-name": "Message" - }, - "priors": { - "type": "boolean", - "x-go-name": "Priors" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "DispatchWorkflowOption": { - "description": "DispatchWorkflowOption options when dispatching a workflow", - "type": "object", - "required": ["ref"], - "properties": { - "inputs": { - "description": "Input keys and values configured in the workflow file.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-go-name": "Inputs" - }, - "ref": { - "description": "Git reference for the workflow", - "type": "string", - "x-go-name": "Ref" - }, - "return_run_info": { - "description": "Flag to return the run info", - "type": "boolean", - "default": false, - "x-go-name": "ReturnRunInfo" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "DispatchWorkflowRun": { - "description": "DispatchWorkflowRun represents a workflow run", - "type": "object", - "properties": { - "id": { - "description": "the workflow run id", - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "jobs": { - "description": "the jobs name", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Jobs" - }, - "run_number": { - "description": "a unique number for each run of a repository", - "type": "integer", - "format": "int64", - "x-go-name": "RunNumber" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Duration": { - "description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.", - "type": "integer", - "format": "int64", - "x-go-package": "time" - }, - "EditAttachmentOptions": { - "description": "EditAttachmentOptions options for editing attachments", - "type": "object", - "properties": { - "browser_download_url": { - "description": "(Can only be set if existing attachment is of external type)", - "type": "string", - "x-go-name": "DownloadURL" - }, - "name": { - "type": "string", - "x-go-name": "Name" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditBranchProtectionOption": { - "description": "EditBranchProtectionOption options for editing a branch protection", - "type": "object", - "properties": { - "apply_to_admins": { - "type": "boolean", - "x-go-name": "ApplyToAdmins" - }, - "approvals_whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "ApprovalsWhitelistTeams" - }, - "approvals_whitelist_username": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "ApprovalsWhitelistUsernames" - }, - "block_on_official_review_requests": { - "type": "boolean", - "x-go-name": "BlockOnOfficialReviewRequests" - }, - "block_on_outdated_branch": { - "type": "boolean", - "x-go-name": "BlockOnOutdatedBranch" - }, - "block_on_rejected_reviews": { - "type": "boolean", - "x-go-name": "BlockOnRejectedReviews" - }, - "dismiss_stale_approvals": { - "type": "boolean", - "x-go-name": "DismissStaleApprovals" - }, - "enable_approvals_whitelist": { - "type": "boolean", - "x-go-name": "EnableApprovalsWhitelist" - }, - "enable_merge_whitelist": { - "type": "boolean", - "x-go-name": "EnableMergeWhitelist" - }, - "enable_push": { - "type": "boolean", - "x-go-name": "EnablePush" - }, - "enable_push_whitelist": { - "type": "boolean", - "x-go-name": "EnablePushWhitelist" - }, - "enable_status_check": { - "type": "boolean", - "x-go-name": "EnableStatusCheck" - }, - "ignore_stale_approvals": { - "type": "boolean", - "x-go-name": "IgnoreStaleApprovals" - }, - "merge_whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "MergeWhitelistTeams" - }, - "merge_whitelist_usernames": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "MergeWhitelistUsernames" - }, - "protected_file_patterns": { - "type": "string", - "x-go-name": "ProtectedFilePatterns" - }, - "push_whitelist_deploy_keys": { - "type": "boolean", - "x-go-name": "PushWhitelistDeployKeys" - }, - "push_whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "PushWhitelistTeams" - }, - "push_whitelist_usernames": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "PushWhitelistUsernames" - }, - "require_signed_commits": { - "type": "boolean", - "x-go-name": "RequireSignedCommits" - }, - "required_approvals": { - "type": "integer", - "format": "int64", - "x-go-name": "RequiredApprovals" - }, - "status_check_contexts": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "StatusCheckContexts" - }, - "unprotected_file_patterns": { - "type": "string", - "x-go-name": "UnprotectedFilePatterns" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditDeadlineOption": { - "description": "EditDeadlineOption options for creating a deadline", - "type": "object", - "required": ["due_date"], - "properties": { - "due_date": { - "type": "string", - "format": "date-time", - "x-go-name": "Deadline" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditGitHookOption": { - "description": "EditGitHookOption options when modifying one Git hook", - "type": "object", - "properties": { - "content": { - "type": "string", - "x-go-name": "Content" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditHookOption": { - "description": "EditHookOption options when modify one hook", - "type": "object", - "properties": { - "active": { - "type": "boolean", - "x-go-name": "Active" - }, - "authorization_header": { - "type": "string", - "x-go-name": "AuthorizationHeader" - }, - "branch_filter": { - "type": "string", - "x-go-name": "BranchFilter" - }, - "config": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-go-name": "Config" - }, - "events": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Events" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditIssueCommentOption": { - "description": "EditIssueCommentOption options for editing a comment", - "type": "object", - "required": ["body"], - "properties": { - "body": { - "type": "string", - "x-go-name": "Body" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditIssueOption": { - "description": "EditIssueOption options for editing an issue", - "type": "object", - "properties": { - "assignee": { - "description": "deprecated", - "type": "string", - "x-go-name": "Assignee" - }, - "assignees": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Assignees" - }, - "body": { - "type": "string", - "x-go-name": "Body" - }, - "due_date": { - "type": "string", - "format": "date-time", - "x-go-name": "Deadline" - }, - "milestone": { - "type": "integer", - "format": "int64", - "x-go-name": "Milestone" - }, - "ref": { - "type": "string", - "x-go-name": "Ref" - }, - "state": { - "type": "string", - "x-go-name": "State" - }, - "title": { - "type": "string", - "x-go-name": "Title" - }, - "unset_due_date": { - "type": "boolean", - "x-go-name": "RemoveDeadline" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditLabelOption": { - "description": "EditLabelOption options for editing a label", - "type": "object", - "properties": { - "color": { - "type": "string", - "x-go-name": "Color", - "example": "#00aabb" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "exclusive": { - "type": "boolean", - "x-go-name": "Exclusive", - "example": false - }, - "is_archived": { - "type": "boolean", - "x-go-name": "IsArchived", - "example": false - }, - "name": { - "type": "string", - "x-go-name": "Name" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditMilestoneOption": { - "description": "EditMilestoneOption options for editing a milestone", - "type": "object", - "properties": { - "description": { - "type": "string", - "x-go-name": "Description" - }, - "due_on": { - "type": "string", - "format": "date-time", - "x-go-name": "Deadline" - }, - "state": { - "type": "string", - "x-go-name": "State" - }, - "title": { - "type": "string", - "x-go-name": "Title" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditOrgOption": { - "description": "EditOrgOption options for editing an organization", - "type": "object", - "properties": { - "description": { - "type": "string", - "x-go-name": "Description" - }, - "email": { - "type": "string", - "x-go-name": "Email" - }, - "full_name": { - "type": "string", - "x-go-name": "FullName" - }, - "location": { - "type": "string", - "x-go-name": "Location" - }, - "repo_admin_change_team_access": { - "type": "boolean", - "x-go-name": "RepoAdminChangeTeamAccess" - }, - "visibility": { - "description": "possible values are `public`, `limited` or `private`", - "type": "string", - "enum": ["public", "limited", "private"], - "x-go-name": "Visibility" - }, - "website": { - "type": "string", - "x-go-name": "Website" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditPullRequestOption": { - "description": "EditPullRequestOption options when modify pull request", - "type": "object", - "properties": { - "allow_maintainer_edit": { - "type": "boolean", - "x-go-name": "AllowMaintainerEdit" - }, - "assignee": { - "type": "string", - "x-go-name": "Assignee" - }, - "assignees": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Assignees" - }, - "base": { - "type": "string", - "x-go-name": "Base" - }, - "body": { - "type": "string", - "x-go-name": "Body" - }, - "due_date": { - "type": "string", - "format": "date-time", - "x-go-name": "Deadline" - }, - "labels": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "x-go-name": "Labels" - }, - "milestone": { - "type": "integer", - "format": "int64", - "x-go-name": "Milestone" - }, - "state": { - "type": "string", - "x-go-name": "State" - }, - "title": { - "type": "string", - "x-go-name": "Title" - }, - "unset_due_date": { - "type": "boolean", - "x-go-name": "RemoveDeadline" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditQuotaRuleOptions": { - "description": "EditQuotaRuleOptions represents the options for editing a quota rule", - "type": "object", - "properties": { - "limit": { - "description": "The limit set by the rule", - "type": "integer", - "format": "int64", - "x-go-name": "Limit" - }, - "subjects": { - "description": "The subjects affected by the rule", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Subjects" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditReactionOption": { - "description": "EditReactionOption contain the reaction type", - "type": "object", - "properties": { - "content": { - "type": "string", - "x-go-name": "Reaction" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditReleaseOption": { - "description": "EditReleaseOption options when editing a release", - "type": "object", - "properties": { - "body": { - "type": "string", - "x-go-name": "Note" - }, - "draft": { - "type": "boolean", - "x-go-name": "IsDraft" - }, - "hide_archive_links": { - "type": "boolean", - "x-go-name": "HideArchiveLinks" - }, - "name": { - "type": "string", - "x-go-name": "Title" - }, - "prerelease": { - "type": "boolean", - "x-go-name": "IsPrerelease" - }, - "tag_name": { - "type": "string", - "x-go-name": "TagName" - }, - "target_commitish": { - "type": "string", - "x-go-name": "Target" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditRepoOption": { - "description": "EditRepoOption options when editing a repository's properties", - "type": "object", - "properties": { - "allow_fast_forward_only_merge": { - "description": "either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging.", - "type": "boolean", - "x-go-name": "AllowFastForwardOnly" - }, - "allow_manual_merge": { - "description": "either `true` to allow mark pr as merged manually, or `false` to prevent it.", - "type": "boolean", - "x-go-name": "AllowManualMerge" - }, - "allow_merge_commits": { - "description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.", - "type": "boolean", - "x-go-name": "AllowMerge" - }, - "allow_rebase": { - "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.", - "type": "boolean", - "x-go-name": "AllowRebase" - }, - "allow_rebase_explicit": { - "description": "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits.", - "type": "boolean", - "x-go-name": "AllowRebaseMerge" - }, - "allow_rebase_update": { - "description": "either `true` to allow updating pull request branch by rebase, or `false` to prevent it.", - "type": "boolean", - "x-go-name": "AllowRebaseUpdate" - }, - "allow_squash_merge": { - "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.", - "type": "boolean", - "x-go-name": "AllowSquash" - }, - "archived": { - "description": "set to `true` to archive this repository.", - "type": "boolean", - "x-go-name": "Archived" - }, - "autodetect_manual_merge": { - "description": "either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur.", - "type": "boolean", - "x-go-name": "AutodetectManualMerge" - }, - "default_allow_maintainer_edit": { - "description": "set to `true` to allow edits from maintainers by default", - "type": "boolean", - "x-go-name": "DefaultAllowMaintainerEdit" - }, - "default_branch": { - "description": "sets the default branch for this repository.", - "type": "string", - "x-go-name": "DefaultBranch" - }, - "default_delete_branch_after_merge": { - "description": "set to `true` to delete pr branch after merge by default", - "type": "boolean", - "x-go-name": "DefaultDeleteBranchAfterMerge" - }, - "default_merge_style": { - "description": "set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", \"fast-forward-only\", \"manually-merged\", or \"rebase-update-only\".", - "type": "string", - "x-go-name": "DefaultMergeStyle" - }, - "default_update_style": { - "description": "set to a update style to be used by this repository: \"rebase\" or \"merge\"", - "type": "string", - "x-go-name": "DefaultUpdateStyle" - }, - "description": { - "description": "a short description of the repository.", - "type": "string", - "x-go-name": "Description" - }, - "enable_prune": { - "description": "enable prune - remove obsolete remote-tracking references when mirroring", - "type": "boolean", - "x-go-name": "EnablePrune" - }, - "external_tracker": { - "$ref": "#/definitions/ExternalTracker" - }, - "external_wiki": { - "$ref": "#/definitions/ExternalWiki" - }, - "globally_editable_wiki": { - "description": "set the globally editable state of the wiki", - "type": "boolean", - "x-go-name": "GloballyEditableWiki" - }, - "has_actions": { - "description": "either `true` to enable actions unit, or `false` to disable them.", - "type": "boolean", - "x-go-name": "HasActions" - }, - "has_issues": { - "description": "either `true` to enable issues for this repository or `false` to disable them.", - "type": "boolean", - "x-go-name": "HasIssues" - }, - "has_packages": { - "description": "either `true` to enable packages unit, or `false` to disable them.", - "type": "boolean", - "x-go-name": "HasPackages" - }, - "has_projects": { - "description": "either `true` to enable project unit, or `false` to disable them.", - "type": "boolean", - "x-go-name": "HasProjects" - }, - "has_pull_requests": { - "description": "either `true` to allow pull requests, or `false` to prevent pull request.", - "type": "boolean", - "x-go-name": "HasPullRequests" - }, - "has_releases": { - "description": "either `true` to enable releases unit, or `false` to disable them.", - "type": "boolean", - "x-go-name": "HasReleases" - }, - "has_wiki": { - "description": "either `true` to enable the wiki for this repository or `false` to disable it.", - "type": "boolean", - "x-go-name": "HasWiki" - }, - "ignore_whitespace_conflicts": { - "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace.", - "type": "boolean", - "x-go-name": "IgnoreWhitespaceConflicts" - }, - "internal_tracker": { - "$ref": "#/definitions/InternalTracker" - }, - "mirror_interval": { - "description": "set to a string like `8h30m0s` to set the mirror interval time", - "type": "string", - "x-go-name": "MirrorInterval" - }, - "name": { - "description": "name of the repository", - "type": "string", - "uniqueItems": true, - "x-go-name": "Name" - }, - "private": { - "description": "either `true` to make the repository private or `false` to make it public.\nNote: you will get a 422 error if the organization restricts changing repository visibility to organization\nowners and a non-owner tries to change the value of private.", - "type": "boolean", - "x-go-name": "Private" - }, - "template": { - "description": "either `true` to make this repository a template or `false` to make it a normal repository", - "type": "boolean", - "x-go-name": "Template" - }, - "website": { - "description": "a URL with more information about the repository.", - "type": "string", - "x-go-name": "Website" - }, - "wiki_branch": { - "description": "sets the branch used for this repository's wiki.", - "type": "string", - "x-go-name": "WikiBranch" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditTagProtectionOption": { - "description": "EditTagProtectionOption options for editing a tag protection", - "type": "object", - "properties": { - "name_pattern": { - "type": "string", - "x-go-name": "NamePattern" - }, - "whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "WhitelistTeams" - }, - "whitelist_usernames": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "WhitelistUsernames" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditTeamOption": { - "description": "EditTeamOption options for editing a team", - "type": "object", - "required": ["name"], - "properties": { - "can_create_org_repo": { - "type": "boolean", - "x-go-name": "CanCreateOrgRepo" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "includes_all_repositories": { - "type": "boolean", - "x-go-name": "IncludesAllRepositories" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "permission": { - "type": "string", - "enum": ["read", "write", "admin"], - "x-go-name": "Permission" - }, - "units": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Units", - "example": [ - "repo.code", - "repo.issues", - "repo.ext_issues", - "repo.wiki", - "repo.pulls", - "repo.releases", - "repo.projects", - "repo.ext_wiki" - ] - }, - "units_map": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-go-name": "UnitsMap", - "example": { - "repo.code": "read", - "repo.ext_issues": "none", - "repo.ext_wiki": "none", - "repo.issues": "write", - "repo.projects": "none", - "repo.pulls": "owner", - "repo.releases": "none", - "repo.wiki": "admin" - } - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "EditUserOption": { - "description": "EditUserOption edit user options", - "type": "object", - "properties": { - "active": { - "type": "boolean", - "x-go-name": "Active" - }, - "admin": { - "type": "boolean", - "x-go-name": "Admin" - }, - "allow_create_organization": { - "type": "boolean", - "x-go-name": "AllowCreateOrganization" - }, - "allow_git_hook": { - "type": "boolean", - "x-go-name": "AllowGitHook" - }, - "allow_import_local": { - "type": "boolean", - "x-go-name": "AllowImportLocal" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "email": { - "type": "string", - "format": "email", - "x-go-name": "Email" - }, - "full_name": { - "type": "string", - "x-go-name": "FullName" - }, - "hide_email": { - "type": "boolean", - "x-go-name": "HideEmail" - }, - "location": { - "type": "string", - "x-go-name": "Location" - }, - "login_name": { - "type": "string", - "x-go-name": "LoginName" - }, - "max_repo_creation": { - "type": "integer", - "format": "int64", - "x-go-name": "MaxRepoCreation" - }, - "must_change_password": { - "type": "boolean", - "x-go-name": "MustChangePassword" - }, - "password": { - "type": "string", - "x-go-name": "Password" - }, - "prohibit_login": { - "type": "boolean", - "x-go-name": "ProhibitLogin" - }, - "pronouns": { - "type": "string", - "x-go-name": "Pronouns" - }, - "restricted": { - "type": "boolean", - "x-go-name": "Restricted" - }, - "source_id": { - "type": "integer", - "format": "int64", - "x-go-name": "SourceID" - }, - "visibility": { - "type": "string", - "x-go-name": "Visibility" - }, - "website": { - "type": "string", - "x-go-name": "Website" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Email": { - "description": "Email an email address belonging to a user", - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "x-go-name": "Email" - }, - "primary": { - "type": "boolean", - "x-go-name": "Primary" - }, - "user_id": { - "type": "integer", - "format": "int64", - "x-go-name": "UserID" - }, - "username": { - "type": "string", - "x-go-name": "UserName" - }, - "verified": { - "type": "boolean", - "x-go-name": "Verified" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ExternalTracker": { - "description": "ExternalTracker represents settings for external tracker", - "type": "object", - "properties": { - "external_tracker_format": { - "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.", - "type": "string", - "x-go-name": "ExternalTrackerFormat" - }, - "external_tracker_regexp_pattern": { - "description": "External Issue Tracker issue regular expression", - "type": "string", - "x-go-name": "ExternalTrackerRegexpPattern" - }, - "external_tracker_style": { - "description": "External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp`", - "type": "string", - "x-go-name": "ExternalTrackerStyle" - }, - "external_tracker_url": { - "description": "URL of external issue tracker.", - "type": "string", - "x-go-name": "ExternalTrackerURL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ExternalWiki": { - "description": "ExternalWiki represents setting for external wiki", - "type": "object", - "properties": { - "external_wiki_url": { - "description": "URL of external wiki.", - "type": "string", - "x-go-name": "ExternalWikiURL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "FileCommitResponse": { - "type": "object", - "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.", - "properties": { - "author": { - "$ref": "#/definitions/CommitUser" - }, - "committer": { - "$ref": "#/definitions/CommitUser" - }, - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, - "parents": { - "type": "array", - "items": { - "$ref": "#/definitions/CommitMeta" - }, - "x-go-name": "Parents" - }, - "sha": { - "type": "string", - "x-go-name": "SHA" - }, - "tree": { - "$ref": "#/definitions/CommitMeta" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "FileDeleteResponse": { - "description": "FileDeleteResponse contains information about a repo's file that was deleted", - "type": "object", - "properties": { - "commit": { - "$ref": "#/definitions/FileCommitResponse" - }, - "content": { - "x-go-name": "Content" - }, - "verification": { - "$ref": "#/definitions/PayloadCommitVerification" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "FileLinksResponse": { - "description": "FileLinksResponse contains the links for a repo's file", - "type": "object", - "properties": { - "git": { - "type": "string", - "x-go-name": "GitURL" - }, - "html": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "self": { - "type": "string", - "x-go-name": "Self" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "FileResponse": { - "description": "FileResponse contains information about a repo's file", - "type": "object", - "properties": { - "commit": { - "$ref": "#/definitions/FileCommitResponse" - }, - "content": { - "$ref": "#/definitions/ContentsResponse" - }, - "verification": { - "$ref": "#/definitions/PayloadCommitVerification" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "FilesResponse": { - "description": "FilesResponse contains information about multiple files from a repo", - "type": "object", - "properties": { - "commit": { - "$ref": "#/definitions/FileCommitResponse" - }, - "files": { - "type": "array", - "items": { - "$ref": "#/definitions/ContentsResponse" - }, - "x-go-name": "Files" - }, - "verification": { - "$ref": "#/definitions/PayloadCommitVerification" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ForgeLike": { - "description": "ForgeLike activity data type", - "type": "object", - "x-go-package": "forgejo.org/modules/forgefed" - }, - "ForgeOutbox": { - "description": "ActivityStream OrderedCollection of activities", - "type": "object", - "x-go-package": "forgejo.org/modules/forgefed" - }, - "GPGKey": { - "description": "GPGKey a user GPG key to sign commit and tag in repository", - "type": "object", - "properties": { - "can_certify": { - "type": "boolean", - "x-go-name": "CanCertify" - }, - "can_encrypt_comms": { - "type": "boolean", - "x-go-name": "CanEncryptComms" - }, - "can_encrypt_storage": { - "type": "boolean", - "x-go-name": "CanEncryptStorage" - }, - "can_sign": { - "type": "boolean", - "x-go-name": "CanSign" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "emails": { - "type": "array", - "items": { - "$ref": "#/definitions/GPGKeyEmail" - }, - "x-go-name": "Emails" - }, - "expires_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Expires" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "key_id": { - "type": "string", - "x-go-name": "KeyID" - }, - "primary_key_id": { - "type": "string", - "x-go-name": "PrimaryKeyID" - }, - "public_key": { - "type": "string", - "x-go-name": "PublicKey" - }, - "subkeys": { - "type": "array", - "items": { - "$ref": "#/definitions/GPGKey" - }, - "x-go-name": "SubsKey" - }, - "verified": { - "type": "boolean", - "x-go-name": "Verified" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GPGKeyEmail": { - "description": "GPGKeyEmail an email attached to a GPGKey", - "type": "object", - "properties": { - "email": { - "type": "string", - "x-go-name": "Email" - }, - "verified": { - "type": "boolean", - "x-go-name": "Verified" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GeneralAPISettings": { - "description": "GeneralAPISettings contains global api settings exposed by it", - "type": "object", - "properties": { - "default_git_trees_per_page": { - "type": "integer", - "format": "int64", - "x-go-name": "DefaultGitTreesPerPage" - }, - "default_max_blob_size": { - "type": "integer", - "format": "int64", - "x-go-name": "DefaultMaxBlobSize" - }, - "default_paging_num": { - "type": "integer", - "format": "int64", - "x-go-name": "DefaultPagingNum" - }, - "max_response_items": { - "type": "integer", - "format": "int64", - "x-go-name": "MaxResponseItems" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GeneralAttachmentSettings": { - "description": "GeneralAttachmentSettings contains global Attachment settings exposed by API", - "type": "object", - "properties": { - "allowed_types": { - "type": "string", - "x-go-name": "AllowedTypes" - }, - "enabled": { - "type": "boolean", - "x-go-name": "Enabled" - }, - "max_files": { - "type": "integer", - "format": "int64", - "x-go-name": "MaxFiles" - }, - "max_size": { - "type": "integer", - "format": "int64", - "x-go-name": "MaxSize" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GeneralRepoSettings": { - "description": "GeneralRepoSettings contains global repository settings exposed by API", - "type": "object", - "properties": { - "forks_disabled": { - "type": "boolean", - "x-go-name": "ForksDisabled" - }, - "http_git_disabled": { - "type": "boolean", - "x-go-name": "HTTPGitDisabled" - }, - "lfs_disabled": { - "type": "boolean", - "x-go-name": "LFSDisabled" - }, - "migrations_disabled": { - "type": "boolean", - "x-go-name": "MigrationsDisabled" - }, - "mirrors_disabled": { - "type": "boolean", - "x-go-name": "MirrorsDisabled" - }, - "stars_disabled": { - "type": "boolean", - "x-go-name": "StarsDisabled" - }, - "time_tracking_disabled": { - "type": "boolean", - "x-go-name": "TimeTrackingDisabled" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GeneralUISettings": { - "description": "GeneralUISettings contains global ui settings exposed by API", - "type": "object", - "properties": { - "allowed_reactions": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "AllowedReactions" - }, - "custom_emojis": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "CustomEmojis" - }, - "default_theme": { - "type": "string", - "x-go-name": "DefaultTheme" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GenerateRepoOption": { - "description": "GenerateRepoOption options when creating repository using a template", - "type": "object", - "required": ["owner", "name"], - "properties": { - "avatar": { - "description": "include avatar of the template repo", - "type": "boolean", - "x-go-name": "Avatar" - }, - "default_branch": { - "description": "Default branch of the new repository", - "type": "string", - "x-go-name": "DefaultBranch" - }, - "description": { - "description": "Description of the repository to create", - "type": "string", - "x-go-name": "Description" - }, - "git_content": { - "description": "include git content of default branch in template repo", - "type": "boolean", - "x-go-name": "GitContent" - }, - "git_hooks": { - "description": "include git hooks in template repo", - "type": "boolean", - "x-go-name": "GitHooks" - }, - "labels": { - "description": "include labels in template repo", - "type": "boolean", - "x-go-name": "Labels" - }, - "name": { - "description": "Name of the repository to create", - "type": "string", - "uniqueItems": true, - "x-go-name": "Name" - }, - "owner": { - "description": "The organization or person who will own the new repository", - "type": "string", - "x-go-name": "Owner" - }, - "private": { - "description": "Whether the repository is private", - "type": "boolean", - "x-go-name": "Private" - }, - "protected_branch": { - "description": "include protected branches in template repo", - "type": "boolean", - "x-go-name": "ProtectedBranch" - }, - "topics": { - "description": "include topics in template repo", - "type": "boolean", - "x-go-name": "Topics" - }, - "webhooks": { - "description": "include webhooks in template repo", - "type": "boolean", - "x-go-name": "Webhooks" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GitBlob": { - "description": "GitBlob represents a git blob", - "type": "object", - "properties": { - "content": { - "type": "string", - "x-go-name": "Content" - }, - "encoding": { - "type": "string", - "x-go-name": "Encoding" - }, - "sha": { - "type": "string", - "x-go-name": "SHA" - }, - "size": { - "type": "integer", - "format": "int64", - "x-go-name": "Size" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GitEntry": { - "description": "GitEntry represents a git tree", - "type": "object", - "properties": { - "mode": { - "type": "string", - "x-go-name": "Mode" - }, - "path": { - "type": "string", - "x-go-name": "Path" - }, - "sha": { - "type": "string", - "x-go-name": "SHA" - }, - "size": { - "type": "integer", - "format": "int64", - "x-go-name": "Size" - }, - "type": { - "type": "string", - "x-go-name": "Type" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GitHook": { - "description": "GitHook represents a Git repository hook", - "type": "object", - "properties": { - "content": { - "type": "string", - "x-go-name": "Content" - }, - "is_active": { - "type": "boolean", - "x-go-name": "IsActive" - }, - "name": { - "type": "string", - "x-go-name": "Name" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GitObject": { - "type": "object", - "title": "GitObject represents a Git object.", - "properties": { - "sha": { - "type": "string", - "x-go-name": "SHA" - }, - "type": { - "type": "string", - "x-go-name": "Type" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GitTreeResponse": { - "description": "GitTreeResponse returns a git tree", - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int64", - "x-go-name": "Page" - }, - "sha": { - "type": "string", - "x-go-name": "SHA" - }, - "total_count": { - "type": "integer", - "format": "int64", - "x-go-name": "TotalCount" - }, - "tree": { - "type": "array", - "items": { - "$ref": "#/definitions/GitEntry" - }, - "x-go-name": "Entries" - }, - "truncated": { - "type": "boolean", - "x-go-name": "Truncated" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "GitignoreTemplateInfo": { - "description": "GitignoreTemplateInfo name and text of a gitignore template", - "type": "object", - "properties": { - "name": { - "type": "string", - "x-go-name": "Name" - }, - "source": { - "type": "string", - "x-go-name": "Source" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Hook": { - "description": "Hook a hook is a web hook when one repository changed", - "type": "object", - "properties": { - "active": { - "type": "boolean", - "x-go-name": "Active" - }, - "authorization_header": { - "type": "string", - "x-go-name": "AuthorizationHeader" - }, - "branch_filter": { - "type": "string", - "x-go-name": "BranchFilter" - }, - "config": { - "description": "Deprecated: use Metadata instead", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-go-name": "Config" - }, - "content_type": { - "type": "string", - "x-go-name": "ContentType" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "events": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Events" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "metadata": { - "x-go-name": "Metadata" - }, - "type": { - "type": "string", - "x-go-name": "Type" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Identity": { - "description": "Identity for a person's identity like an author or committer", - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "x-go-name": "Email" - }, - "name": { - "type": "string", - "x-go-name": "Name" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "InternalTracker": { - "description": "InternalTracker represents settings for internal tracker", - "type": "object", - "properties": { - "allow_only_contributors_to_track_time": { - "description": "Let only contributors track time (Built-in issue tracker)", - "type": "boolean", - "x-go-name": "AllowOnlyContributorsToTrackTime" - }, - "enable_issue_dependencies": { - "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)", - "type": "boolean", - "x-go-name": "EnableIssueDependencies" - }, - "enable_time_tracker": { - "description": "Enable time tracking (Built-in issue tracker)", - "type": "boolean", - "x-go-name": "EnableTimeTracker" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Issue": { - "description": "Issue represents an issue in a repository", - "type": "object", - "properties": { - "assets": { - "type": "array", - "items": { - "$ref": "#/definitions/Attachment" - }, - "x-go-name": "Attachments" - }, - "assignee": { - "$ref": "#/definitions/User" - }, - "assignees": { - "type": "array", - "items": { - "$ref": "#/definitions/User" - }, - "x-go-name": "Assignees" - }, - "body": { - "type": "string", - "x-go-name": "Body" - }, - "closed_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Closed" - }, - "comments": { - "type": "integer", - "format": "int64", - "x-go-name": "Comments" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "due_date": { - "type": "string", - "format": "date-time", - "x-go-name": "Deadline" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "is_locked": { - "type": "boolean", - "x-go-name": "IsLocked" - }, - "labels": { - "type": "array", - "items": { - "$ref": "#/definitions/Label" - }, - "x-go-name": "Labels" - }, - "milestone": { - "$ref": "#/definitions/Milestone" - }, - "number": { - "type": "integer", - "format": "int64", - "x-go-name": "Index" - }, - "original_author": { - "type": "string", - "x-go-name": "OriginalAuthor" - }, - "original_author_id": { - "type": "integer", - "format": "int64", - "x-go-name": "OriginalAuthorID" - }, - "pin_order": { - "type": "integer", - "format": "int64", - "x-go-name": "PinOrder" - }, - "pull_request": { - "$ref": "#/definitions/PullRequestMeta" - }, - "ref": { - "type": "string", - "x-go-name": "Ref" - }, - "repository": { - "$ref": "#/definitions/RepositoryMeta" - }, - "state": { - "$ref": "#/definitions/StateType" - }, - "title": { - "type": "string", - "x-go-name": "Title" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "user": { - "$ref": "#/definitions/User" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "IssueConfig": { - "type": "object", - "properties": { - "blank_issues_enabled": { - "type": "boolean", - "x-go-name": "BlankIssuesEnabled" - }, - "contact_links": { - "type": "array", - "items": { - "$ref": "#/definitions/IssueConfigContactLink" - }, - "x-go-name": "ContactLinks" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "IssueConfigContactLink": { - "type": "object", - "properties": { - "about": { - "type": "string", - "x-go-name": "About" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "IssueConfigValidation": { - "type": "object", - "properties": { - "message": { - "type": "string", - "x-go-name": "Message" - }, - "valid": { - "type": "boolean", - "x-go-name": "Valid" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "IssueDeadline": { - "description": "IssueDeadline represents an issue deadline", - "type": "object", - "properties": { - "due_date": { - "type": "string", - "format": "date-time", - "x-go-name": "Deadline" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "IssueFormField": { - "description": "IssueFormField represents a form field", - "type": "object", - "properties": { - "attributes": { - "type": "object", - "additionalProperties": {}, - "x-go-name": "Attributes" - }, - "id": { - "type": "string", - "x-go-name": "ID" - }, - "type": { - "$ref": "#/definitions/IssueFormFieldType" - }, - "validations": { - "type": "object", - "additionalProperties": {}, - "x-go-name": "Validations" - }, - "visible": { - "type": "array", - "items": { - "$ref": "#/definitions/IssueFormFieldVisible" - }, - "x-go-name": "Visible" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "IssueFormFieldType": { - "type": "string", - "title": "IssueFormFieldType defines issue form field type, can be \"markdown\", \"textarea\", \"input\", \"dropdown\" or \"checkboxes\"", - "x-go-package": "forgejo.org/modules/structs" - }, - "IssueFormFieldVisible": { - "description": "IssueFormFieldVisible defines issue form field visible", - "type": "string", - "x-go-package": "forgejo.org/modules/structs" - }, - "IssueLabelsOption": { - "description": "IssueLabelsOption a collection of labels", - "type": "object", - "properties": { - "labels": { - "description": "Labels can be a list of integers representing label IDs\nor a list of strings representing label names", - "type": "array", - "items": {}, - "x-go-name": "Labels" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "IssueMeta": { - "description": "IssueMeta basic issue information", - "type": "object", - "properties": { - "index": { - "type": "integer", - "format": "int64", - "x-go-name": "Index" - }, - "owner": { - "type": "string", - "x-go-name": "Owner" - }, - "repo": { - "type": "string", - "x-go-name": "Name" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "IssueTemplate": { - "description": "IssueTemplate represents an issue template for a repository", - "type": "object", - "properties": { - "about": { - "type": "string", - "x-go-name": "About" - }, - "body": { - "type": "array", - "items": { - "$ref": "#/definitions/IssueFormField" - }, - "x-go-name": "Fields" - }, - "content": { - "type": "string", - "x-go-name": "Content" - }, - "file_name": { - "type": "string", - "x-go-name": "FileName" - }, - "labels": { - "$ref": "#/definitions/IssueTemplateLabels" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "ref": { - "type": "string", - "x-go-name": "Ref" - }, - "title": { - "type": "string", - "x-go-name": "Title" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "IssueTemplateLabels": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Label": { - "description": "Label a label to an issue or a pr", - "type": "object", - "properties": { - "color": { - "type": "string", - "x-go-name": "Color", - "example": "00aabb" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "exclusive": { - "type": "boolean", - "x-go-name": "Exclusive", - "example": false - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "is_archived": { - "type": "boolean", - "x-go-name": "IsArchived", - "example": false - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "LabelTemplate": { - "description": "LabelTemplate info of a Label template", - "type": "object", - "properties": { - "color": { - "type": "string", - "x-go-name": "Color", - "example": "00aabb" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "exclusive": { - "type": "boolean", - "x-go-name": "Exclusive", - "example": false - }, - "name": { - "type": "string", - "x-go-name": "Name" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "LicenseTemplateInfo": { - "description": "LicensesInfo contains information about a License", - "type": "object", - "properties": { - "body": { - "type": "string", - "x-go-name": "Body" - }, - "implementation": { - "type": "string", - "x-go-name": "Implementation" - }, - "key": { - "type": "string", - "x-go-name": "Key" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "LicensesTemplateListEntry": { - "description": "LicensesListEntry is used for the API", - "type": "object", - "properties": { - "key": { - "type": "string", - "x-go-name": "Key" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ListActionRunResponse": { - "description": "ListActionRunResponse return a list of ActionRun", - "type": "object", - "properties": { - "total_count": { - "type": "integer", - "format": "int64", - "x-go-name": "TotalCount" - }, - "workflow_runs": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionRun" - }, - "x-go-name": "Entries" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "MarkdownOption": { - "description": "MarkdownOption markdown options", - "type": "object", - "properties": { - "Context": { - "description": "Context to render\n\nin: body", - "type": "string" - }, - "Mode": { - "description": "Mode to render (comment, gfm, markdown)\n\nin: body", - "type": "string" - }, - "Text": { - "description": "Text markdown to render\n\nin: body", - "type": "string" - }, - "Wiki": { - "description": "Is it a wiki page ?\n\nin: body", - "type": "boolean" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "MarkupOption": { - "description": "MarkupOption markup options", - "type": "object", - "properties": { - "BranchPath": { - "description": "The current branch path where the form gets posted\n\nin: body", - "type": "string" - }, - "Context": { - "description": "Context to render\n\nin: body", - "type": "string" - }, - "FilePath": { - "description": "File path for detecting extension in file mode\n\nin: body", - "type": "string" - }, - "Mode": { - "description": "Mode to render (comment, gfm, markdown, file)\n\nin: body", - "type": "string" - }, - "Text": { - "description": "Text markup to render\n\nin: body", - "type": "string" - }, - "Wiki": { - "description": "Is it a wiki page ?\n\nin: body", - "type": "boolean" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "MergePullRequestOption": { - "description": "MergePullRequestForm form for merging Pull Request", - "type": "object", - "required": ["Do"], - "properties": { - "Do": { - "type": "string", - "enum": [ - "merge", - "rebase", - "rebase-merge", - "squash", - "fast-forward-only", - "manually-merged" - ] - }, - "MergeCommitID": { - "type": "string" - }, - "MergeMessageField": { - "type": "string" - }, - "MergeTitleField": { - "type": "string" - }, - "delete_branch_after_merge": { - "type": "boolean", - "x-go-name": "DeleteBranchAfterMerge" - }, - "force_merge": { - "type": "boolean", - "x-go-name": "ForceMerge" - }, - "head_commit_id": { - "type": "string", - "x-go-name": "HeadCommitID" - }, - "merge_when_checks_succeed": { - "type": "boolean", - "x-go-name": "MergeWhenChecksSucceed" - } - }, - "x-go-name": "MergePullRequestForm", - "x-go-package": "forgejo.org/services/forms" - }, - "MigrateRepoOptions": { - "description": "MigrateRepoOptions options for migrating repository's\nthis is used to interact with api v1", - "type": "object", - "required": ["clone_addr", "repo_name"], - "properties": { - "auth_password": { - "type": "string", - "x-go-name": "AuthPassword" - }, - "auth_token": { - "type": "string", - "x-go-name": "AuthToken" - }, - "auth_username": { - "type": "string", - "x-go-name": "AuthUsername" - }, - "clone_addr": { - "type": "string", - "x-go-name": "CloneAddr" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "issues": { - "type": "boolean", - "x-go-name": "Issues" - }, - "labels": { - "type": "boolean", - "x-go-name": "Labels" - }, - "lfs": { - "type": "boolean", - "x-go-name": "LFS" - }, - "lfs_endpoint": { - "type": "string", - "x-go-name": "LFSEndpoint" - }, - "milestones": { - "type": "boolean", - "x-go-name": "Milestones" - }, - "mirror": { - "type": "boolean", - "x-go-name": "Mirror" - }, - "mirror_interval": { - "type": "string", - "x-go-name": "MirrorInterval" - }, - "private": { - "type": "boolean", - "x-go-name": "Private" - }, - "pull_requests": { - "type": "boolean", - "x-go-name": "PullRequests" - }, - "releases": { - "type": "boolean", - "x-go-name": "Releases" - }, - "repo_name": { - "type": "string", - "x-go-name": "RepoName" - }, - "repo_owner": { - "description": "Name of User or Organisation who will own Repo after migration", - "type": "string", - "x-go-name": "RepoOwner" - }, - "service": { - "type": "string", - "enum": [ - "git", - "github", - "gitea", - "gitlab", - "gogs", - "onedev", - "gitbucket", - "codebase" - ], - "x-go-name": "Service" - }, - "uid": { - "description": "deprecated (only for backwards compatibility)", - "type": "integer", - "format": "int64", - "x-go-name": "RepoOwnerID" - }, - "wiki": { - "type": "boolean", - "x-go-name": "Wiki" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Milestone": { - "description": "Milestone milestone is a collection of issues on one repository", - "type": "object", - "properties": { - "closed_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Closed" - }, - "closed_issues": { - "type": "integer", - "format": "int64", - "x-go-name": "ClosedIssues" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "due_on": { - "type": "string", - "format": "date-time", - "x-go-name": "Deadline" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "open_issues": { - "type": "integer", - "format": "int64", - "x-go-name": "OpenIssues" - }, - "state": { - "$ref": "#/definitions/StateType" - }, - "title": { - "type": "string", - "x-go-name": "Title" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "NewIssuePinsAllowed": { - "description": "NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed", - "type": "object", - "properties": { - "issues": { - "type": "boolean", - "x-go-name": "Issues" - }, - "pull_requests": { - "type": "boolean", - "x-go-name": "PullRequests" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "NodeInfo": { - "description": "NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks", - "type": "object", - "properties": { - "metadata": { - "type": "object", - "x-go-name": "Metadata" - }, - "openRegistrations": { - "type": "boolean", - "x-go-name": "OpenRegistrations" - }, - "protocols": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Protocols" - }, - "services": { - "$ref": "#/definitions/NodeInfoServices" - }, - "software": { - "$ref": "#/definitions/NodeInfoSoftware" - }, - "usage": { - "$ref": "#/definitions/NodeInfoUsage" - }, - "version": { - "type": "string", - "x-go-name": "Version" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "NodeInfoServices": { - "description": "NodeInfoServices contains the third party sites this server can connect to via their application API", - "type": "object", - "properties": { - "inbound": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Inbound" - }, - "outbound": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Outbound" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "NodeInfoSoftware": { - "description": "NodeInfoSoftware contains Metadata about server software in use", - "type": "object", - "properties": { - "homepage": { - "type": "string", - "x-go-name": "Homepage" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "repository": { - "type": "string", - "x-go-name": "Repository" - }, - "version": { - "type": "string", - "x-go-name": "Version" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "NodeInfoUsage": { - "description": "NodeInfoUsage contains usage statistics for this server", - "type": "object", - "properties": { - "localComments": { - "type": "integer", - "format": "int64", - "x-go-name": "LocalComments" - }, - "localPosts": { - "type": "integer", - "format": "int64", - "x-go-name": "LocalPosts" - }, - "users": { - "$ref": "#/definitions/NodeInfoUsageUsers" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "NodeInfoUsageUsers": { - "description": "NodeInfoUsageUsers contains statistics about the users of this server", - "type": "object", - "properties": { - "activeHalfyear": { - "type": "integer", - "format": "int64", - "x-go-name": "ActiveHalfyear" - }, - "activeMonth": { - "type": "integer", - "format": "int64", - "x-go-name": "ActiveMonth" - }, - "total": { - "type": "integer", - "format": "int64", - "x-go-name": "Total" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Note": { - "description": "Note contains information related to a git note", - "type": "object", - "properties": { - "commit": { - "$ref": "#/definitions/Commit" - }, - "message": { - "type": "string", - "x-go-name": "Message" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "NoteOptions": { - "type": "object", - "properties": { - "message": { - "type": "string", - "x-go-name": "Message" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "NotificationCount": { - "description": "NotificationCount number of unread notifications", - "type": "object", - "properties": { - "new": { - "type": "integer", - "format": "int64", - "x-go-name": "New" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "NotificationSubject": { - "description": "NotificationSubject contains the notification subject (Issue/Pull/Commit)", - "type": "object", - "properties": { - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "latest_comment_html_url": { - "type": "string", - "x-go-name": "LatestCommentHTMLURL" - }, - "latest_comment_url": { - "type": "string", - "x-go-name": "LatestCommentURL" - }, - "state": { - "$ref": "#/definitions/StateType" - }, - "title": { - "type": "string", - "x-go-name": "Title" - }, - "type": { - "$ref": "#/definitions/NotifySubjectType" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "NotificationThread": { - "description": "NotificationThread expose Notification on API", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "pinned": { - "type": "boolean", - "x-go-name": "Pinned" - }, - "repository": { - "$ref": "#/definitions/Repository" - }, - "subject": { - "$ref": "#/definitions/NotificationSubject" - }, - "unread": { - "type": "boolean", - "x-go-name": "Unread" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "UpdatedAt" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "NotifySubjectType": { - "description": "NotifySubjectType represent type of notification subject", - "type": "string", - "x-go-package": "forgejo.org/modules/structs" - }, - "OAuth2Application": { - "type": "object", - "title": "OAuth2Application represents an OAuth2 application.", - "properties": { - "client_id": { - "type": "string", - "x-go-name": "ClientID" - }, - "client_secret": { - "type": "string", - "x-go-name": "ClientSecret" - }, - "confidential_client": { - "type": "boolean", - "x-go-name": "ConfidentialClient" - }, - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "redirect_uris": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "RedirectURIs" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Organization": { - "description": "Organization represents an organization", - "type": "object", - "properties": { - "avatar_url": { - "type": "string", - "x-go-name": "AvatarURL" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "email": { - "type": "string", - "x-go-name": "Email" - }, - "full_name": { - "type": "string", - "x-go-name": "FullName" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "location": { - "type": "string", - "x-go-name": "Location" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "repo_admin_change_team_access": { - "type": "boolean", - "x-go-name": "RepoAdminChangeTeamAccess" - }, - "username": { - "description": "deprecated", - "type": "string", - "x-go-name": "UserName" - }, - "visibility": { - "type": "string", - "x-go-name": "Visibility" - }, - "website": { - "type": "string", - "x-go-name": "Website" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "OrganizationPermissions": { - "description": "OrganizationPermissions list different users permissions on an organization", - "type": "object", - "properties": { - "can_create_repository": { - "type": "boolean", - "x-go-name": "CanCreateRepository" - }, - "can_read": { - "type": "boolean", - "x-go-name": "CanRead" - }, - "can_write": { - "type": "boolean", - "x-go-name": "CanWrite" - }, - "is_admin": { - "type": "boolean", - "x-go-name": "IsAdmin" - }, - "is_owner": { - "type": "boolean", - "x-go-name": "IsOwner" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PRBranchInfo": { - "description": "PRBranchInfo information about a branch", - "type": "object", - "properties": { - "label": { - "type": "string", - "x-go-name": "Name" - }, - "ref": { - "type": "string", - "x-go-name": "Ref" - }, - "repo": { - "$ref": "#/definitions/Repository" - }, - "repo_id": { - "type": "integer", - "format": "int64", - "x-go-name": "RepoID" - }, - "sha": { - "type": "string", - "x-go-name": "Sha" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Package": { - "description": "Package represents a package", - "type": "object", - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "CreatedAt" - }, - "creator": { - "$ref": "#/definitions/User" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "owner": { - "$ref": "#/definitions/User" - }, - "repository": { - "$ref": "#/definitions/Repository" - }, - "type": { - "type": "string", - "x-go-name": "Type" - }, - "version": { - "type": "string", - "x-go-name": "Version" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PackageFile": { - "description": "PackageFile represents a package file", - "type": "object", - "properties": { - "Size": { - "type": "integer", - "format": "int64" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "md5": { - "type": "string", - "x-go-name": "HashMD5" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "sha1": { - "type": "string", - "x-go-name": "HashSHA1" - }, - "sha256": { - "type": "string", - "x-go-name": "HashSHA256" - }, - "sha512": { - "type": "string", - "x-go-name": "HashSHA512" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PayloadCommit": { - "description": "PayloadCommit represents a commit", - "type": "object", - "properties": { - "added": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Added" - }, - "author": { - "$ref": "#/definitions/PayloadUser" - }, - "committer": { - "$ref": "#/definitions/PayloadUser" - }, - "id": { - "description": "sha1 hash of the commit", - "type": "string", - "x-go-name": "ID" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, - "modified": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Modified" - }, - "removed": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Removed" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "x-go-name": "Timestamp" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "verification": { - "$ref": "#/definitions/PayloadCommitVerification" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PayloadCommitVerification": { - "description": "PayloadCommitVerification represents the GPG verification of a commit", - "type": "object", - "properties": { - "payload": { - "type": "string", - "x-go-name": "Payload" - }, - "reason": { - "type": "string", - "x-go-name": "Reason" - }, - "signature": { - "type": "string", - "x-go-name": "Signature" - }, - "signer": { - "$ref": "#/definitions/PayloadUser" - }, - "verified": { - "type": "boolean", - "x-go-name": "Verified" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PayloadUser": { - "description": "PayloadUser represents the author or committer of a commit", - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "x-go-name": "Email" - }, - "name": { - "description": "Full name of the commit author", - "type": "string", - "x-go-name": "Name" - }, - "username": { - "type": "string", - "x-go-name": "UserName" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Permission": { - "description": "Permission represents a set of permissions", - "type": "object", - "properties": { - "admin": { - "type": "boolean", - "x-go-name": "Admin" - }, - "pull": { - "type": "boolean", - "x-go-name": "Pull" - }, - "push": { - "type": "boolean", - "x-go-name": "Push" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PublicKey": { - "description": "PublicKey publickey is a user key to push code to repository", - "type": "object", - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "fingerprint": { - "type": "string", - "x-go-name": "Fingerprint" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "key": { - "type": "string", - "x-go-name": "Key" - }, - "key_type": { - "type": "string", - "x-go-name": "KeyType" - }, - "read_only": { - "type": "boolean", - "x-go-name": "ReadOnly" - }, - "title": { - "type": "string", - "x-go-name": "Title" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "user": { - "$ref": "#/definitions/User" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PullRequest": { - "description": "PullRequest represents a pull request", - "type": "object", - "properties": { - "additions": { - "type": "integer", - "format": "int64", - "x-go-name": "Additions" - }, - "allow_maintainer_edit": { - "type": "boolean", - "x-go-name": "AllowMaintainerEdit" - }, - "assignee": { - "$ref": "#/definitions/User" - }, - "assignees": { - "type": "array", - "items": { - "$ref": "#/definitions/User" - }, - "x-go-name": "Assignees" - }, - "base": { - "$ref": "#/definitions/PRBranchInfo" - }, - "body": { - "type": "string", - "x-go-name": "Body" - }, - "changed_files": { - "type": "integer", - "format": "int64", - "x-go-name": "ChangedFiles" - }, - "closed_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Closed" - }, - "comments": { - "type": "integer", - "format": "int64", - "x-go-name": "Comments" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "deletions": { - "type": "integer", - "format": "int64", - "x-go-name": "Deletions" - }, - "diff_url": { - "type": "string", - "x-go-name": "DiffURL" - }, - "draft": { - "type": "boolean", - "x-go-name": "Draft" - }, - "due_date": { - "type": "string", - "format": "date-time", - "x-go-name": "Deadline" - }, - "flow": { - "type": "integer", - "format": "int64", - "x-go-name": "Flow" - }, - "head": { - "$ref": "#/definitions/PRBranchInfo" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "is_locked": { - "type": "boolean", - "x-go-name": "IsLocked" - }, - "labels": { - "type": "array", - "items": { - "$ref": "#/definitions/Label" - }, - "x-go-name": "Labels" - }, - "merge_base": { - "type": "string", - "x-go-name": "MergeBase" - }, - "merge_commit_sha": { - "type": "string", - "x-go-name": "MergedCommitID" - }, - "mergeable": { - "type": "boolean", - "x-go-name": "Mergeable" - }, - "merged": { - "type": "boolean", - "x-go-name": "HasMerged" - }, - "merged_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Merged" - }, - "merged_by": { - "$ref": "#/definitions/User" - }, - "milestone": { - "$ref": "#/definitions/Milestone" - }, - "number": { - "type": "integer", - "format": "int64", - "x-go-name": "Index" - }, - "patch_url": { - "type": "string", - "x-go-name": "PatchURL" - }, - "pin_order": { - "type": "integer", - "format": "int64", - "x-go-name": "PinOrder" - }, - "requested_reviewers": { - "type": "array", - "items": { - "$ref": "#/definitions/User" - }, - "x-go-name": "RequestedReviewers" - }, - "requested_reviewers_teams": { - "type": "array", - "items": { - "$ref": "#/definitions/Team" - }, - "x-go-name": "RequestedReviewersTeams" - }, - "review_comments": { - "description": "number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR)", - "type": "integer", - "format": "int64", - "x-go-name": "ReviewComments" - }, - "state": { - "$ref": "#/definitions/StateType" - }, - "title": { - "type": "string", - "x-go-name": "Title" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "user": { - "$ref": "#/definitions/User" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PullRequestMeta": { - "description": "PullRequestMeta PR info if an issue is a PR", - "type": "object", - "properties": { - "draft": { - "type": "boolean", - "x-go-name": "IsWorkInProgress" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "merged": { - "type": "boolean", - "x-go-name": "HasMerged" - }, - "merged_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Merged" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PullReview": { - "description": "PullReview represents a pull request review", - "type": "object", - "properties": { - "body": { - "type": "string", - "x-go-name": "Body" - }, - "comments_count": { - "type": "integer", - "format": "int64", - "x-go-name": "CodeCommentsCount" - }, - "commit_id": { - "type": "string", - "x-go-name": "CommitID" - }, - "dismissed": { - "type": "boolean", - "x-go-name": "Dismissed" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "official": { - "type": "boolean", - "x-go-name": "Official" - }, - "pull_request_url": { - "type": "string", - "x-go-name": "HTMLPullURL" - }, - "stale": { - "type": "boolean", - "x-go-name": "Stale" - }, - "state": { - "$ref": "#/definitions/ReviewStateType" - }, - "submitted_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Submitted" - }, - "team": { - "$ref": "#/definitions/Team" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "user": { - "$ref": "#/definitions/User" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PullReviewComment": { - "description": "PullReviewComment represents a comment on a pull request review", - "type": "object", - "properties": { - "body": { - "type": "string", - "x-go-name": "Body" - }, - "commit_id": { - "type": "string", - "x-go-name": "CommitID" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "diff_hunk": { - "type": "string", - "x-go-name": "DiffHunk" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "original_commit_id": { - "type": "string", - "x-go-name": "OrigCommitID" - }, - "original_position": { - "type": "integer", - "format": "uint64", - "x-go-name": "OldLineNum" - }, - "path": { - "type": "string", - "x-go-name": "Path" - }, - "position": { - "type": "integer", - "format": "uint64", - "x-go-name": "LineNum" - }, - "pull_request_review_id": { - "type": "integer", - "format": "int64", - "x-go-name": "ReviewID" - }, - "pull_request_url": { - "type": "string", - "x-go-name": "HTMLPullURL" - }, - "resolver": { - "$ref": "#/definitions/User" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "user": { - "$ref": "#/definitions/User" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PullReviewRequestOptions": { - "description": "PullReviewRequestOptions are options to add or remove pull review requests", - "type": "object", - "properties": { - "reviewers": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Reviewers" - }, - "team_reviewers": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "TeamReviewers" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "PushMirror": { - "description": "PushMirror represents information of a push mirror", - "type": "object", - "properties": { - "branch_filter": { - "type": "string", - "x-go-name": "BranchFilter" - }, - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "CreatedUnix" - }, - "interval": { - "type": "string", - "x-go-name": "Interval" - }, - "last_error": { - "type": "string", - "x-go-name": "LastError" - }, - "last_update": { - "type": "string", - "format": "date-time", - "x-go-name": "LastUpdateUnix" - }, - "public_key": { - "type": "string", - "x-go-name": "PublicKey" - }, - "remote_address": { - "type": "string", - "x-go-name": "RemoteAddress" - }, - "remote_name": { - "type": "string", - "x-go-name": "RemoteName" - }, - "repo_name": { - "type": "string", - "x-go-name": "RepoName" - }, - "sync_on_commit": { - "type": "boolean", - "x-go-name": "SyncOnCommit" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaGroup": { - "description": "QuotaGroup represents a quota group", - "type": "object", - "properties": { - "name": { - "description": "Name of the group", - "type": "string", - "x-go-name": "Name" - }, - "rules": { - "description": "Rules associated with the group", - "type": "array", - "items": { - "$ref": "#/definitions/QuotaRuleInfo" - }, - "x-go-name": "Rules" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaGroupList": { - "description": "QuotaGroupList represents a list of quota groups", - "type": "array", - "items": { - "$ref": "#/definitions/QuotaGroup" - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaInfo": { - "description": "QuotaInfo represents information about a user's quota", - "type": "object", - "properties": { - "groups": { - "$ref": "#/definitions/QuotaGroupList" - }, - "used": { - "$ref": "#/definitions/QuotaUsed" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaRuleInfo": { - "description": "QuotaRuleInfo contains information about a quota rule", - "type": "object", - "properties": { - "limit": { - "description": "The limit set by the rule", - "type": "integer", - "format": "int64", - "x-go-name": "Limit" - }, - "name": { - "description": "Name of the rule (only shown to admins)", - "type": "string", - "x-go-name": "Name" - }, - "subjects": { - "description": "Subjects the rule affects", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Subjects" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsed": { - "description": "QuotaUsed represents the quota usage of a user", - "type": "object", - "properties": { - "size": { - "$ref": "#/definitions/QuotaUsedSize" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedArtifact": { - "description": "QuotaUsedArtifact represents an artifact counting towards a user's quota", - "type": "object", - "properties": { - "html_url": { - "description": "HTML URL to the action run containing the artifact", - "type": "string", - "x-go-name": "HTMLURL" - }, - "name": { - "description": "Name of the artifact", - "type": "string", - "x-go-name": "Name" - }, - "size": { - "description": "Size of the artifact (compressed)", - "type": "integer", - "format": "int64", - "x-go-name": "Size" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedArtifactList": { - "description": "QuotaUsedArtifactList represents a list of artifacts counting towards a user's quota", - "type": "array", - "items": { - "$ref": "#/definitions/QuotaUsedArtifact" - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedAttachment": { - "description": "QuotaUsedAttachment represents an attachment counting towards a user's quota", - "type": "object", - "properties": { - "api_url": { - "description": "API URL for the attachment", - "type": "string", - "x-go-name": "APIURL" - }, - "contained_in": { - "description": "Context for the attachment: URLs to the containing object", - "type": "object", - "properties": { - "api_url": { - "description": "API URL for the object that contains this attachment", - "type": "string", - "x-go-name": "APIURL" - }, - "html_url": { - "description": "HTML URL for the object that contains this attachment", - "type": "string", - "x-go-name": "HTMLURL" - } - }, - "x-go-name": "ContainedIn" - }, - "name": { - "description": "Filename of the attachment", - "type": "string", - "x-go-name": "Name" - }, - "size": { - "description": "Size of the attachment (in bytes)", - "type": "integer", - "format": "int64", - "x-go-name": "Size" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedAttachmentList": { - "description": "QuotaUsedAttachmentList represents a list of attachment counting towards a user's quota", - "type": "array", - "items": { - "$ref": "#/definitions/QuotaUsedAttachment" - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedPackage": { - "description": "QuotaUsedPackage represents a package counting towards a user's quota", - "type": "object", - "properties": { - "html_url": { - "description": "HTML URL to the package version", - "type": "string", - "x-go-name": "HTMLURL" - }, - "name": { - "description": "Name of the package", - "type": "string", - "x-go-name": "Name" - }, - "size": { - "description": "Size of the package version", - "type": "integer", - "format": "int64", - "x-go-name": "Size" - }, - "type": { - "description": "Type of the package", - "type": "string", - "x-go-name": "Type" - }, - "version": { - "description": "Version of the package", - "type": "string", - "x-go-name": "Version" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedPackageList": { - "description": "QuotaUsedPackageList represents a list of packages counting towards a user's quota", - "type": "array", - "items": { - "$ref": "#/definitions/QuotaUsedPackage" - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedSize": { - "description": "QuotaUsedSize represents the size-based quota usage of a user", - "type": "object", - "properties": { - "assets": { - "$ref": "#/definitions/QuotaUsedSizeAssets" - }, - "git": { - "$ref": "#/definitions/QuotaUsedSizeGit" - }, - "repos": { - "$ref": "#/definitions/QuotaUsedSizeRepos" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedSizeAssets": { - "description": "QuotaUsedSizeAssets represents the size-based asset usage of a user", - "type": "object", - "properties": { - "artifacts": { - "description": "Storage size used for the user's artifacts", - "type": "integer", - "format": "int64", - "x-go-name": "Artifacts" - }, - "attachments": { - "$ref": "#/definitions/QuotaUsedSizeAssetsAttachments" - }, - "packages": { - "$ref": "#/definitions/QuotaUsedSizeAssetsPackages" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedSizeAssetsAttachments": { - "description": "QuotaUsedSizeAssetsAttachments represents the size-based attachment quota usage of a user", - "type": "object", - "properties": { - "issues": { - "description": "Storage size used for the user's issue \u0026 comment attachments", - "type": "integer", - "format": "int64", - "x-go-name": "Issues" - }, - "releases": { - "description": "Storage size used for the user's release attachments", - "type": "integer", - "format": "int64", - "x-go-name": "Releases" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedSizeAssetsPackages": { - "description": "QuotaUsedSizeAssetsPackages represents the size-based package quota usage of a user", - "type": "object", - "properties": { - "all": { - "description": "Storage suze used for the user's packages", - "type": "integer", - "format": "int64", - "x-go-name": "All" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedSizeGit": { - "description": "QuotaUsedSizeGit represents the size-based git (lfs) quota usage of a user", - "type": "object", - "properties": { - "LFS": { - "description": "Storage size of the user's Git LFS objects", - "type": "integer", - "format": "int64" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "QuotaUsedSizeRepos": { - "description": "QuotaUsedSizeRepos represents the size-based repository quota usage of a user", - "type": "object", - "properties": { - "private": { - "description": "Storage size of the user's private repositories", - "type": "integer", - "format": "int64", - "x-go-name": "Private" - }, - "public": { - "description": "Storage size of the user's public repositories", - "type": "integer", - "format": "int64", - "x-go-name": "Public" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Reaction": { - "description": "Reaction contain one reaction", - "type": "object", - "properties": { - "content": { - "type": "string", - "x-go-name": "Reaction" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "user": { - "$ref": "#/definitions/User" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Reference": { - "type": "object", - "title": "Reference represents a Git reference.", - "properties": { - "object": { - "$ref": "#/definitions/GitObject" - }, - "ref": { - "type": "string", - "x-go-name": "Ref" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "RegistrationToken": { - "description": "RegistrationToken is a string used to register a runner with a server", - "type": "object", - "properties": { - "token": { - "type": "string", - "x-go-name": "Token" - } - }, - "x-go-package": "forgejo.org/routers/api/v1/shared" - }, - "Release": { - "description": "Release represents a repository release", - "type": "object", - "properties": { - "archive_download_count": { - "$ref": "#/definitions/TagArchiveDownloadCount" - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/definitions/Attachment" - }, - "x-go-name": "Attachments" - }, - "author": { - "$ref": "#/definitions/User" - }, - "body": { - "type": "string", - "x-go-name": "Note" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "CreatedAt" - }, - "draft": { - "type": "boolean", - "x-go-name": "IsDraft" - }, - "hide_archive_links": { - "type": "boolean", - "x-go-name": "HideArchiveLinks" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "name": { - "type": "string", - "x-go-name": "Title" - }, - "prerelease": { - "type": "boolean", - "x-go-name": "IsPrerelease" - }, - "published_at": { - "type": "string", - "format": "date-time", - "x-go-name": "PublishedAt" - }, - "tag_name": { - "type": "string", - "x-go-name": "TagName" - }, - "tarball_url": { - "type": "string", - "x-go-name": "TarURL" - }, - "target_commitish": { - "type": "string", - "x-go-name": "Target" - }, - "upload_url": { - "type": "string", - "x-go-name": "UploadURL" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "zipball_url": { - "type": "string", - "x-go-name": "ZipURL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "RenameOrgOption": { - "description": "RenameOrgOption options when renaming an organization", - "type": "object", - "required": ["new_name"], - "properties": { - "new_name": { - "description": "New username for this org. This name cannot be in use yet by any other user.", - "type": "string", - "uniqueItems": true, - "x-go-name": "NewName" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "RenameUserOption": { - "description": "RenameUserOption options when renaming a user", - "type": "object", - "required": ["new_username"], - "properties": { - "new_username": { - "description": "New username for this user. This name cannot be in use yet by any other user.", - "type": "string", - "uniqueItems": true, - "x-go-name": "NewName" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ReplaceFlagsOption": { - "description": "ReplaceFlagsOption options when replacing the flags of a repository", - "type": "object", - "properties": { - "flags": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Flags" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "RepoCollaboratorPermission": { - "description": "RepoCollaboratorPermission to get repository permission for a collaborator", - "type": "object", - "properties": { - "permission": { - "type": "string", - "x-go-name": "Permission" - }, - "role_name": { - "type": "string", - "x-go-name": "RoleName" - }, - "user": { - "$ref": "#/definitions/User" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "RepoCommit": { - "type": "object", - "title": "RepoCommit contains information of a commit in the context of a repository.", - "properties": { - "author": { - "$ref": "#/definitions/CommitUser" - }, - "committer": { - "$ref": "#/definitions/CommitUser" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, - "tree": { - "$ref": "#/definitions/CommitMeta" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "verification": { - "$ref": "#/definitions/PayloadCommitVerification" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "RepoTopicOptions": { - "description": "RepoTopicOptions a collection of repo topic names", - "type": "object", - "properties": { - "topics": { - "description": "list of topic names", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Topics" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "RepoTransfer": { - "description": "RepoTransfer represents a pending repo transfer", - "type": "object", - "properties": { - "doer": { - "$ref": "#/definitions/User" - }, - "recipient": { - "$ref": "#/definitions/User" - }, - "teams": { - "type": "array", - "items": { - "$ref": "#/definitions/Team" - }, - "x-go-name": "Teams" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Repository": { - "description": "Repository represents a repository", - "type": "object", - "properties": { - "allow_fast_forward_only_merge": { - "type": "boolean", - "x-go-name": "AllowFastForwardOnly" - }, - "allow_merge_commits": { - "type": "boolean", - "x-go-name": "AllowMerge" - }, - "allow_rebase": { - "type": "boolean", - "x-go-name": "AllowRebase" - }, - "allow_rebase_explicit": { - "type": "boolean", - "x-go-name": "AllowRebaseMerge" - }, - "allow_rebase_update": { - "type": "boolean", - "x-go-name": "AllowRebaseUpdate" - }, - "allow_squash_merge": { - "type": "boolean", - "x-go-name": "AllowSquash" - }, - "archived": { - "type": "boolean", - "x-go-name": "Archived" - }, - "archived_at": { - "type": "string", - "format": "date-time", - "x-go-name": "ArchivedAt" - }, - "avatar_url": { - "type": "string", - "x-go-name": "AvatarURL" - }, - "clone_url": { - "type": "string", - "x-go-name": "CloneURL" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "default_allow_maintainer_edit": { - "type": "boolean", - "x-go-name": "DefaultAllowMaintainerEdit" - }, - "default_branch": { - "type": "string", - "x-go-name": "DefaultBranch" - }, - "default_delete_branch_after_merge": { - "type": "boolean", - "x-go-name": "DefaultDeleteBranchAfterMerge" - }, - "default_merge_style": { - "type": "string", - "x-go-name": "DefaultMergeStyle" - }, - "default_update_style": { - "type": "string", - "x-go-name": "DefaultUpdateStyle" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "empty": { - "type": "boolean", - "x-go-name": "Empty" - }, - "external_tracker": { - "$ref": "#/definitions/ExternalTracker" - }, - "external_wiki": { - "$ref": "#/definitions/ExternalWiki" - }, - "fork": { - "type": "boolean", - "x-go-name": "Fork" - }, - "forks_count": { - "type": "integer", - "format": "int64", - "x-go-name": "Forks" - }, - "full_name": { - "type": "string", - "x-go-name": "FullName" - }, - "globally_editable_wiki": { - "type": "boolean", - "x-go-name": "GloballyEditableWiki" - }, - "has_actions": { - "type": "boolean", - "x-go-name": "HasActions" - }, - "has_issues": { - "type": "boolean", - "x-go-name": "HasIssues" - }, - "has_packages": { - "type": "boolean", - "x-go-name": "HasPackages" - }, - "has_projects": { - "type": "boolean", - "x-go-name": "HasProjects" - }, - "has_pull_requests": { - "type": "boolean", - "x-go-name": "HasPullRequests" - }, - "has_releases": { - "type": "boolean", - "x-go-name": "HasReleases" - }, - "has_wiki": { - "type": "boolean", - "x-go-name": "HasWiki" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "ignore_whitespace_conflicts": { - "type": "boolean", - "x-go-name": "IgnoreWhitespaceConflicts" - }, - "internal": { - "type": "boolean", - "x-go-name": "Internal" - }, - "internal_tracker": { - "$ref": "#/definitions/InternalTracker" - }, - "language": { - "type": "string", - "x-go-name": "Language" - }, - "languages_url": { - "type": "string", - "x-go-name": "LanguagesURL" - }, - "link": { - "type": "string", - "x-go-name": "Link" - }, - "mirror": { - "type": "boolean", - "x-go-name": "Mirror" - }, - "mirror_interval": { - "type": "string", - "x-go-name": "MirrorInterval" - }, - "mirror_updated": { - "type": "string", - "format": "date-time", - "x-go-name": "MirrorUpdated" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "object_format_name": { - "description": "ObjectFormatName of the underlying git repository", - "type": "string", - "enum": ["sha1", "sha256"], - "x-go-name": "ObjectFormatName" - }, - "open_issues_count": { - "type": "integer", - "format": "int64", - "x-go-name": "OpenIssues" - }, - "open_pr_counter": { - "type": "integer", - "format": "int64", - "x-go-name": "OpenPulls" - }, - "original_url": { - "type": "string", - "x-go-name": "OriginalURL" - }, - "owner": { - "$ref": "#/definitions/User" - }, - "parent": { - "$ref": "#/definitions/Repository" - }, - "permissions": { - "$ref": "#/definitions/Permission" - }, - "private": { - "type": "boolean", - "x-go-name": "Private" - }, - "release_counter": { - "type": "integer", - "format": "int64", - "x-go-name": "Releases" - }, - "repo_transfer": { - "$ref": "#/definitions/RepoTransfer" - }, - "size": { - "type": "integer", - "format": "int64", - "x-go-name": "Size" - }, - "ssh_url": { - "type": "string", - "x-go-name": "SSHURL" - }, - "stars_count": { - "type": "integer", - "format": "int64", - "x-go-name": "Stars" - }, - "template": { - "type": "boolean", - "x-go-name": "Template" - }, - "topics": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Topics" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "watchers_count": { - "type": "integer", - "format": "int64", - "x-go-name": "Watchers" - }, - "website": { - "type": "string", - "x-go-name": "Website" - }, - "wiki_branch": { - "type": "string", - "x-go-name": "WikiBranch" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "RepositoryMeta": { - "description": "RepositoryMeta basic repository information", - "type": "object", - "properties": { - "full_name": { - "type": "string", - "x-go-name": "FullName" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "owner": { - "type": "string", - "x-go-name": "Owner" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ReviewStateType": { - "description": "ReviewStateType review state type", - "type": "string", - "x-go-package": "forgejo.org/modules/structs" - }, - "SearchResults": { - "description": "SearchResults results of a successful search", - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/Repository" - }, - "x-go-name": "Data" - }, - "ok": { - "type": "boolean", - "x-go-name": "OK" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Secret": { - "description": "Secret represents a secret", - "type": "object", - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "name": { - "description": "the secret's name", - "type": "string", - "x-go-name": "Name" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "ServerVersion": { - "description": "ServerVersion wraps the version of the server", - "type": "object", - "properties": { - "version": { - "type": "string", - "x-go-name": "Version" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "SetUserQuotaGroupsOptions": { - "description": "SetUserQuotaGroupsOptions represents the quota groups of a user", - "type": "object", - "required": ["groups"], - "properties": { - "groups": { - "description": "Quota groups the user shall have", - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Groups" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "StateType": { - "description": "StateType issue state type", - "type": "string", - "x-go-package": "forgejo.org/modules/structs" - }, - "StopWatch": { - "description": "StopWatch represent a running stopwatch", - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "duration": { - "type": "string", - "x-go-name": "Duration" - }, - "issue_index": { - "type": "integer", - "format": "int64", - "x-go-name": "IssueIndex" - }, - "issue_title": { - "type": "string", - "x-go-name": "IssueTitle" - }, - "repo_name": { - "type": "string", - "x-go-name": "RepoName" - }, - "repo_owner_name": { - "type": "string", - "x-go-name": "RepoOwnerName" - }, - "seconds": { - "type": "integer", - "format": "int64", - "x-go-name": "Seconds" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "SubmitPullReviewOptions": { - "description": "SubmitPullReviewOptions are options to submit a pending pull review", - "type": "object", - "properties": { - "body": { - "type": "string", - "x-go-name": "Body" - }, - "event": { - "$ref": "#/definitions/ReviewStateType" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "SyncForkInfo": { - "description": "SyncForkInfo information about syncing a fork", - "type": "object", - "properties": { - "allowed": { - "type": "boolean", - "x-go-name": "Allowed" - }, - "base_commit": { - "type": "string", - "x-go-name": "BaseCommit" - }, - "commits_behind": { - "type": "integer", - "format": "int64", - "x-go-name": "CommitsBehind" - }, - "fork_commit": { - "type": "string", - "x-go-name": "ForkCommit" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Tag": { - "description": "Tag represents a repository tag", - "type": "object", - "properties": { - "archive_download_count": { - "$ref": "#/definitions/TagArchiveDownloadCount" - }, - "commit": { - "$ref": "#/definitions/CommitMeta" - }, - "id": { - "type": "string", - "x-go-name": "ID" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "tarball_url": { - "type": "string", - "x-go-name": "TarballURL" - }, - "zipball_url": { - "type": "string", - "x-go-name": "ZipballURL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "TagArchiveDownloadCount": { - "description": "TagArchiveDownloadCount counts how many times a archive was downloaded", - "type": "object", - "properties": { - "tar_gz": { - "type": "integer", - "format": "int64", - "x-go-name": "TarGz" - }, - "zip": { - "type": "integer", - "format": "int64", - "x-go-name": "Zip" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "TagProtection": { - "description": "TagProtection represents a tag protection", - "type": "object", - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "name_pattern": { - "type": "string", - "x-go-name": "NamePattern" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "whitelist_teams": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "WhitelistTeams" - }, - "whitelist_usernames": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "WhitelistUsernames" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "Team": { - "description": "Team represents a team in an organization", - "type": "object", - "properties": { - "can_create_org_repo": { - "type": "boolean", - "x-go-name": "CanCreateOrgRepo" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "includes_all_repositories": { - "type": "boolean", - "x-go-name": "IncludesAllRepositories" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "organization": { - "$ref": "#/definitions/Organization" - }, - "permission": { - "type": "string", - "enum": ["none", "read", "write", "admin", "owner"], - "x-go-name": "Permission" - }, - "units": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Units", - "example": [ - "repo.code", - "repo.issues", - "repo.ext_issues", - "repo.wiki", - "repo.pulls", - "repo.releases", - "repo.projects", - "repo.ext_wiki" - ] - }, - "units_map": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-go-name": "UnitsMap", - "example": { - "repo.code": "read", - "repo.ext_issues": "none", - "repo.ext_wiki": "none", - "repo.issues": "write", - "repo.projects": "none", - "repo.pulls": "owner", - "repo.releases": "none", - "repo.wiki": "admin" - } - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "TimeStamp": { - "description": "TimeStamp defines a timestamp", - "type": "integer", - "format": "int64", - "x-go-package": "forgejo.org/modules/timeutil" - }, - "TimelineComment": { - "description": "TimelineComment represents a timeline comment (comment of any type) on a commit or issue", - "type": "object", - "properties": { - "assignee": { - "$ref": "#/definitions/User" - }, - "assignee_team": { - "$ref": "#/definitions/Team" - }, - "body": { - "type": "string", - "x-go-name": "Body" - }, - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "dependent_issue": { - "$ref": "#/definitions/Issue" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "issue_url": { - "type": "string", - "x-go-name": "IssueURL" - }, - "label": { - "$ref": "#/definitions/Label" - }, - "milestone": { - "$ref": "#/definitions/Milestone" - }, - "new_ref": { - "type": "string", - "x-go-name": "NewRef" - }, - "new_title": { - "type": "string", - "x-go-name": "NewTitle" - }, - "old_milestone": { - "$ref": "#/definitions/Milestone" - }, - "old_project_id": { - "type": "integer", - "format": "int64", - "x-go-name": "OldProjectID" - }, - "old_ref": { - "type": "string", - "x-go-name": "OldRef" - }, - "old_title": { - "type": "string", - "x-go-name": "OldTitle" - }, - "project_id": { - "type": "integer", - "format": "int64", - "x-go-name": "ProjectID" - }, - "pull_request_url": { - "type": "string", - "x-go-name": "PRURL" - }, - "ref_action": { - "type": "string", - "x-go-name": "RefAction" - }, - "ref_comment": { - "$ref": "#/definitions/Comment" - }, - "ref_commit_sha": { - "description": "commit SHA where issue/PR was referenced", - "type": "string", - "x-go-name": "RefCommitSHA" - }, - "ref_issue": { - "$ref": "#/definitions/Issue" - }, - "removed_assignee": { - "description": "whether the assignees were removed or added", - "type": "boolean", - "x-go-name": "RemovedAssignee" - }, - "resolve_doer": { - "$ref": "#/definitions/User" - }, - "review_id": { - "type": "integer", - "format": "int64", - "x-go-name": "ReviewID" - }, - "tracked_time": { - "$ref": "#/definitions/TrackedTime" - }, - "type": { - "type": "string", - "x-go-name": "Type" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "user": { - "$ref": "#/definitions/User" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "TopicName": { - "description": "TopicName a list of repo topic names", - "type": "object", - "properties": { - "topics": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "TopicNames" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "TopicResponse": { - "description": "TopicResponse for returning topics", - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "repo_count": { - "type": "integer", - "format": "int64", - "x-go-name": "RepoCount" - }, - "topic_name": { - "type": "string", - "x-go-name": "Name" - }, - "updated": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "TrackedTime": { - "description": "TrackedTime worked time for an issue / pr", - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "issue": { - "$ref": "#/definitions/Issue" - }, - "issue_id": { - "description": "deprecated (only for backwards compatibility)", - "type": "integer", - "format": "int64", - "x-go-name": "IssueID" - }, - "time": { - "description": "Time in seconds", - "type": "integer", - "format": "int64", - "x-go-name": "Time" - }, - "user_id": { - "description": "deprecated (only for backwards compatibility)", - "type": "integer", - "format": "int64", - "x-go-name": "UserID" - }, - "user_name": { - "type": "string", - "x-go-name": "UserName" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "TransferRepoOption": { - "description": "TransferRepoOption options when transfer a repository's ownership", - "type": "object", - "required": ["new_owner"], - "properties": { - "new_owner": { - "type": "string", - "x-go-name": "NewOwner" - }, - "team_ids": { - "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "x-go-name": "TeamIDs" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "UpdateBranchRepoOption": { - "description": "UpdateBranchRepoOption options when updating a branch in a repository", - "type": "object", - "required": ["name"], - "properties": { - "name": { - "description": "New branch name", - "type": "string", - "uniqueItems": true, - "x-go-name": "Name" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "UpdateFileOptions": { - "description": "UpdateFileOptions options for updating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", - "type": "object", - "required": ["sha", "content"], - "properties": { - "author": { - "$ref": "#/definitions/Identity" - }, - "branch": { - "description": "branch (optional) to base this file from. if not given, the default branch is used", - "type": "string", - "x-go-name": "BranchName" - }, - "committer": { - "$ref": "#/definitions/Identity" - }, - "content": { - "description": "content must be base64 encoded", - "type": "string", - "x-go-name": "ContentBase64" - }, - "dates": { - "$ref": "#/definitions/CommitDateOptions" - }, - "from_path": { - "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL", - "type": "string", - "x-go-name": "FromPath" - }, - "message": { - "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", - "type": "string", - "x-go-name": "Message" - }, - "new_branch": { - "description": "new_branch (optional) will make a new branch from `branch` before creating the file", - "type": "string", - "x-go-name": "NewBranchName" - }, - "sha": { - "description": "sha is the SHA for the file that already exists", - "type": "string", - "x-go-name": "SHA" - }, - "signoff": { - "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", - "type": "boolean", - "x-go-name": "Signoff" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "UpdateRepoAvatarOption": { - "description": "UpdateRepoAvatarUserOption options when updating the repo avatar", - "type": "object", - "properties": { - "image": { - "description": "image must be base64 encoded", - "type": "string", - "x-go-name": "Image" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "UpdateUserAvatarOption": { - "description": "UpdateUserAvatarUserOption options when updating the user avatar", - "type": "object", - "properties": { - "image": { - "description": "image must be base64 encoded", - "type": "string", - "x-go-name": "Image" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "UpdateVariableOption": { - "description": "UpdateVariableOption the option when updating variable", - "type": "object", - "required": ["value"], - "properties": { - "name": { - "description": "New name for the variable. If the field is empty, the variable name won't be updated.", - "type": "string", - "x-go-name": "Name" - }, - "value": { - "description": "Value of the variable to update", - "type": "string", - "x-go-name": "Value" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "User": { - "description": "User represents a user", - "type": "object", - "properties": { - "active": { - "description": "Is user active", - "type": "boolean", - "x-go-name": "IsActive" - }, - "avatar_url": { - "description": "URL to the user's avatar", - "type": "string", - "x-go-name": "AvatarURL" - }, - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "description": { - "description": "the user's description", - "type": "string", - "x-go-name": "Description" - }, - "email": { - "type": "string", - "format": "email", - "x-go-name": "Email" - }, - "followers_count": { - "description": "user counts", - "type": "integer", - "format": "int64", - "x-go-name": "Followers" - }, - "following_count": { - "type": "integer", - "format": "int64", - "x-go-name": "Following" - }, - "full_name": { - "description": "the user's full name", - "type": "string", - "x-go-name": "FullName" - }, - "html_url": { - "description": "URL to the user's profile page", - "type": "string", - "x-go-name": "HTMLURL" - }, - "id": { - "description": "the user's id", - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "is_admin": { - "description": "Is the user an administrator", - "type": "boolean", - "x-go-name": "IsAdmin" - }, - "language": { - "description": "User locale", - "type": "string", - "x-go-name": "Language" - }, - "last_login": { - "type": "string", - "format": "date-time", - "x-go-name": "LastLogin" - }, - "location": { - "description": "the user's location", - "type": "string", - "x-go-name": "Location" - }, - "login": { - "description": "the user's username", - "type": "string", - "x-go-name": "UserName" - }, - "login_name": { - "description": "the user's authentication sign-in name.", - "type": "string", - "default": "empty", - "x-go-name": "LoginName" - }, - "prohibit_login": { - "description": "Is user login prohibited", - "type": "boolean", - "x-go-name": "ProhibitLogin" - }, - "pronouns": { - "description": "the user's pronouns", - "type": "string", - "x-go-name": "Pronouns" - }, - "restricted": { - "description": "Is user restricted", - "type": "boolean", - "x-go-name": "Restricted" - }, - "source_id": { - "description": "The ID of the user's Authentication Source", - "type": "integer", - "format": "int64", - "x-go-name": "SourceID" - }, - "starred_repos_count": { - "type": "integer", - "format": "int64", - "x-go-name": "StarredRepos" - }, - "visibility": { - "description": "User visibility level option: public, limited, private", - "type": "string", - "x-go-name": "Visibility" - }, - "website": { - "description": "the user's website", - "type": "string", - "x-go-name": "Website" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "UserHeatmapData": { - "description": "UserHeatmapData represents the data needed to create a heatmap", - "type": "object", - "properties": { - "contributions": { - "type": "integer", - "format": "int64", - "x-go-name": "Contributions" - }, - "timestamp": { - "$ref": "#/definitions/TimeStamp" - } - }, - "x-go-package": "forgejo.org/models/activities" - }, - "UserSettings": { - "description": "UserSettings represents user settings", - "type": "object", - "properties": { - "description": { - "type": "string", - "x-go-name": "Description" - }, - "diff_view_style": { - "type": "string", - "x-go-name": "DiffViewStyle" - }, - "enable_repo_unit_hints": { - "type": "boolean", - "x-go-name": "EnableRepoUnitHints" - }, - "full_name": { - "type": "string", - "x-go-name": "FullName" - }, - "hide_activity": { - "type": "boolean", - "x-go-name": "HideActivity" - }, - "hide_email": { - "description": "Privacy", - "type": "boolean", - "x-go-name": "HideEmail" - }, - "hide_pronouns": { - "type": "boolean", - "x-go-name": "HidePronouns" - }, - "language": { - "type": "string", - "x-go-name": "Language" - }, - "location": { - "type": "string", - "x-go-name": "Location" - }, - "pronouns": { - "type": "string", - "x-go-name": "Pronouns" - }, - "theme": { - "type": "string", - "x-go-name": "Theme" - }, - "website": { - "type": "string", - "x-go-name": "Website" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "UserSettingsOptions": { - "description": "UserSettingsOptions represents options to change user settings", - "type": "object", - "properties": { - "description": { - "type": "string", - "x-go-name": "Description" - }, - "diff_view_style": { - "type": "string", - "x-go-name": "DiffViewStyle" - }, - "enable_repo_unit_hints": { - "type": "boolean", - "x-go-name": "EnableRepoUnitHints" - }, - "full_name": { - "type": "string", - "x-go-name": "FullName" - }, - "hide_activity": { - "type": "boolean", - "x-go-name": "HideActivity" - }, - "hide_email": { - "description": "Privacy", - "type": "boolean", - "x-go-name": "HideEmail" - }, - "hide_pronouns": { - "type": "boolean", - "x-go-name": "HidePronouns" - }, - "language": { - "type": "string", - "x-go-name": "Language" - }, - "location": { - "type": "string", - "x-go-name": "Location" - }, - "pronouns": { - "type": "string", - "x-go-name": "Pronouns" - }, - "theme": { - "type": "string", - "x-go-name": "Theme" - }, - "website": { - "type": "string", - "x-go-name": "Website" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "VerifyGPGKeyOption": { - "description": "VerifyGPGKeyOption options verifies user GPG key", - "type": "object", - "required": ["key_id"], - "properties": { - "armored_signature": { - "type": "string", - "x-go-name": "Signature" - }, - "key_id": { - "description": "An Signature for a GPG key token", - "type": "string", - "x-go-name": "KeyID" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "WatchInfo": { - "description": "WatchInfo represents an API watch status of one repository", - "type": "object", - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "x-go-name": "CreatedAt" - }, - "ignored": { - "type": "boolean", - "x-go-name": "Ignored" - }, - "reason": { - "x-go-name": "Reason" - }, - "repository_url": { - "type": "string", - "x-go-name": "RepositoryURL" - }, - "subscribed": { - "type": "boolean", - "x-go-name": "Subscribed" - }, - "url": { - "type": "string", - "x-go-name": "URL" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "WikiCommit": { - "description": "WikiCommit page commit/revision", - "type": "object", - "properties": { - "author": { - "$ref": "#/definitions/CommitUser" - }, - "commiter": { - "$ref": "#/definitions/CommitUser" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, - "sha": { - "type": "string", - "x-go-name": "ID" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "WikiCommitList": { - "description": "WikiCommitList commit/revision list", - "type": "object", - "properties": { - "commits": { - "type": "array", - "items": { - "$ref": "#/definitions/WikiCommit" - }, - "x-go-name": "WikiCommits" - }, - "count": { - "type": "integer", - "format": "int64", - "x-go-name": "Count" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "WikiPage": { - "description": "WikiPage a wiki page", - "type": "object", - "properties": { - "commit_count": { - "type": "integer", - "format": "int64", - "x-go-name": "CommitCount" - }, - "content_base64": { - "description": "Page content, base64 encoded", - "type": "string", - "x-go-name": "ContentBase64" - }, - "footer": { - "type": "string", - "x-go-name": "Footer" - }, - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "last_commit": { - "$ref": "#/definitions/WikiCommit" - }, - "sidebar": { - "type": "string", - "x-go-name": "Sidebar" - }, - "sub_url": { - "type": "string", - "x-go-name": "SubURL" - }, - "title": { - "type": "string", - "x-go-name": "Title" - } - }, - "x-go-package": "forgejo.org/modules/structs" - }, - "WikiPageMetaData": { - "description": "WikiPageMetaData wiki page meta information", - "type": "object", - "properties": { - "html_url": { - "type": "string", - "x-go-name": "HTMLURL" - }, - "last_commit": { - "$ref": "#/definitions/WikiCommit" - }, - "sub_url": { - "type": "string", - "x-go-name": "SubURL" - }, - "title": { - "type": "string", - "x-go-name": "Title" - } - }, - "x-go-package": "forgejo.org/modules/structs" - } - }, - "responses": { - "AccessToken": { - "description": "AccessToken represents an API access token.", - "schema": { - "$ref": "#/definitions/AccessToken" - } - }, - "AccessTokenList": { - "description": "AccessTokenList represents a list of API access token.", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/AccessToken" - } - } - }, - "ActionRun": { - "description": "ActionRun", - "schema": { - "$ref": "#/definitions/ActionRun" - } - }, - "ActionRunList": { - "description": "ActionRunList", - "schema": { - "$ref": "#/definitions/ListActionRunResponse" - } - }, - "ActionVariable": { - "description": "ActionVariable", - "schema": { - "$ref": "#/definitions/ActionVariable" - } - }, - "ActivityFeedsList": { - "description": "ActivityFeedsList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Activity" - } - } - }, - "ActivityPub": { - "description": "ActivityPub", - "schema": { - "$ref": "#/definitions/ActivityPub" - } - }, - "AnnotatedTag": { - "description": "AnnotatedTag", - "schema": { - "$ref": "#/definitions/AnnotatedTag" - } - }, - "Attachment": { - "description": "Attachment", - "schema": { - "$ref": "#/definitions/Attachment" - } - }, - "AttachmentList": { - "description": "AttachmentList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Attachment" - } - } - }, - "BlockedUserList": { - "description": "BlockedUserList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockedUser" - } - } - }, - "Branch": { - "description": "Branch", - "schema": { - "$ref": "#/definitions/Branch" - } - }, - "BranchList": { - "description": "BranchList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Branch" - } - } - }, - "BranchProtection": { - "description": "BranchProtection", - "schema": { - "$ref": "#/definitions/BranchProtection" - } - }, - "BranchProtectionList": { - "description": "BranchProtectionList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/BranchProtection" - } - } - }, - "ChangedFileList": { - "description": "ChangedFileList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ChangedFile" - } - }, - "headers": { - "X-HasMore": { - "type": "boolean", - "description": "True if there is another page" - }, - "X-Page": { - "type": "integer", - "format": "int64", - "description": "The current page" - }, - "X-PageCount": { - "type": "integer", - "format": "int64", - "description": "Total number of pages" - }, - "X-PerPage": { - "type": "integer", - "format": "int64", - "description": "Commits per page" - }, - "X-Total-Count": { - "type": "integer", - "format": "int64", - "description": "Total commit count" - } - } - }, - "CombinedStatus": { - "description": "CombinedStatus", - "schema": { - "$ref": "#/definitions/CombinedStatus" - } - }, - "Comment": { - "description": "Comment", - "schema": { - "$ref": "#/definitions/Comment" - } - }, - "CommentList": { - "description": "CommentList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Comment" - } - } - }, - "Commit": { - "description": "Commit", - "schema": { - "$ref": "#/definitions/Commit" - } - }, - "CommitList": { - "description": "CommitList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Commit" - } - }, - "headers": { - "X-HasMore": { - "type": "boolean", - "description": "True if there is another page" - }, - "X-Page": { - "type": "integer", - "format": "int64", - "description": "The current page" - }, - "X-PageCount": { - "type": "integer", - "format": "int64", - "description": "Total number of pages" - }, - "X-PerPage": { - "type": "integer", - "format": "int64", - "description": "Commits per page" - }, - "X-Total": { - "type": "integer", - "format": "int64", - "description": "Total commit count" - } - } - }, - "CommitStatus": { - "description": "CommitStatus", - "schema": { - "$ref": "#/definitions/CommitStatus" - } - }, - "CommitStatusList": { - "description": "CommitStatusList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/CommitStatus" - } - } - }, - "Compare": { - "description": "", - "schema": { - "$ref": "#/definitions/Compare" - } - }, - "ContentsListResponse": { - "description": "ContentsListResponse", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ContentsResponse" - } - } - }, - "ContentsResponse": { - "description": "ContentsResponse", - "schema": { - "$ref": "#/definitions/ContentsResponse" - } - }, - "CronList": { - "description": "CronList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Cron" - } - } - }, - "DeployKey": { - "description": "DeployKey", - "schema": { - "$ref": "#/definitions/DeployKey" - } - }, - "DeployKeyList": { - "description": "DeployKeyList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/DeployKey" - } - } - }, - "DispatchWorkflowRun": { - "description": "DispatchWorkflowRun is a Workflow Run after dispatching", - "schema": { - "$ref": "#/definitions/DispatchWorkflowRun" - } - }, - "EmailList": { - "description": "EmailList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Email" - } - } - }, - "EmptyRepository": { - "description": "EmptyRepository", - "schema": { - "$ref": "#/definitions/APIError" - } - }, - "FileDeleteResponse": { - "description": "FileDeleteResponse", - "schema": { - "$ref": "#/definitions/FileDeleteResponse" - } - }, - "FileResponse": { - "description": "FileResponse", - "schema": { - "$ref": "#/definitions/FileResponse" - } - }, - "FilesResponse": { - "description": "FilesResponse", - "schema": { - "$ref": "#/definitions/FilesResponse" - } - }, - "GPGKey": { - "description": "GPGKey", - "schema": { - "$ref": "#/definitions/GPGKey" - } - }, - "GPGKeyList": { - "description": "GPGKeyList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/GPGKey" - } - } - }, - "GeneralAPISettings": { - "description": "GeneralAPISettings", - "schema": { - "$ref": "#/definitions/GeneralAPISettings" - } - }, - "GeneralAttachmentSettings": { - "description": "GeneralAttachmentSettings", - "schema": { - "$ref": "#/definitions/GeneralAttachmentSettings" - } - }, - "GeneralRepoSettings": { - "description": "GeneralRepoSettings", - "schema": { - "$ref": "#/definitions/GeneralRepoSettings" - } - }, - "GeneralUISettings": { - "description": "GeneralUISettings", - "schema": { - "$ref": "#/definitions/GeneralUISettings" - } - }, - "GitBlob": { - "description": "GitBlob", - "schema": { - "$ref": "#/definitions/GitBlob" - } - }, - "GitBlobList": { - "description": "GitBlobList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/GitBlob" - } - } - }, - "GitHook": { - "description": "GitHook", - "schema": { - "$ref": "#/definitions/GitHook" - } - }, - "GitHookList": { - "description": "GitHookList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/GitHook" - } - } - }, - "GitTreeResponse": { - "description": "GitTreeResponse", - "schema": { - "$ref": "#/definitions/GitTreeResponse" - } - }, - "GitignoreTemplateInfo": { - "description": "GitignoreTemplateInfo", - "schema": { - "$ref": "#/definitions/GitignoreTemplateInfo" - } - }, - "GitignoreTemplateList": { - "description": "GitignoreTemplateList", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Hook": { - "description": "Hook", - "schema": { - "$ref": "#/definitions/Hook" - } - }, - "HookList": { - "description": "HookList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Hook" - } - } - }, - "Issue": { - "description": "Issue", - "schema": { - "$ref": "#/definitions/Issue" - } - }, - "IssueDeadline": { - "description": "IssueDeadline", - "schema": { - "$ref": "#/definitions/IssueDeadline" - } - }, - "IssueList": { - "description": "IssueList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Issue" - } - } - }, - "IssueTemplates": { - "description": "IssueTemplates", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/IssueTemplate" - } - } - }, - "Label": { - "description": "Label", - "schema": { - "$ref": "#/definitions/Label" - } - }, - "LabelList": { - "description": "LabelList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Label" - } - } - }, - "LabelTemplateInfo": { - "description": "LabelTemplateInfo", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/LabelTemplate" - } - } - }, - "LabelTemplateList": { - "description": "LabelTemplateList", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "LanguageStatistics": { - "description": "LanguageStatistics", - "schema": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - } - }, - "LicenseTemplateInfo": { - "description": "LicenseTemplateInfo", - "schema": { - "$ref": "#/definitions/LicenseTemplateInfo" - } - }, - "LicenseTemplateList": { - "description": "LicenseTemplateList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/LicensesTemplateListEntry" - } - } - }, - "MarkdownRender": { - "description": "MarkdownRender is a rendered markdown document", - "schema": { - "type": "string" - } - }, - "MarkupRender": { - "description": "MarkupRender is a rendered markup document", - "schema": { - "type": "string" - } - }, - "Milestone": { - "description": "Milestone", - "schema": { - "$ref": "#/definitions/Milestone" - } - }, - "MilestoneList": { - "description": "MilestoneList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Milestone" - } - } - }, - "NodeInfo": { - "description": "NodeInfo", - "schema": { - "$ref": "#/definitions/NodeInfo" - } - }, - "Note": { - "description": "Note", - "schema": { - "$ref": "#/definitions/Note" - } - }, - "NotificationCount": { - "description": "Number of unread notifications", - "schema": { - "$ref": "#/definitions/NotificationCount" - } - }, - "NotificationThread": { - "description": "NotificationThread", - "schema": { - "$ref": "#/definitions/NotificationThread" - } - }, - "NotificationThreadList": { - "description": "NotificationThreadList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/NotificationThread" - } - } - }, - "OAuth2Application": { - "description": "OAuth2Application", - "schema": { - "$ref": "#/definitions/OAuth2Application" - } - }, - "OAuth2ApplicationList": { - "description": "OAuth2ApplicationList represents a list of OAuth2 applications.", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/OAuth2Application" - } - } - }, - "Organization": { - "description": "Organization", - "schema": { - "$ref": "#/definitions/Organization" - } - }, - "OrganizationList": { - "description": "OrganizationList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Organization" - } - } - }, - "OrganizationPermissions": { - "description": "OrganizationPermissions", - "schema": { - "$ref": "#/definitions/OrganizationPermissions" - } - }, - "Outbox": { - "description": "Outbox", - "schema": { - "$ref": "#/definitions/ForgeOutbox" - } - }, - "Package": { - "description": "Package", - "schema": { - "$ref": "#/definitions/Package" - } - }, - "PackageFileList": { - "description": "PackageFileList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/PackageFile" - } - } - }, - "PackageList": { - "description": "PackageList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Package" - } - } - }, - "PublicKey": { - "description": "PublicKey", - "schema": { - "$ref": "#/definitions/PublicKey" - } - }, - "PublicKeyList": { - "description": "PublicKeyList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/PublicKey" - } - } - }, - "PullRequest": { - "description": "PullRequest", - "schema": { - "$ref": "#/definitions/PullRequest" - } - }, - "PullRequestList": { - "description": "PullRequestList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/PullRequest" - } - } - }, - "PullReview": { - "description": "PullReview", - "schema": { - "$ref": "#/definitions/PullReview" - } - }, - "PullReviewComment": { - "description": "PullComment", - "schema": { - "$ref": "#/definitions/PullReviewComment" - } - }, - "PullReviewCommentList": { - "description": "PullCommentList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/PullReviewComment" - } - } - }, - "PullReviewList": { - "description": "PullReviewList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/PullReview" - } - } - }, - "PushMirror": { - "description": "PushMirror", - "schema": { - "$ref": "#/definitions/PushMirror" - } - }, - "PushMirrorList": { - "description": "PushMirrorList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/PushMirror" - } - } - }, - "QuotaGroup": { - "description": "QuotaGroup", - "schema": { - "$ref": "#/definitions/QuotaGroup" - } - }, - "QuotaGroupList": { - "description": "QuotaGroupList", - "schema": { - "$ref": "#/definitions/QuotaGroupList" - } - }, - "QuotaInfo": { - "description": "QuotaInfo", - "schema": { - "$ref": "#/definitions/QuotaInfo" - } - }, - "QuotaRuleInfo": { - "description": "QuotaRuleInfo", - "schema": { - "$ref": "#/definitions/QuotaRuleInfo" - } - }, - "QuotaRuleInfoList": { - "description": "QuotaRuleInfoList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/QuotaRuleInfo" - } - } - }, - "QuotaUsedArtifactList": { - "description": "QuotaUsedArtifactList", - "schema": { - "$ref": "#/definitions/QuotaUsedArtifactList" - } - }, - "QuotaUsedAttachmentList": { - "description": "QuotaUsedAttachmentList", - "schema": { - "$ref": "#/definitions/QuotaUsedAttachmentList" - } - }, - "QuotaUsedPackageList": { - "description": "QuotaUsedPackageList", - "schema": { - "$ref": "#/definitions/QuotaUsedPackageList" - } - }, - "Reaction": { - "description": "Reaction", - "schema": { - "$ref": "#/definitions/Reaction" - } - }, - "ReactionList": { - "description": "ReactionList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Reaction" - } - } - }, - "Reference": { - "description": "Reference", - "schema": { - "$ref": "#/definitions/Reference" - } - }, - "ReferenceList": { - "description": "ReferenceList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Reference" - } - } - }, - "RegistrationToken": { - "description": "RegistrationToken is a string used to register a runner with a server", - "schema": { - "$ref": "#/definitions/RegistrationToken" - } - }, - "Release": { - "description": "Release", - "schema": { - "$ref": "#/definitions/Release" - } - }, - "ReleaseList": { - "description": "ReleaseList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Release" - } - } - }, - "RepoCollaboratorPermission": { - "description": "RepoCollaboratorPermission", - "schema": { - "$ref": "#/definitions/RepoCollaboratorPermission" - } - }, - "RepoIssueConfig": { - "description": "RepoIssueConfig", - "schema": { - "$ref": "#/definitions/IssueConfig" - } - }, - "RepoIssueConfigValidation": { - "description": "RepoIssueConfigValidation", - "schema": { - "$ref": "#/definitions/IssueConfigValidation" - } - }, - "RepoNewIssuePinsAllowed": { - "description": "RepoNewIssuePinsAllowed", - "schema": { - "$ref": "#/definitions/NewIssuePinsAllowed" - } - }, - "Repository": { - "description": "Repository", - "schema": { - "$ref": "#/definitions/Repository" - } - }, - "RepositoryList": { - "description": "RepositoryList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Repository" - } - } - }, - "RunJobList": { - "description": "RunJobList is a list of action run jobs", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionRunJob" - } - } - }, - "SearchResults": { - "description": "SearchResults", - "schema": { - "$ref": "#/definitions/SearchResults" - } - }, - "Secret": { - "description": "Secret", - "schema": { - "$ref": "#/definitions/Secret" - } - }, - "SecretList": { - "description": "SecretList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Secret" - } - } - }, - "ServerVersion": { - "description": "ServerVersion", - "schema": { - "$ref": "#/definitions/ServerVersion" - } - }, - "StopWatch": { - "description": "StopWatch", - "schema": { - "$ref": "#/definitions/StopWatch" - } - }, - "StopWatchList": { - "description": "StopWatchList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/StopWatch" - } - } - }, - "StringSlice": { - "description": "StringSlice", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "SyncForkInfo": { - "description": "SyncForkInfo", - "schema": { - "$ref": "#/definitions/SyncForkInfo" - } - }, - "Tag": { - "description": "Tag", - "schema": { - "$ref": "#/definitions/Tag" - } - }, - "TagList": { - "description": "TagList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Tag" - } - } - }, - "TagProtection": { - "description": "TagProtection", - "schema": { - "$ref": "#/definitions/TagProtection" - } - }, - "TagProtectionList": { - "description": "TagProtectionList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TagProtection" - } - } - }, - "TasksList": { - "description": "TasksList", - "schema": { - "$ref": "#/definitions/ActionTaskResponse" - } - }, - "Team": { - "description": "Team", - "schema": { - "$ref": "#/definitions/Team" - } - }, - "TeamList": { - "description": "TeamList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Team" - } - } - }, - "TimelineList": { - "description": "TimelineList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TimelineComment" - } - } - }, - "TopicListResponse": { - "description": "TopicListResponse", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TopicResponse" - } - } - }, - "TopicNames": { - "description": "TopicNames", - "schema": { - "$ref": "#/definitions/TopicName" - } - }, - "TrackedTime": { - "description": "TrackedTime", - "schema": { - "$ref": "#/definitions/TrackedTime" - } - }, - "TrackedTimeList": { - "description": "TrackedTimeList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TrackedTime" - } - } - }, - "User": { - "description": "User", - "schema": { - "$ref": "#/definitions/User" - } - }, - "UserHeatmapData": { - "description": "UserHeatmapData", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/UserHeatmapData" - } - } - }, - "UserList": { - "description": "UserList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/User" - } - } - }, - "UserSettings": { - "description": "UserSettings", - "schema": { - "$ref": "#/definitions/UserSettings" - } - }, - "VariableList": { - "description": "VariableList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionVariable" - } - } - }, - "WatchInfo": { - "description": "WatchInfo", - "schema": { - "$ref": "#/definitions/WatchInfo" - } - }, - "WikiCommitList": { - "description": "WikiCommitList", - "schema": { - "$ref": "#/definitions/WikiCommitList" - } - }, - "WikiPage": { - "description": "WikiPage", - "schema": { - "$ref": "#/definitions/WikiPage" - } - }, - "WikiPageList": { - "description": "WikiPageList", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/WikiPageMetaData" - } - } - }, - "boolean": { - "description": "Boolean" - }, - "conflict": { - "description": "APIConflict is a conflict empty response" - }, - "empty": { - "description": "APIEmpty is an empty response" - }, - "error": { - "description": "APIError is error format response", - "schema": { - "$ref": "#/definitions/APIError" - } - }, - "forbidden": { - "description": "APIForbiddenError is a forbidden error response", - "schema": { - "$ref": "#/definitions/APIForbiddenError" - } - }, - "internalServerError": { - "description": "APIInternalServerError is an error that is raised when an internal server error occurs", - "schema": { - "$ref": "#/definitions/APIInternalServerError" - } - }, - "invalidTopicsError": { - "description": "APIInvalidTopicsError is error format response to invalid topics", - "schema": { - "$ref": "#/definitions/APIInvalidTopicsError" - } - }, - "notFound": { - "description": "APINotFound is a not found error response", - "schema": { - "$ref": "#/definitions/APINotFound" - } - }, - "parameterBodies": { - "description": "parameterBodies", - "schema": { - "$ref": "#/definitions/NoteOptions" - } - }, - "quotaExceeded": { - "description": "QuotaExceeded", - "headers": { - "message": { - "type": "string" - }, - "user_id": { - "type": "integer", - "format": "int64" - }, - "username": { - "type": "string" - } - } - }, - "redirect": { - "description": "APIRedirect is a redirect response" - }, - "repoArchivedError": { - "description": "APIRepoArchivedError is an error that is raised when an archived repo should be modified", - "schema": { - "$ref": "#/definitions/APIRepoArchivedError" - } - }, - "string": { - "description": "APIString is a string response", - "schema": { - "type": "string" - } - }, - "unauthorized": { - "description": "APIUnauthorizedError is a unauthorized error response", - "schema": { - "$ref": "#/definitions/APIUnauthorizedError" - } - }, - "validationError": { - "description": "APIValidationError is error format response related to input validation", - "schema": { - "$ref": "#/definitions/APIValidationError" - } - } - }, - "securityDefinitions": { - "AccessToken": { - "description": "This authentication option is deprecated for removal in Forgejo v13.0.0. Please use AuthorizationHeaderToken instead.", - "type": "apiKey", - "name": "access_token", - "in": "query" - }, - "AuthorizationHeaderToken": { - "description": "API tokens must be prepended with \"token\" followed by a space.", - "type": "apiKey", - "name": "Authorization", - "in": "header" - }, - "BasicAuth": { - "type": "basic" - }, - "SudoHeader": { - "description": "Sudo API request as the user provided as the key. Admin privileges are required.", - "type": "apiKey", - "name": "Sudo", - "in": "header" - }, - "SudoParam": { - "description": "Sudo API request as the user provided as the key. Admin privileges are required.", - "type": "apiKey", - "name": "sudo", - "in": "query" - }, - "TOTPHeader": { - "description": "Must be used in combination with BasicAuth if two-factor authentication is enabled.", - "type": "apiKey", - "name": "X-FORGEJO-OTP", - "in": "header" - }, - "Token": { - "description": "This authentication option is deprecated for removal in Forgejo v13.0.0. Please use AuthorizationHeaderToken instead.", - "type": "apiKey", - "name": "token", - "in": "query" - } - }, - "security": [ - { - "BasicAuth": [] - }, - { - "Token": [] - }, - { - "AccessToken": [] - }, - { - "AuthorizationHeaderToken": [] - }, - { - "SudoParam": [] - }, - { - "SudoHeader": [] - }, - { - "TOTPHeader": [] - } - ] -} -- 2.54.0 From 0f0c27204604766e8afb65d7b90e7b62d2d3fd4a Mon Sep 17 00:00:00 2001 From: dzu Date: Wed, 11 Feb 2026 05:10:34 +0000 Subject: [PATCH 5/7] remove openapi test --- Cargo.toml | 10 ---------- forgejo-openapi-test/Cargo.toml | 10 ---------- forgejo-openapi-test/src/main.rs | 20 -------------------- 3 files changed, 40 deletions(-) delete mode 100644 forgejo-openapi-test/Cargo.toml delete mode 100644 forgejo-openapi-test/src/main.rs diff --git a/Cargo.toml b/Cargo.toml index 086924c..ab23a78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,18 +1,8 @@ [workspace] resolver = "3" members = [ - "forgejo-openapi-test" ] [workspace.dependencies] # git forgejo-openapi = { git = "https://git.dzuchun.ing/dzu/forgejo-openapi.git", default-features = false } -# crates.io -tokio = { version = "^1.46.0", default-features = false } -reqwest = { version = "^0.12", default-features = false } - -[profile.release] -opt-level = "z" -strip = true -lto = true -codegen-units = 1 diff --git a/forgejo-openapi-test/Cargo.toml b/forgejo-openapi-test/Cargo.toml deleted file mode 100644 index 75c76c1..0000000 --- a/forgejo-openapi-test/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "forgejo-openapi-test" -publish = false -version = "0.0.0" -edition = "2024" - -[dependencies] -forgejo-openapi = { workspace = true, features = ["rustls-tls"] } -reqwest = { workspace = true } -tokio = { workspace = true, features = ["macros"] } diff --git a/forgejo-openapi-test/src/main.rs b/forgejo-openapi-test/src/main.rs deleted file mode 100644 index fa80587..0000000 --- a/forgejo-openapi-test/src/main.rs +++ /dev/null @@ -1,20 +0,0 @@ -#[tokio::main(flavor = "current_thread")] -async fn main() { - let client = reqwest::Client::new(); - let config = forgejo_openapi::apis::configuration::Configuration { - base_path: String::from("https://git.dzuchun.ing/api/v1"), - user_agent: None, - client, - basic_auth: None, - oauth_access_token: None, - bearer_access_token: None, - api_key: None, - }; - let results = forgejo_openapi::apis::repository_api::repo_search( - &config, None, None, None, None, None, None, None, None, None, None, None, None, None, - None, None, None, None, - ) - .await - .unwrap(); - println!("{results:#?}"); -} -- 2.54.0 From a69815f5df8b5804fe804484fe6e19da092682db Mon Sep 17 00:00:00 2001 From: dzu Date: Wed, 11 Feb 2026 05:15:09 +0000 Subject: [PATCH 6/7] initial implementation --- .gitignore | 1 + Cargo.toml | 19 +++ anode-build/Cargo.toml | 14 ++ anode-build/src/lib.rs | 84 ++++++++++++ anode-build/src/manifest.rs | 142 ++++++++++++++++++++ anode-build/src/runs.yml | 5 + anode-macros-input/Cargo.toml | 12 ++ anode-macros-input/src/lib.rs | 246 ++++++++++++++++++++++++++++++++++ anode-macros/Cargo.toml | 17 +++ anode-macros/src/lib.rs | 134 ++++++++++++++++++ anode/Cargo.toml | 12 ++ anode/src/lib.rs | 103 ++++++++++++++ 12 files changed, 789 insertions(+) create mode 100644 .gitignore create mode 100644 anode-build/Cargo.toml create mode 100644 anode-build/src/lib.rs create mode 100644 anode-build/src/manifest.rs create mode 100644 anode-build/src/runs.yml create mode 100644 anode-macros-input/Cargo.toml create mode 100644 anode-macros-input/src/lib.rs create mode 100644 anode-macros/Cargo.toml create mode 100644 anode-macros/src/lib.rs create mode 100644 anode/Cargo.toml create mode 100644 anode/src/lib.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2f7896d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/Cargo.toml b/Cargo.toml index ab23a78..cb2ce28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,27 @@ [workspace] resolver = "3" members = [ + "anode", + "anode-macros-input", + "anode-build", + "anode-macros", ] [workspace.dependencies] +# workspace +anode = { path = "./anode" } +anode-macros-input = { path = "./anode-macros-input" } +anode-macros = { path = "./anode-macros" } +anode-build = { path = "./anode-build" } # git forgejo-openapi = { git = "https://git.dzuchun.ing/dzu/forgejo-openapi.git", default-features = false } +# crates.io +syn = { version = "2", default-features = false } +quote = { version = "1", default-features = false } +proc-macro2 = "1.0.102" +serde = { version = "1", default-features = false } +yaml_serde = { version = "0.10", default-features = false } +thiserror = { version = "2", default-features = false } + +[workspace.lints.clippy] +missing_panics_doc = "allow" diff --git a/anode-build/Cargo.toml b/anode-build/Cargo.toml new file mode 100644 index 0000000..e0ec5de --- /dev/null +++ b/anode-build/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "anode-build" +version = "0.1.0" +edition = "2024" + +[dependencies] +anode-macros-input.workspace = true +serde = {workspace = true, features = ["derive"]} +syn.workspace = true +quote.workspace = true +yaml_serde.workspace = true + +[lints] +workspace = true diff --git a/anode-build/src/lib.rs b/anode-build/src/lib.rs new file mode 100644 index 0000000..e91b6f1 --- /dev/null +++ b/anode-build/src/lib.rs @@ -0,0 +1,84 @@ +use syn::{File, punctuated::Punctuated}; + +use anode_macros_input::pretty_span; + +use crate::manifest::ActionManifest; + +mod manifest; + +pub fn build() { + let main_src = std::fs::read_to_string("src/main.rs").unwrap(); + let main_ast = syn::parse_file(&main_src).unwrap(); + let input = parse_file(main_ast); + let action = anode_macros_input::Action::from_struct(&input); + let manifest = ActionManifest::from_action(&action); + + // panic!("{manifest:#?}"); + std::fs::write( + "action.yml", + yaml_serde::to_string::(&manifest).unwrap(), + ) + .unwrap(); +} + +pub fn parse_file(input: File) -> syn::ItemStruct { + use syn::{Fields, FieldsNamed, Generics, Item, Path, Token}; + let structs = input.items.into_iter().filter_map(|item| { + if let Item::Struct(struct_) = item { + Some(struct_) + } else { + None + } + }); + let with_fields = structs.filter(|str| { + if str.generics != Generics::default() { + // struct has generics -- not an input + println!( + "cargo:warn=generics at {} are not allowed in the input struct", + pretty_span(&str.generics) + ); + return false; + } + + let Fields::Named(FieldsNamed { .. }) = &str.fields else { + println!( + "cargo:warn=fields at {} must be named for the action input", + pretty_span(&str.fields) + ); + return false; + }; + true + }); + let mut with_derive = with_fields + .filter(|str| { + str.attrs.iter().any(|attr| { + if !attr.meta.path().is_ident("derive") { + return false; + } + let Ok(traits) = + attr.parse_args_with(Punctuated::::parse_terminated) + else { + return false; + }; + traits.iter().any(|tr| { + let input: syn::Path = syn::parse_quote!(Input); + let anode_input: syn::Path = syn::parse_quote!(anode::Input); + tr == &input || tr == &anode_input + }) + }) + }) + .collect::>(); + + assert!( + !with_derive.is_empty(), + "no valid input definition in the main module" + ); + + assert!( + with_derive.len() <= 1, + "input module contains multiple valid input definintions: {:#?}", + with_derive.iter().map(pretty_span).collect::>(), + ); + + with_derive.pop().unwrap() +} diff --git a/anode-build/src/manifest.rs b/anode-build/src/manifest.rs new file mode 100644 index 0000000..2006458 --- /dev/null +++ b/anode-build/src/manifest.rs @@ -0,0 +1,142 @@ +use std::collections::BTreeMap; + +use quote::ToTokens; +use syn::{Expr, Ident, parse::Parser}; + +use anode_macros_input::{Action, ActionInput, pretty_span}; + +#[derive(Debug, serde::Serialize)] +pub struct InputManifest { + #[serde(skip_serializing_if = "String::is_empty")] + pub description: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#default: Option, + pub required: bool, +} + +impl InputManifest { + pub fn from_input(input: &ActionInput) -> (&str, InputManifest) { + #[expect( + clippy::manual_map, + reason = "this expression will optionally produce an error in the future" + )] + let default = if let Some(default) = &input.default { + Some(match default { + anode_macros_input::ActionInputDefault::Str(s) => { + yaml_serde::Value::String(s.clone().into_string()) + } + anode_macros_input::ActionInputDefault::Expr(expr) => parse_default(expr), + }) + } else { + None + }; + ( + &input.name, + InputManifest { + description: input.description.clone(), + default, + required: input.required, + }, + ) + } +} + +fn parse_default(expr: &Expr) -> yaml_serde::Value { + use syn::Lit; + use yaml_serde::{Number, Value}; + let lit = { + use syn::parse::Parse; + let parser = Lit::parse; + #[expect( + clippy::match_wild_err_arm, + reason = "`_err` can be used for debugging" + )] + match parser.parse2(expr.to_token_stream()) { + Ok(ok) => ok, + Err(_err) => panic!( + "to allow automatic manifest generation, default value must be a literal. non-literal default for field at {}", + pretty_span(expr), + ), + } + }; + match lit { + Lit::Str(lit_str) => Value::String(lit_str.value()), + Lit::Bool(lit_bool) => Value::Bool(lit_bool.value()), + Lit::Byte(lit_byte) => Value::Number(Number::from(u64::from(lit_byte.value()))), + Lit::Char(lit_char) => Value::String(format!("'{}'", lit_char.value())), + Lit::Int(lit_int) => { + let num = if let Ok(pos_int) = lit_int.base10_parse::() { + Number::from(pos_int) + } else if let Ok(neg_int) = lit_int.base10_parse::() { + Number::from(neg_int) + } else { + panic!("failed to parse int into yaml value: {}", lit_int,); + }; + Value::Number(num) + } + Lit::Float(lit_float) => { + let float = lit_float.base10_parse::().unwrap(); + Value::Number(float.into()) + } + Lit::ByteStr(_) => { + unimplemented!("bytestr is not a valid yaml value. please use regular str") + } + Lit::CStr(_) => { + unimplemented!("cstr is not a valid yaml literal. please use regular str") + } + Lit::Verbatim(_) => unimplemented!("uninterpreted literal"), + _ => unimplemented!("unknown literal kind"), + } +} + +#[derive(Debug, serde::Serialize)] +pub struct ActionManifest { + pub name: String, + pub description: String, + pub inputs: BTreeMap, + pub runs: yaml_serde::Value, +} + +impl ActionManifest { + pub fn from_action(action: &Action) -> Self { + let name = action + .name_override + .clone() + .unwrap_or_else(|| action.name.to_string()); + // collect both input manifests AND their idents, to provide informative error messages + let mut inputs = BTreeMap::<&str, (InputManifest, Ident)>::new(); + for input in &action.inputs { + use std::collections::btree_map::Entry; + let (name, mani) = InputManifest::from_input(input); + match inputs.entry(name) { + Entry::Vacant(vacant_entry) => { + vacant_entry.insert((mani, input.ident.clone())); + } + Entry::Occupied(occupied_entry) => { + // input mapping to the same name already exists + let (_, prev_ident) = occupied_entry.get(); + panic!( + "Fields at {} and {} map to the same name ({})", + pretty_span(&input.ident), + pretty_span(prev_ident), + name, + ); + } + } + } + ActionManifest { + name, + description: action.description.clone(), + // strip the idents out + inputs: inputs + .into_iter() + .map(|(k, (v, _))| (k.to_owned(), v)) + .collect(), + runs: runs(), + } + } +} + +fn runs() -> yaml_serde::Value { + yaml_serde::from_str::(include_str!("runs.yml")).unwrap() +} diff --git a/anode-build/src/runs.yml b/anode-build/src/runs.yml new file mode 100644 index 0000000..b9f3b8b --- /dev/null +++ b/anode-build/src/runs.yml @@ -0,0 +1,5 @@ +runs: + using: composite + steps: + - run: ${{ forgejo.action_path }}/main + shell: bash diff --git a/anode-macros-input/Cargo.toml b/anode-macros-input/Cargo.toml new file mode 100644 index 0000000..3b26000 --- /dev/null +++ b/anode-macros-input/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "anode-macros-input" +version = "0.1.0" +edition = "2024" + +[dependencies] +proc-macro2 = { workspace = true, features = [ "span-locations" ] } +syn = { workspace = true, features = [ "parsing", "printing", "full", "extra-traits", "clone-impls"] } +quote.workspace = true + +[lints] +workspace = true diff --git a/anode-macros-input/src/lib.rs b/anode-macros-input/src/lib.rs new file mode 100644 index 0000000..75c8623 --- /dev/null +++ b/anode-macros-input/src/lib.rs @@ -0,0 +1,246 @@ +use syn::{ + AngleBracketedGenericArguments, Attribute, Expr, ExprLit, Field, GenericArgument, Ident, Lit, + LitStr, Meta, MetaNameValue, Path, PathArguments, PathSegment, Type, TypePath, + spanned::Spanned, +}; + +pub enum ActionInputDefault { + Str(Box), + Expr(Box), +} + +pub struct ActionInput { + pub ident: syn::Ident, + pub name: String, + pub description: String, + pub r#default: Option, + pub required: bool, + pub ty: Type, + pub parser: Option, +} + +pub struct Action { + pub name: Ident, + pub name_override: Option, + pub description: String, + pub inputs: Vec, +} + +impl Action { + pub fn from_struct( + syn::ItemStruct { + attrs, + ident, + fields, + .. + }: &syn::ItemStruct, + ) -> Self { + let mut name_override = Option::::None; + let description = parse_desc(attrs); + for attr in attrs { + if attr.path().is_ident("name") + && let Meta::NameValue(MetaNameValue { + value: + Expr::Lit(ExprLit { + lit: Lit::Str(rename), + .. + }), + .. + }) = &attr.meta + { + let token = rename.token(); + let mut literal = token.to_string(); + literal.pop().unwrap(); + literal.remove(0); + name_override = Some(literal); + } + } + + let mut inputs = Vec::new(); + for field in fields { + inputs.push(parse_input(field)); + } + Action { + name: ident.clone(), + name_override, + description, + inputs, + } + } +} + +pub fn pretty_span(t: &T) -> String { + let span2 = t.span(); + let start = span2.start(); + let end = span2.end(); + let at = if start.line == end.line { + format_args!("line {}:{}-{}", start.line, start.column, end.column) + } else { + format_args!("lines {}-{}", start.line, end.line) + }; + format!("at {at} in main.rs") +} + +fn parse_input(field: &Field) -> ActionInput { + let Field { + attrs, ident, ty, .. + } = field; + let name = to_kebab(&ident.as_ref().unwrap().to_string()); + let description = parse_desc(attrs); + let required = if let Type::Path(TypePath { + qself: None, + path: Path { segments, .. }, + }) = ty + && let Some(PathSegment { ident, .. }) = segments.first() + && ident == "Option" + { + false + } else { + true + }; + + // first, assign the default parser, if it can be inferred from the type + let mut parser = infer_parser(ty); + + let mut default = Option::::None; + + for attr in attrs { + if attr.path().is_ident("default") { + default = Some(ActionInputDefault::Expr(Box::new( + attr.parse_args::().unwrap(), + ))); + } + + if attr.path().is_ident("default_str") { + default = Some(ActionInputDefault::Str( + attr.parse_args::() + .unwrap() + .value() + .into_boxed_str(), + )); + } + + if attr.path().is_ident("parser") { + parser = Some(attr.parse_args::().unwrap()); + } + } + + ActionInput { + description, + default, + required, + parser, + ident: field.ident.clone().expect("field must have an ident"), + name, + ty: ty.clone(), + } +} + +fn parse_desc(attrs: &[Attribute]) -> String { + let mut description = String::new(); + for attr in attrs { + if attr.path().is_ident("doc") + && let Meta::NameValue(MetaNameValue { + value: + Expr::Lit(ExprLit { + lit: Lit::Str(doc), .. + }), + .. + }) = &attr.meta + { + let token = doc.token(); + let mut literal = token.to_string(); + literal.pop().unwrap(); + literal.remove(0); + if literal.starts_with(' ') { + literal.remove(0); + } + if !description.is_empty() { + description.push('\n'); + } + description.push_str(&literal); + } + } + description +} + +pub fn to_kebab(name: &str) -> String { + let mut name = name.trim_start_matches(['-', '_']).replace('_', "-"); + let mut name = name.as_mut_str(); + assert!(!name.is_empty()); // TODO that's an invalid ident error, use proper signaling + let mut res = String::new(); + while !name.is_empty() { + let next_upper = name + .find(|ch: char| ch.is_ascii_uppercase()) + .unwrap_or(name.len()); + let (this, rest) = name.split_at_mut(next_upper); + name = rest; + if !res.is_empty() { + res.push('-'); + } + res.push_str(this); + if let Some((ind, _)) = name.char_indices().nth(1) { + name[..ind].make_ascii_lowercase(); + } else { + name.make_ascii_lowercase(); + } + } + res +} + +macro_rules! mch { + ($p:pat = $e:expr) => { + let $p = $e else { + return None; + }; + }; +} + +fn infer_parser(ty: &Type) -> Option { + // ensure that type is a single-length path at the top (that covers both well-known types and any `Option`) + mch!( + Type::Path(TypePath { + qself: None, + path: Path { segments, .. }, + }) = ty + ); + if segments.len() != 1 { + return None; + } + let PathSegment { ident, arguments } = segments.first()?; + + if let PathArguments::None = arguments { + // no arguments and simple ident -- use well-known parser + return Some(syn::parse_quote!(::anode::__default_parser::#ident)); + } + + // at this point, if the parser can be inferred, type must be an option + if ident != "Option" { + return None; + } + mch!( + PathArguments::AngleBracketed(AngleBracketedGenericArguments { + args: arguments, + .. + }) = arguments + ); + if arguments.len() != 1 { + // real `Option` has only 1 argument + return None; + } + mch!( + Some(GenericArgument::Type(Type::Path(TypePath { + qself: None, + path: Path { segments, .. }, + }))) = arguments.first() + ); + if segments.len() != 1 { + // simple type must be just an ident + return None; + } + + let PathSegment { ident, .. } = segments.first()?; + + // well-known parser for the inner type + Some(syn::parse_quote!(::anode::__default_parser::#ident)) +} diff --git a/anode-macros/Cargo.toml b/anode-macros/Cargo.toml new file mode 100644 index 0000000..4536798 --- /dev/null +++ b/anode-macros/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "anode-macros" +version = "0.1.0" +edition = "2024" + +[lib] +proc-macro = true + +[dependencies] +anode-macros-input = { workspace = true } +yaml_serde.workspace = true +proc-macro2.workspace = true +syn = { workspace = true, features = [ "parsing", "proc-macro" ] } +quote.workspace = true + +[lints] +workspace = true diff --git a/anode-macros/src/lib.rs b/anode-macros/src/lib.rs new file mode 100644 index 0000000..ad9a53f --- /dev/null +++ b/anode-macros/src/lib.rs @@ -0,0 +1,134 @@ +use anode_macros_input::{Action, ActionInput, ActionInputDefault}; +use proc_macro::TokenStream as TStream1; +use proc_macro2::Span; +use quote::{ToTokens, format_ident}; +use syn::{ + ExprStruct, FieldValue, Ident, ItemFn, LitStr, Member, Stmt, Token, + punctuated::Punctuated, + token::{Brace, Colon}, +}; + +#[proc_macro_derive(Input, attributes(name, default, default_str, parser))] +pub fn input(item: TStream1) -> TStream1 { + let input = syn::parse_macro_input!(item as syn::ItemStruct); + let ident = &input.ident; + let action = Action::from_struct(&input); + let try_get_impl = try_get(&action); + + let get_impl: syn::ItemFn = syn::parse_quote! { + fn get() -> Self { + Self::try_get().expect("Failed to parse the input") + } + }; + + let impl_block: syn::ItemImpl = syn::parse_quote! { + impl #ident { + #try_get_impl + #get_impl + } + }; + impl_block.into_token_stream().into() +} + +fn try_get(action: &Action) -> ItemFn { + let mut body = Vec::::new(); + let errors = format_ident!("errors"); + body.push( + syn::parse_quote! { let mut #errors = ::std::vec::Vec::<(&'static str, ::anode::InputErrorMessage)>::new(); }, + ); + + let mut idents = Vec::<(Ident, Ident)>::new(); + let mut required_idents = Vec::::new(); + for ( + ActionInput { + name, + parser, + required, + r#default, + ident: struct_ident, + .. + }, + i, + ) in action.inputs.iter().zip(0..) + { + let input_ident = format_ident!("f{i}"); + body.push(syn::parse_quote! { let mut #input_ident: Option<_> = None; }); + + let input_lit = LitStr::new(name, proc_macro2::Span::call_site()); + let input_envvar = LitStr::new( + &format!("INPUT_{}", name.to_uppercase().replace('-', "_")), + proc_macro2::Span::call_site(), + ); + let mut envvar: syn::Expr = syn::parse_quote!( ::std::env::var_os(#input_envvar) ); + if let Some(ActionInputDefault::Str(default_str)) = default { + // has default str value -- use it as a fallback + let def = LitStr::new(&default_str, Span::call_site()); + envvar = syn::parse_quote!( #envvar.or_else(|| Some(::std::ffi::OsString::from(String::from(#def)))) ); + } + let mut parse_input: syn::ExprIf = syn::parse_quote! { + if let Some(envvar) = #envvar { + match #parser(envvar) { + Ok(ok) => #input_ident = Some(ok), + Err(error) => #errors.push((#input_lit, ::anode::InputErrorMessage::Parsing(::std::boxed::Box::new(error)))), + } + } + }; + // else branch, if this input is required + if *required { + let else_branch = if let Some(ActionInputDefault::Expr(default_expr)) = default { + // has a default expression value -- assign it instead + syn::parse_quote! {{ + #input_ident = Some(#default_expr); + }} + } else { + // no default - error + syn::parse_quote! {{ + #errors.push((#input_lit, ::anode::InputErrorMessage::NotPresent)); + }} + }; + + parse_input.else_branch = Some((::default(), Box::new(else_branch))); + } + body.push(syn::parse_quote! (#parse_input)); + idents.push((input_ident.clone(), struct_ident.clone())); + if *required { + required_idents.push(input_ident); + } + } + + // assert there are no errors, and all required fields are present + body.push(syn::parse_quote! { + let (#(Some(#required_idents)),*, &[]) = (#(#required_idents),*, &*#errors) else { + return Err(::anode::InputError(#errors.into_boxed_slice())); + }; + }); + + // return the struct + let mut fields = Punctuated::new(); + for (val, member) in idents { + fields.push(FieldValue { + attrs: Vec::new(), + member: Member::Named(member), + colon_token: Some(Colon::default()), + expr: syn::parse_quote!(#val), + }); + } + let str = ExprStruct { + attrs: Vec::new(), + qself: None, + path: syn::parse_quote!(Self), + brace_token: Brace::default(), + fields, + dot2_token: None, + rest: None, + }; + body.push(syn::parse_quote! { + return Ok(#str); + }); + + syn::parse_quote! { + fn try_get() -> Result { + #(#body)* + } + } +} diff --git a/anode/Cargo.toml b/anode/Cargo.toml new file mode 100644 index 0000000..3649d67 --- /dev/null +++ b/anode/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "anode" +version = "0.1.0" +edition = "2024" + +[dependencies] +anode-macros.workspace = true +thiserror.workspace = true +forgejo-openapi = { workspace = true, optional = true } + +[features] +forge-forgejo = [ "dep:forgejo-openapi" ] diff --git a/anode/src/lib.rs b/anode/src/lib.rs new file mode 100644 index 0000000..bda5cd6 --- /dev/null +++ b/anode/src/lib.rs @@ -0,0 +1,103 @@ +pub use anode_macros::Input; + +#[doc(hidden)] +pub mod __default_parser { + #![allow(non_snake_case)] + + use std::{ + ffi::OsString, + os::unix::ffi::{OsStrExt, OsStringExt}, + path::PathBuf, + }; + + #[derive(Debug, thiserror::Error)] + pub enum InputIntError { + #[error(transparent)] + Uft8(#[from] core::str::Utf8Error), + #[error(transparent)] + Parse(#[from] core::num::ParseIntError), + } + + macro_rules! int { + ($t:ident) => { + pub fn $t(input: OsString) -> Result<$t, InputIntError> { + let str = core::str::from_utf8(input.as_bytes())?; + Ok(str.parse::<$t>()?) + } + }; + } + + int!(i8); + int!(u8); + int!(i16); + int!(u16); + int!(i32); + int!(u32); + int!(i64); + int!(u64); + int!(i128); + int!(u128); + + #[derive(Debug, thiserror::Error)] + pub enum InputFloatError { + #[error(transparent)] + Uft8(#[from] core::str::Utf8Error), + #[error(transparent)] + Parse(#[from] core::num::ParseFloatError), + } + + macro_rules! flt { + ($t:ident) => { + pub fn $t(input: OsString) -> Result<$t, InputFloatError> { + let str = core::str::from_utf8(input.as_bytes())?; + Ok(str.parse::<$t>()?) + } + }; + } + + flt!(f32); + flt!(f64); + + pub fn String(input: OsString) -> Result { + let bytes = input.into_vec(); + String::from_utf8(bytes) + } + + pub fn OsString(input: OsString) -> Result { + Ok(input) + } + + pub fn PathBuf(input: OsString) -> Result { + Ok(input.into()) + } +} + +pub mod parse { + use std::{ffi::OsString, os::unix::ffi::OsStrExt, str::FromStr}; + + #[derive(Debug, thiserror::Error)] + pub enum InputFromStrError { + #[error(transparent)] + Uft8(#[from] core::str::Utf8Error), + #[error(transparent)] + Parse(T::Err), + } + + pub fn from_str(input: OsString) -> Result> { + let str = core::str::from_utf8(input.as_bytes())?; + str.parse::().map_err(InputFromStrError::Parse) + } +} + +#[cfg(feature = "forge-forgejo")] +pub use forgejo_openapi as forgejo; + +#[derive(Debug)] +pub struct InputError(#[doc(hidden)] pub Box<[(&'static str, InputErrorMessage)]>); + +#[derive(Debug)] +#[doc(hidden)] +pub enum InputErrorMessage { + NotPresent, + Parsing(Box), +} -- 2.54.0 From cbf119c4242dda6a7e06e69e14059fbd67800163 Mon Sep 17 00:00:00 2001 From: dzu Date: Wed, 11 Feb 2026 05:34:47 +0000 Subject: [PATCH 7/7] [Cargo.lock] --- Cargo.lock | 1138 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1138 insertions(+) create mode 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..11b84a9 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1138 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "anode" +version = "0.1.0" +dependencies = [ + "anode-macros", + "forgejo-openapi", + "thiserror", +] + +[[package]] +name = "anode-build" +version = "0.1.0" +dependencies = [ + "anode-macros-input", + "quote", + "serde", + "syn", + "yaml_serde", +] + +[[package]] +name = "anode-macros" +version = "0.1.0" +dependencies = [ + "anode-macros-input", + "proc-macro2", + "quote", + "syn", + "yaml_serde", +] + +[[package]] +name = "anode-macros-input" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "bumpalo" +version = "3.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "forgejo-openapi" +version = "14.0.2-2-84240ce3a2+gitea-1.22.0" +source = "git+https://git.dzuchun.ing/dzu/forgejo-openapi.git#6e89b980f860faceb50a9a9c9ba3eef04aafefc2" +dependencies = [ + "reqwest", + "serde", + "serde_json", + "serde_repr", + "tokio", + "tokio-util", + "url", +] + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "js-sys" +version = "0.3.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.181" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "js-sys", + "log", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "syn" +version = "2.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.49.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +dependencies = [ + "libc", + "mio", + "pin-project-lite", + "socket2", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + +[[package]] +name = "unicode-ident" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e" + +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +dependencies = [ + "cfg-if", + "futures-util", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yaml_serde" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a7f5270edc6fab0529a772a772b3e505dfd883a8de5cc5b464e35fabe586411" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4de98dfa5d5b7fef4ee834d0073d560c9ca7b6c46a71d058c48db7960f8cfaf7" -- 2.54.0